20 #ifndef MIRTK_LinearFixedBoundarySurfaceMapper_H 21 #define MIRTK_LinearFixedBoundarySurfaceMapper_H 23 #include "mirtk/FixedBoundarySurfaceMapper.h" 25 #include "mirtk/Array.h" 27 #include "vtkSmartPointer.h" 28 #include "vtkDataArray.h" 61 mirtkPublicAttributeMacro(
int, NumberOfIterations);
64 mirtkPublicAttributeMacro(
double, Tolerance);
67 mirtkAttributeMacro(Array<int>, PointIndex);
70 mirtkAttributeMacro(Array<int>, FreePoints);
73 mirtkAttributeMacro(Array<int>, FixedPoints);
76 mirtkAttributeMacro(vtkSmartPointer<vtkDataArray>, Values);
163 double GetValue(
int i,
int j = 0)
const;
194 void SetValue(
int i,
int j,
double v);
221 return static_cast<int>(_FreePoints.size());
227 return static_cast<int>(_FixedPoints.size());
233 const int i = _PointIndex[ptId];
234 return (i < 0 ? -1 : i);
240 return _FreePoints[i];
252 const int i = _PointIndex[ptId];
253 return (i < 0 ? (-i) - 1 : -1);
259 return _FixedPoints[i];
271 return _Values->GetComponent(static_cast<vtkIdType>(i), j);
289 _Values->SetComponent(static_cast<vtkIdType>(i), 0, v);
295 _Values->SetComponent(static_cast<vtkIdType>(i), j, v);
313 #endif // MIRTK_LinearFixedBoundarySurfaceMapper_H int NumberOfFreePoints() const
Number of surface points with free map value.
bool IsFixedPoint(int i) const
Whether the map value of the specified surface point is fixed.
void SetValue(int i, double v)
int FixedPointId(int i) const
double GetFixedValue(int i, int j=0) const
virtual void Finalize()
Assemble output surface map.
LinearFixedBoundarySurfaceMapper & operator=(const LinearFixedBoundarySurfaceMapper &)
Assignment operator.
virtual void Initialize()
Initialize filter after input and parameters are set.
LinearFixedBoundarySurfaceMapper()
Default constructor.
bool IsFreePoint(int i) const
Whether the map value of the specified surface point is free.
void SetFreeValue(int i, double v)
double GetValue(int i, int j=0) const
int NumberOfFixedPoints() const
Number of surface points with fixed map value.
virtual ~LinearFixedBoundarySurfaceMapper()
Destructor.
double GetFreeValue(int i, int j=0) const
int FreePointIndex(int i) const
int FixedPointIndex(int i) const
int FreePointId(int i) const
virtual void ComputeMap()=0
Compute map values at interior points.