Public Member Functions | Protected Member Functions | List of all members
mirtk::LeastSquaresConformalSurfaceMapper Class Reference

#include <LeastSquaresConformalSurfaceMapper.h>

Inheritance diagram for mirtk::LeastSquaresConformalSurfaceMapper:
Inheritance graph
Collaboration diagram for mirtk::LeastSquaresConformalSurfaceMapper:
Collaboration graph

Public Member Functions

void AddFixedPoint (int i, double u, double v)
 
int FixedPointId (int i) const
 
int FixedPointIndex (int i) const
 
int FreePointId (int i) const
 
int FreePointIndex (int i) const
 
double GetFixedValue (int i, int j=0) const
 
double GetFreeValue (int i, int j=0) const
 
double GetValue (int i, int j=0) const
 
bool IsFixedPoint (int i) const
 Whether the map value of the specified surface point is fixed.
 
bool IsFreePoint (int i) const
 Whether the map value of the specified surface point is free.
 
 LeastSquaresConformalSurfaceMapper ()
 Default constructor.
 
 LeastSquaresConformalSurfaceMapper (const LeastSquaresConformalSurfaceMapper &)
 Copy constructor.
 
int NumberOfFixedPoints () const
 Number of surface points with fixed map value.
 
int NumberOfFreePoints () const
 Number of surface points with free map value.
 
LeastSquaresConformalSurfaceMapperoperator= (const LeastSquaresConformalSurfaceMapper &)
 Assignment operator.
 
virtual ~LeastSquaresConformalSurfaceMapper ()
 Destructor.
 
- Public Member Functions inherited from mirtk::FreeBoundarySurfaceMapper
int NumberOfComponents () const
 Dimension of map codomain.
 
virtual ~FreeBoundarySurfaceMapper ()
 Destructor.
 
- Public Member Functions inherited from mirtk::SurfaceMapper
void Run ()
 Compute surface map.
 
virtual ~SurfaceMapper ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Protected Member Functions

virtual void ComputeMap ()
 Compute surface map.
 
virtual void Finalize ()
 Finalize filter execution.
 
virtual void Initialize ()
 Initialize filter after input and parameters are set.
 
void SetFreeValue (int i, double v)
 
void SetFreeValue (int i, int j, double v)
 
void SetValue (int i, double v)
 
void SetValue (int i, int j, double v)
 
virtual double Weight (int i, int j) const
 
- Protected Member Functions inherited from mirtk::FreeBoundarySurfaceMapper
 FreeBoundarySurfaceMapper ()
 Default constructor.
 
 FreeBoundarySurfaceMapper (const FreeBoundarySurfaceMapper &)
 Copy constructor.
 
FreeBoundarySurfaceMapperoperator= (const FreeBoundarySurfaceMapper &)
 Assignment operator.
 
- Protected Member Functions inherited from mirtk::SurfaceMapper
int GetEdgeNeighborPoints (int i, int j, int &k, int &l) const
 
void GetPoint (int ptId, double p[3]) const
 
int NumberOfInteriorPoints () const
 Number of surface points minus the number of boundary points.
 
int NumberOfPoints () const
 Number of surface points.
 
SurfaceMapperoperator= (const SurfaceMapper &)
 Assignment operator.
 
class Point Point (int ptId) const
 
 SurfaceMapper ()
 Default constructor.
 
 SurfaceMapper (const SurfaceMapper &)
 Copy constructor.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Least squares conformal parameterization

This filter implements the least squares conformal map (LSCM) proposed by Levy (2002) and the identical discrete natural conformal parameterization (DNCP) proposed by Meyer et al. (2002). It follows the formulation of in Mullen et al. (2002), where the LSCM is defined as the minimizer of the conformal energy \(E_C(\vec{u}) = E_LSCM\vec{u} = E_D(\vec{u}) - A(\vec{u})\), where \(E_D(\vec{u})\) is the discrete Dirichlet energy and \(A(\vec{u})\) is the total area of the parameteric domain. The geometric cotangent weights are used to discretize the Laplace operator needed for the computation of the derivative of the Dirichlet energy.

The LSCM requires at least two fixed points. When no point constraints are given, a boundary point is selected automatically. A second fixed boundary point is chosen to be as farthest away from the first fixed point as possible based on geodesic distances on the input surface mesh.

Todo:
Implement area weighting extension as described in Mullen et al. (2008) to account for irregular surface sampling.

Definition at line 62 of file LeastSquaresConformalSurfaceMapper.h.

Member Function Documentation

§ AddFixedPoint()

void mirtk::LeastSquaresConformalSurfaceMapper::AddFixedPoint ( int  i,
double  u,
double  v 
)

Add hard point constraint

Parameters
[in]iSurface point index.
[in]uFirst constraint value component.
[in]vSecond constraint value component.

§ FixedPointId()

int mirtk::LeastSquaresConformalSurfaceMapper::FixedPointId ( int  i) const
inline

Get surface point ID of i-th point with fixed map value

Parameters
[in]iIndex of point in set of points with fixed map value.
Returns
Surface point index.

Definition at line 292 of file LeastSquaresConformalSurfaceMapper.h.

§ FixedPointIndex()

int mirtk::LeastSquaresConformalSurfaceMapper::FixedPointIndex ( int  i) const
inline

Get index of i-th point with fixed map value or -1 if map value of point is free

Parameters
[in]iSurface point index.
Returns
Index of point in set of points with fixed map value.

Definition at line 285 of file LeastSquaresConformalSurfaceMapper.h.

§ FreePointId()

int mirtk::LeastSquaresConformalSurfaceMapper::FreePointId ( int  i) const
inline

Get surface point ID of i-th point with free map value

Parameters
[in]iIndex of point in set of points with free map value.
Returns
Surface point index.

Definition at line 273 of file LeastSquaresConformalSurfaceMapper.h.

§ FreePointIndex()

int mirtk::LeastSquaresConformalSurfaceMapper::FreePointIndex ( int  i) const
inline

Get index of i-th point with free map value or -1 if map value of point is fixed

Parameters
[in]iSurface point index.
Returns
Index of point in set of points with free map value.

Definition at line 266 of file LeastSquaresConformalSurfaceMapper.h.

§ GetFixedValue()

double mirtk::LeastSquaresConformalSurfaceMapper::GetFixedValue ( int  i,
int  j = 0 
) const
inline

Get component of map value at i-th fixed point

Parameters
[in]iIndex of point in set of points with fixed map value.
[in]jMap value component index.
Returns
The j-th component of the map value evaluated at the i-th fixed point.

Definition at line 316 of file LeastSquaresConformalSurfaceMapper.h.

§ GetFreeValue()

double mirtk::LeastSquaresConformalSurfaceMapper::GetFreeValue ( int  i,
int  j = 0 
) const
inline

Get component of map value at i-th free point

Parameters
[in]iIndex of point in set of points with free map value.
[in]jMap value component index.
Returns
The j-th component of the map value evaluated at the i-th free point.

Definition at line 310 of file LeastSquaresConformalSurfaceMapper.h.

§ GetValue()

double mirtk::LeastSquaresConformalSurfaceMapper::GetValue ( int  i,
int  j = 0 
) const
inline

Get component of map value at surface vertex

Parameters
[in]iSurface point index.
[in]jMap value component index.
Returns
The j-th component of the map value evaluated at the i-th surface point.

Definition at line 304 of file LeastSquaresConformalSurfaceMapper.h.

§ SetFreeValue() [1/2]

void mirtk::LeastSquaresConformalSurfaceMapper::SetFreeValue ( int  i,
double  v 
)
inlineprotected

Set scalar map value at i-th free point

Parameters
[in]iIndex of point in set of points with free map value.
[in]vMap value.

Definition at line 334 of file LeastSquaresConformalSurfaceMapper.h.

§ SetFreeValue() [2/2]

void mirtk::LeastSquaresConformalSurfaceMapper::SetFreeValue ( int  i,
int  j,
double  v 
)
inlineprotected

Set component of map value at i-th free point

Parameters
[in]iIndex of point in set of points with free map value.
[in]jMap component index.
[in]vMap component value.

Definition at line 340 of file LeastSquaresConformalSurfaceMapper.h.

§ SetValue() [1/2]

void mirtk::LeastSquaresConformalSurfaceMapper::SetValue ( int  i,
double  v 
)
inlineprotected

Set scalar map value at surface vertex

Parameters
[in]iSurface point index.
[in]vMap value.

Definition at line 322 of file LeastSquaresConformalSurfaceMapper.h.

§ SetValue() [2/2]

void mirtk::LeastSquaresConformalSurfaceMapper::SetValue ( int  i,
int  j,
double  v 
)
inlineprotected

Set component of map value at surface vertex

Parameters
[in]iSurface point index.
[in]jMap component index.
[in]vMap component value.

Definition at line 328 of file LeastSquaresConformalSurfaceMapper.h.

§ Weight()

virtual double mirtk::LeastSquaresConformalSurfaceMapper::Weight ( int  i,
int  j 
) const
protectedvirtual

Weight of undirected edge (i, j)

Parameters
[in]iFirst end point.
[in]jSecond end point.
Returns
Weight of undirected edge (i, j).

The documentation for this class was generated from the following file: