20 #ifndef MIRTK_PointCorrespondenceDistance_H 21 #define MIRTK_PointCorrespondenceDistance_H 23 #include "mirtk/PointSetDistance.h" 25 #include "mirtk/Array.h" 26 #include "mirtk/EventDelegate.h" 27 #include "mirtk/PointCorrespondence.h" 28 #include "mirtk/RadialErrorFunction.h" 30 #include "mirtk/TestProd.h" 169 virtual void Update(
bool =
true);
248 virtual void WriteDataSets(
const char *,
const char *,
bool =
true)
const;
251 virtual void WriteGradient(
const char *,
const char *)
const;
266 #endif // MIRTK_PointCorrespondenceDistance_H
mirtkComponentMacro(PointCorrespondence, Correspondence)
Point correspondence map.
virtual void WriteGradient(const char *, const char *) const
Write gradient of data fidelity term w.r.t each transformed input.
virtual bool Upgrade()
Update energy term after convergence.
virtual void Initialize()
Initialize error measure once input and parameters have been set.
virtual ~PointCorrespondenceDistance()
Destructor.
virtual ParameterList Parameter() const
Get parameter key/value as string map.
virtual void NonParametricGradient(const RegisteredPointSet *source, GradientType *gradient)
virtual void Update(bool=true)
Update moving input points and internal state of distance measure.
Array< Pair< string, string > > ParameterList
Ordered list of parameter name/value pairs.
void EvaluateGradient(double *gradient, double step, double weight)
PointCorrespondenceDistance(const char *, double, PointCorrespondence *, RadialErrorFunction *=NULL)
Construct distance with given default point correspondence type and error function.
mirtkPublicAttributeMacro(double, TargetSampleDistance)
Approximate distance between sampled target points.
virtual void ParametricGradient(const RegisteredPointSet *source, const GradientType *np_gradient, double *gradient, double weight)
virtual ParameterList Parameter() const
Get parameter key/value as string map.
Point correspondence distance measure.
virtual void WriteDataSets(const char *, const char *, bool=true) const
Write input of data fidelity term.
virtual void Reinitialize()
Reinitialize error measure after change of input topology.
virtual double Evaluate()
Evaluate unweighted energy term.
void SamplePoints()
Sample point sets.
bool DoEvaluateTargetError() const
Whether to evaluate target to source error.
Event
Events that can be observed.
bool DoEvaluateSourceError() const
Whether to evaluate source to target error.
PointCorrespondenceDistance & operator=(const PointCorrespondenceDistance &)
Assignment operator.
virtual bool SetWithoutPrefix(const char *, const char *)
Set parameter value from string.
EventDelegate _EventDelegate
Forwards correspondence map event messages to observers of energy term.
virtual void WriteDataSet(const char *, const RegisteredPointSet *, const Array< int > &, const PointCorrespondence *) const
Write given input data set to specified file.
void ForwardEvent(Observable *, Event, const void *)
Forward point correspondence map event.
mirtkAttributeMacro(Array< int >, TargetSample)
Indices of sampled target points.