20 #ifndef MIRTK_MeshlessMap_H 21 #define MIRTK_MeshlessMap_H 23 #include "mirtk/Mapping.h" 25 #include "mirtk/Math.h" 26 #include "mirtk/Matrix.h" 27 #include "mirtk/PointSet.h" 51 mirtkPublicAttributeMacro(
PointSet, SourcePoints);
56 mirtkPublicAttributeMacro(
Matrix, Coefficients);
97 virtual void BoundingBox(
double &x1,
double &y1,
double &z1,
98 double &x2,
double &y2,
double &z2)
const;
138 for (
int i = 0; i < _SourcePoints.Size(); ++i) {
139 const Point &q = _SourcePoints(i);
147 _SourcePoints.Add(p);
148 _Coefficients.Resize(_SourcePoints.Size(), _Coefficients.Cols());
155 return _SourcePoints.Size();
161 return _Coefficients.Cols();
167 #endif // MIRTK_MeshlessMap_H virtual void ReadMap(Cifstream &)
Read map attributes and parameters from file stream.
void BoundingBox(double &x1, double &y1, double &x2, double &y2) const
bool AddSourcePoint(double p[3], double tol=.0)
virtual void Initialize()
Initialize map after inputs and parameters are set.
int NumberOfSourcePoints() const
Get number of source points.
double _x
x coordinate of Point
MIRTKCU_API bool fequal(double a, double b, double tol=1e-12)
virtual int NumberOfComponents() const
Dimension of codomain, i.e., number of output values.
virtual void BoundingBox(double &x1, double &y1, double &z1, double &x2, double &y2, double &z2) const
MeshlessMap()
Default constructor.
virtual void WriteMap(Cofstream &) const
Write map attributes and parameters to file stream.
double _z
z coordinate of Point
MeshlessMap & operator=(const MeshlessMap &)
Assignment operator.
double _y
y coordinate of Point
virtual ~MeshlessMap()
Destructor.