#include <Mapping.h>
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 Mapping * | NewCopy () 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 Mapping * | New (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. | |
Mapping & | operator= (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) |
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.
ImageAttributes mirtk::Mapping::Attributes | ( | int | nx, |
int | ny = 0 , |
||
int | nz = 0 |
||
) | const |
Get regular lattice attributes of map domain
[in] | nx | Number of lattice points along x axis. |
[in] | ny | Number of lattice points along y axis. |
[in] | nz | Number of lattice points along z axis. |
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.
[in] | dx | Lattice spacing along x axis. |
[in] | dy | Lattice spacing along y axis. |
[in] | dz | Lattice spacing along z axis. |
|
inline |
|
pure virtual |
Get minimum axes-aligned bounding box of map domain
[out] | x1 | Lower bound of map domain along x axis. |
[out] | y1 | Lower bound of map domain along y axis. |
[out] | z1 | Lower bound of map domain along z axis. |
[out] | x2 | Upper bound of map domain along x axis. |
[out] | y2 | Upper bound of map domain along y axis. |
[out] | z2 | Upper bound of map domain along z axis. |
Implemented in mirtk::PiecewiseLinearMap, and mirtk::MeshlessMap.
|
inline |
|
pure virtual |
Evaluate map at a given point
[out] | v | Map value. |
[in] | x | Coordinate of point along x axis at which to evaluate map. |
[in] | y | Coordinate of point along y axis at which to evaluate map. |
[in] | z | Coordinate of point along z axis at which to evaluate map. |
Implemented in mirtk::PiecewiseLinearMap, mirtk::MeshlessHarmonicMap, and mirtk::MeshlessBiharmonicMap.
|
inline |
|
inline |
|
inlinevirtual |
Evaluate map at a given point
[in] | x | Coordinate of point along x axis at which to evaluate map. |
[in] | y | Coordinate of point along y axis at which to evaluate map. |
[in] | z | Coordinate of point along z axis at which to evaluate map. |
[in] | l | Index of map value component. |
OutsideValue
when input point is outside the map domain. Reimplemented in mirtk::PiecewiseLinearMap, mirtk::MeshlessHarmonicMap, and mirtk::MeshlessBiharmonicMap.
|
inline |
|
inline |
|
virtual |
Evaluate map at each point of a regular lattice
[out] | f | Defines 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] | l | Index of first map value component to store in output image. |
[in] | m | Piecewise linear complex (PLC) defining an arbitrary subset of the lattice points at which to evaluate the map. |
|
virtual |
Evaluate map at each point of a regular lattice
[out] | f | Defines 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] | l | Index of first map value component to store in output image. |
[in] | m | Piecewise linear complex (PLC) defining an arbitrary subset of the lattice points at which to evaluate the map. |