20 #ifndef MIRTK_PointSetDistance_H 21 #define MIRTK_PointSetDistance_H 23 #include "mirtk/DataFidelity.h" 25 #include "mirtk/Array.h" 26 #include "mirtk/Vector3D.h" 27 #include "mirtk/PointSetDistanceMeasure.h" 28 #include "mirtk/RegisteredPointSet.h" 93 const char * =
"",
double = 1.0);
127 virtual void Update(
bool =
true);
136 GradientType *gradient) = 0;
152 const GradientType *np_gradient,
181 virtual void EvaluateGradient(
double *gradient,
double step,
double weight);
188 virtual void WriteDataSets(
const char *,
const char *,
bool =
true)
const;
191 virtual void WriteGradient(
const char *,
const char *)
const;
198 const GradientType *,
199 const Array<int> * = NULL)
const;
206 #endif // MIRTK_PointSetDistance_H Vector3D< double > GradientType
Type of gradient w.r.t a single transformed data point.
void AllocateGradientWrtTarget(int)
Allocate memory for (non-parametric) gradient w.r.t points of target.
virtual void Reinitialize()
virtual ~PointSetDistance()
Destructor.
virtual void ParametricGradient(const RegisteredPointSet *target, const GradientType *np_gradient, double *gradient, double weight)
virtual void WriteGradient(const char *, const char *) const
Write gradient of data fidelity term w.r.t each transformed input.
void CopyAttributes(const PointSetDistance &, int=-1, int=-1)
Copy attributes from other point set distance measure.
virtual void Initialize()
Initialize distance measure once input and parameters have been set.
mirtkPublicAggregateMacro(RegisteredPointSet, Target)
First point set.
static PointSetDistance * New(PointSetDistanceMeasure, const char *="", double=1.0)
Instantiate specified similarity measure.
virtual void EvaluateGradient(double *gradient, double step, double weight)
mirtkAttributeMacro(bool, InitialUpdate)
Whether Update has not been called since initialization.
mirtkComponentMacro(GradientType, GradientWrtTarget)
Memory for (non-parametric) gradient w.r.t points of target.
virtual void NonParametricGradient(const RegisteredPointSet *target, GradientType *gradient)=0
void AllocateGradientWrtSource(int)
Allocate memory for (non-parametric) gradient w.r.t points of source.
PointSetDistance & operator=(const PointSetDistance &)
Assignment operator.
PointSetDistance(const char *="", double=1.0)
Constructor.
virtual void Update(bool=true)
Update moving input points and internal state of distance measure.
virtual void WriteDataSets(const char *, const char *, bool=true) const
Write input of data fidelity term.