#include <PiecewiseLinearMap.h>
Public Member Functions | |
virtual void | BoundingBox (double &x1, double &y1, double &z1, double &x2, double &y2, double &z2) const |
vtkSmartPointer< vtkDataSet > | Codomain () const |
virtual bool | Evaluate (double *v, double x, double y, double z=0) const |
virtual double | Evaluate (double x, double y, double z=0, int l=0) const |
void | GetPoint (int i, double &x, double &y) const |
void | GetPoint (int i, double &x, double &y, double &z) const |
void | GetPoint (int i, double p[3]) const |
void | GetValue (int i, double *v) const |
virtual void | Initialize () |
Initialize map after inputs and parameters are set. | |
virtual Mapping * | NewCopy () const |
Make deep copy of this volumetric map. | |
virtual int | NumberOfComponents () const |
Dimension of codomain, i.e., number of output values. | |
int | NumberOfPoints () const |
Number of discrete points at which map values are given. | |
PiecewiseLinearMap & | operator= (const PiecewiseLinearMap &) |
Assignment operator. | |
PiecewiseLinearMap () | |
Default constructor. | |
PiecewiseLinearMap (const PiecewiseLinearMap &) | |
Copy constructor. | |
class Point | Point (int i) const |
virtual bool | Read (const char *) |
Read map from file. | |
double | Value (int i, int l=0) const |
virtual bool | Write (const char *) const |
Write map to file. | |
virtual | ~PiecewiseLinearMap () |
Destructor. | |
Public Member Functions inherited from mirtk::Mapping | |
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 |
void | BoundingBox (double bounds[6]) const |
void | BoundingBox (Point &p1, Point &p2) const |
bool | Evaluate (double *v, const double p[3]) const |
bool | Evaluate (double *v, const Point &p) 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 int | NumberOfArguments () const |
Dimension of map domain. | |
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. | |
Additional Inherited Members | |
Static Public Member Functions inherited from mirtk::Mapping | |
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 inherited from mirtk::Mapping | |
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 |
Static Protected Member Functions inherited from mirtk::Object | |
template<typename... Args> | |
static void | ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args) |
Piecewise linear map defined at mesh nodes
This map is defined by its values at discrete mesh nodes. Intermediate values are interpolated using the weights of the respective mesh cell which this point belongs to. If the point is not contained in any mesh cell, the point is mapped to a constant outside value.
A surface map is commonly represented by the texture coordinates of a triangular surface mesh, while a tetrahedral mesh is commonly used to parameterize a volumetric map. These maps are usually computed using a finite element method (FEM).
Definition at line 48 of file PiecewiseLinearMap.h.
|
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. |
Implements mirtk::Mapping.
vtkSmartPointer<vtkDataSet> mirtk::PiecewiseLinearMap::Codomain | ( | ) | const |
Mesh discretizing the map domain with mapped mesh points
|
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. |
Implements mirtk::Mapping.
|
virtual |
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 from mirtk::Mapping.
|
inline |
Get i-th domain mesh point
[in] | i | Point index. |
[out] | x | Point coordinate along x axis. |
[out] | y | Point coordinate along y axis. |
Definition at line 231 of file PiecewiseLinearMap.h.
|
inline |
|
inline |
Get i-th domain mesh point
Definition at line 225 of file PiecewiseLinearMap.h.
|
inline |
Evaluate map at a given mesh point
[in] | i | Point index. |
[out] | v | Map value. |
Definition at line 255 of file PiecewiseLinearMap.h.
|
inline |
Get i-th domain mesh point
[in] | i | Point index. |
Definition at line 247 of file PiecewiseLinearMap.h.
|
inline |
Evaluate map at a given mesh point
[in] | i | Point index. |
[in] | l | Index of map value component. |
Definition at line 261 of file PiecewiseLinearMap.h.