20 #ifndef MIRTK_BoundaryMapper_H 21 #define MIRTK_BoundaryMapper_H 23 #include "mirtk/Object.h" 25 #include "mirtk/Matrix.h" 26 #include "mirtk/Memory.h" 27 #include "mirtk/SurfaceBoundary.h" 28 #include "mirtk/PiecewiseLinearMap.h" 52 mirtkPublicAttributeMacro(SharedPtr<SurfaceBoundary>, Boundary);
58 mirtkAttributeMacro(
Matrix, Values);
61 mirtkReadOnlyAttributeMacro(SharedPtr<PiecewiseLinearMap>, Output);
161 const int dim = _Values.Rows();
162 const double *value = _Values.Col(i);
163 for (
int j = 0; j < dim; ++j) {
164 if (
IsNaN(value[j]))
return false;
172 _Values.Col(i)[j] = v;
190 const int i = _Boundary->Find(ptId);
197 #endif // MIRTK_BoundaryMapper_H virtual void ComputeMap()=0
Assign map values to boundary points of surface mesh.
double GetSurfaceValue(int ptId, int j=0) const
virtual BoundaryMapper * NewCopy() const =0
Create new copy of this instance.
void SetBoundaryValue(int i, double v)
BoundaryMapper & operator=(const BoundaryMapper &)
Assignment operator.
MIRTKCU_API bool IsNaN(double x)
Check if floating point value is not a number (NaN)
virtual ~BoundaryMapper()
Destructor.
virtual void Run()
Compute boundary map values.
double GetBoundaryValue(int i, int j=0) const
virtual void Initialize()
Initialize filter after input and parameters are set.
virtual int NumberOfComponents() const
Number of map value components.
BoundaryMapper()
Default constructor.
bool HasBoundaryValue(int i) const
virtual void Finalize()
Finalize boundary map.