Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
mirtk::Mapping Class Referenceabstract

#include <Mapping.h>

Inheritance diagram for mirtk::Mapping:
Inheritance graph
Collaboration diagram for mirtk::Mapping:
Collaboration graph

Public Member Functions

ImageAttributes Attributes (int nx, int ny=0, int nz=0) const
 
ImageAttributes Attributes (double dx=.0, double dy=.0, double dz=.0) const
 
void BoundingBox (double &x1, double &y1, double &x2, double &y2) const
 
virtual void BoundingBox (double &x1, double &y1, double &z1, double &x2, double &y2, double &z2) const =0
 
void BoundingBox (double bounds[6]) const
 
void BoundingBox (Point &p1, Point &p2) const
 
virtual bool Evaluate (double *v, double x, double y, double z=0) const =0
 
bool Evaluate (double *v, const double p[3]) const
 
bool Evaluate (double *v, const Point &p) const
 
virtual double Evaluate (double x, double y, double z=0, int l=0) const
 
double Evaluate (const double p[3], int l=0) const
 
double Evaluate (const Point &, int l=0) const
 
virtual void Evaluate (GenericImage< float > &f, int l=0, vtkSmartPointer< vtkPointSet > m=nullptr) const
 
virtual void Evaluate (GenericImage< double > &f, int l=0, vtkSmartPointer< vtkPointSet > m=nullptr) const
 
virtual void Initialize ()
 Initialize map after inputs and parameters are set.
 
virtual MappingNewCopy () const =0
 Make deep copy of this map.
 
virtual int NumberOfArguments () const
 Dimension of map domain.
 
virtual int NumberOfComponents () const =0
 Dimension of codomain, i.e., number of output values.
 
virtual bool Read (const char *)
 Read map from file.
 
virtual bool Write (const char *) const
 Write map to file.
 
virtual ~Mapping ()
 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.
 

Static Public Member Functions

static MappingNew (const char *)
 Read mapping from file.
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 

Protected Member Functions

 Mapping ()
 Default constructor.
 
 Mapping (const Mapping &)
 Copy constructor.
 
Mappingoperator= (const Mapping &)
 Assignment operator.
 
virtual void ReadMap (Cifstream &)
 Read map attributes and parameters from file stream.
 
virtual void WriteMap (Cofstream &) const
 Write map attributes and parameters to file stream.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Additional Inherited Members

- 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

Surface map or volumetric map

A mapping assigns either each point of a surface embedded in 3D Euclidean space (a 2D manifold) or each point of a 3D volume a n-D target value, where n is usually 1, 2, or 3.

It may represent an embedding of a cortical surface mesh, a bijective map of a surface to a disk, square, or sphere, as well as a bijective map from one piecewise linear complex (PLC) to another, such as the mapping of the brain volume to the unit ball (i.e., the interior of the unit sphere). An example of a surface map from computer graphics is the assignment of 2D texture coordinates to every vertex of the input mesh with linear interpolation within each triangle to map a 2D texture onto the surface.

A bijective mapping is a reparameterization of the input domain, where the parameterization depends on the method used to compute the respective map.

Definition at line 58 of file Mapping.h.

Member Function Documentation

§ Attributes() [1/2]

ImageAttributes mirtk::Mapping::Attributes ( int  nx,
int  ny = 0,
int  nz = 0 
) const

Get regular lattice attributes of map domain

Parameters
[in]nxNumber of lattice points along x axis.
[in]nyNumber of lattice points along y axis.
[in]nzNumber of lattice points along z axis.

§ Attributes() [2/2]

ImageAttributes mirtk::Mapping::Attributes ( double  dx = .0,
double  dy = .0,
double  dz = .0 
) const

Get regular lattice attributes of map domain

If no lattice spacing is specified, the length of the bounding box diagonal dividied by 256 is used.

Parameters
[in]dxLattice spacing along x axis.
[in]dyLattice spacing along y axis.
[in]dzLattice spacing along z axis.

§ BoundingBox() [1/4]

void mirtk::Mapping::BoundingBox ( double &  x1,
double &  y1,
double &  x2,
double &  y2 
) const
inline

Get minimum axes-aligned bounding box of map domain

Parameters
[out]x1Lower bound of map domain along x axis.
[out]y1Lower bound of map domain along y axis.
[out]x2Upper bound of map domain along x axis.
[out]y2Upper bound of map domain along y axis.

Definition at line 273 of file Mapping.h.

§ BoundingBox() [2/4]

virtual void mirtk::Mapping::BoundingBox ( double &  x1,
double &  y1,
double &  z1,
double &  x2,
double &  y2,
double &  z2 
) const
pure virtual

Get minimum axes-aligned bounding box of map domain

Parameters
[out]x1Lower bound of map domain along x axis.
[out]y1Lower bound of map domain along y axis.
[out]z1Lower bound of map domain along z axis.
[out]x2Upper bound of map domain along x axis.
[out]y2Upper bound of map domain along y axis.
[out]z2Upper bound of map domain along z axis.

Implemented in mirtk::PiecewiseLinearMap, and mirtk::MeshlessMap.

§ BoundingBox() [3/4]

void mirtk::Mapping::BoundingBox ( double  bounds[6]) const
inline

Get minimum axes-aligned bounding box of input domain

Parameters
[out]boundsBounds of input domain in VTK order, i.e., [x1, x2, y1, y2, z1, z2].

Definition at line 280 of file Mapping.h.

§ BoundingBox() [4/4]

void mirtk::Mapping::BoundingBox ( Point p1,
Point p2 
) const
inline

Get minimum axes-aligned bounding box of input domain

Parameters
[out]p1Lower-left-front corner of input domain bounding box.
[out]p2Upper-right-back corner of input domain bounding box.

Definition at line 287 of file Mapping.h.

§ Evaluate() [1/8]

virtual bool mirtk::Mapping::Evaluate ( double *  v,
double  x,
double  y,
double  z = 0 
) const
pure virtual

Evaluate map at a given point

Parameters
[out]vMap value.
[in]xCoordinate of point along x axis at which to evaluate map.
[in]yCoordinate of point along y axis at which to evaluate map.
[in]zCoordinate of point along z axis at which to evaluate map.
Returns
Whether input point is inside map domain.

Implemented in mirtk::PiecewiseLinearMap, mirtk::MeshlessHarmonicMap, and mirtk::MeshlessBiharmonicMap.

§ Evaluate() [2/8]

bool mirtk::Mapping::Evaluate ( double *  v,
const double  p[3] 
) const
inline

Evaluate map at a given point

Parameters
[out]vMap value.
[in]pPoint at which to evaluate map.
Returns
Whether input point is inside map domain.

Definition at line 297 of file Mapping.h.

§ Evaluate() [3/8]

bool mirtk::Mapping::Evaluate ( double *  v,
const Point p 
) const
inline

Evaluate map at a given point

Parameters
[out]vMap value.
[in]pPoint at which to evaluate map.
Returns
Whether input point is inside map domain.

Definition at line 303 of file Mapping.h.

§ Evaluate() [4/8]

double mirtk::Mapping::Evaluate ( double  x,
double  y,
double  z = 0,
int  l = 0 
) const
inlinevirtual

Evaluate map at a given point

Parameters
[in]xCoordinate of point along x axis at which to evaluate map.
[in]yCoordinate of point along y axis at which to evaluate map.
[in]zCoordinate of point along z axis at which to evaluate map.
[in]lIndex of map value component.
Returns
The l-th component of the map value evaluated at the given point or the OutsideValue when input point is outside the map domain.

Reimplemented in mirtk::PiecewiseLinearMap, mirtk::MeshlessHarmonicMap, and mirtk::MeshlessBiharmonicMap.

Definition at line 309 of file Mapping.h.

§ Evaluate() [5/8]

double mirtk::Mapping::Evaluate ( const double  p[3],
int  l = 0 
) const
inline

Evaluate map at a given point

Parameters
[in]pPoint at which to evaluate map.
[in]lIndex of map value component.
Returns
The l-th component of the map value evaluated at the given point or the OutsideValue when input point is outside the map domain.

Definition at line 319 of file Mapping.h.

§ Evaluate() [6/8]

double mirtk::Mapping::Evaluate ( const Point p,
int  l = 0 
) const
inline

Evaluate map at a given point

Parameters
[in]pPoint at which to evaluate map.
[in]lIndex of map value component.
Returns
The l-th component of the map value evaluated at the given point or the OutsideValue when input point is outside the map domain.

Definition at line 325 of file Mapping.h.

§ Evaluate() [7/8]

virtual void mirtk::Mapping::Evaluate ( GenericImage< float > &  f,
int  l = 0,
vtkSmartPointer< vtkPointSet >  m = nullptr 
) const
virtual

Evaluate map at each point of a regular lattice

Parameters
[out]fDefines lattice on which to evaluate the map. The map value at each lattice point is stored at the respective voxel. The number of map values stored in the output image is determined by the temporal dimension of the image.
[in]lIndex of first map value component to store in output image.
[in]mPiecewise linear complex (PLC) defining an arbitrary subset of the lattice points at which to evaluate the map.

§ Evaluate() [8/8]

virtual void mirtk::Mapping::Evaluate ( GenericImage< double > &  f,
int  l = 0,
vtkSmartPointer< vtkPointSet >  m = nullptr 
) const
virtual

Evaluate map at each point of a regular lattice

Parameters
[out]fDefines lattice on which to evaluate the map. The map value at each lattice point is stored at the respective voxel. The number of map values stored in the output image is determined by the temporal dimension of the image.
[in]lIndex of first map value component to store in output image.
[in]mPiecewise linear complex (PLC) defining an arbitrary subset of the lattice points at which to evaluate the map.

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