#include <TransformationApproximationError.h>
|
void | CenterPoints () |
| Subtract centroid from each point set.
|
|
virtual double | Get (int i) const |
|
virtual void | Get (double *x) const |
|
virtual void | Gradient (double *dx, double step=.0, bool *sgn_chg=NULL) |
|
virtual double | GradientNorm (const double *dx) const |
|
virtual int | NumberOfDOFs () const |
|
virtual void | Put (const double *x) |
|
virtual double | Step (double *dx) |
|
| TransformationApproximationError (class Transformation *, const double *, const double *, const double *, const double *, const double *, const double *, const double *, int) |
| Constructor.
|
|
virtual void | Update (bool gradient=true) |
|
virtual double | Value () |
| Evaluate objective function value.
|
|
virtual | ~TransformationApproximationError () |
| Destructor.
|
|
virtual void | AddConstraintGradient (double *dx, double step=.0, bool *sgn_chg=nullptr) |
|
virtual void | DataFidelityGradient (double *dx, double step=.0, bool *sgn_chg=nullptr) |
|
virtual double | Evaluate (double *dx=NULL, double step=.0, bool *sgn_chg=NULL) |
|
virtual void | GradientStep (const double *dx, double &min, double &max) const |
|
virtual bool | Upgrade () |
|
virtual | ~ObjectiveFunction ()=0 |
| Destructor.
|
|
void | AddObserver (Observer &) |
| Add observer.
|
|
void | Broadcast (Event, const void *=NULL) |
| Broadcast event to observers.
|
|
void | ClearObservers () |
| Delete all observers.
|
|
void | DeleteObserver (Observer &) |
| Delete observer.
|
|
void | NotifyObservers (Event, const void *=NULL) |
| Notify all observers about given event if this object has changed.
|
|
int | NumberOfObservers () const |
| Number of current observers.
|
|
virtual | ~Observable () |
| Destructor.
|
|
virtual const char * | NameOfClass () const =0 |
| Get name of class, which this object is an instance of.
|
|
virtual ParameterList | Parameter () const |
| Get parameter name/value pairs.
|
|
bool | Parameter (const ParameterList &) |
| Set parameters from name/value pairs.
|
|
virtual bool | Set (const char *name, const char *value) |
|
virtual | ~Object () |
| Destructor.
|
|
Mean-squared-error of transformation approximation
This objective function is minimized by Transformation::ApproximateDOFs to find the transformation parameters which minimize the mean squared error of the approximation.
Definition at line 40 of file TransformationApproximationError.h.
§ Get() [1/2]
virtual double mirtk::TransformationApproximationError::Get |
( |
int |
i | ) |
const |
|
virtual |
Get function parameter value
- Parameters
-
[in] | i | Function parameter (DoF) index. |
- Returns
- Value of specified function parameter (DoF).
Implements mirtk::ObjectiveFunction.
§ Get() [2/2]
virtual void mirtk::TransformationApproximationError::Get |
( |
double * |
x | ) |
const |
|
virtual |
Get function parameter values
This function can be used to store a backup of the current funtion parameter values before an update such that these can be restored using the Put member function if the update did not result in the desired change of the overall objective function value.
- Parameters
-
[in] | x | Function parameter (DoF) values. |
Implements mirtk::ObjectiveFunction.
§ Gradient()
virtual void mirtk::TransformationApproximationError::Gradient |
( |
double * |
dx, |
|
|
double |
step = .0 , |
|
|
bool * |
sgn_chg = NULL |
|
) |
| |
|
virtual |
Evaluate gradient of objective function w.r.t its DoFs
- Parameters
-
[in] | step | Step length for finite differences. |
[out] | dx | Gradient of objective function. |
[out] | sgn_chg | Whether function parameter value is allowed to change sign when stepping along the computed gradient. |
Implements mirtk::ObjectiveFunction.
§ GradientNorm()
virtual double mirtk::TransformationApproximationError::GradientNorm |
( |
const double * |
dx | ) |
const |
|
virtual |
Compute norm of gradient of objective function
This norm is used to define a unit for the step length used by gradient descent methods. It is, for example, the maximum absolute value norm for linear transformations and the maximum control point displacement for FFDs. The computation of the norm may be done after conjugating the gradient vector obtained using the Gradient member function.
- Parameters
-
[in] | dx | Gradient of objective function. |
Implements mirtk::ObjectiveFunction.
§ NumberOfDOFs()
virtual int mirtk::TransformationApproximationError::NumberOfDOFs |
( |
| ) |
const |
|
virtual |
§ Put()
virtual void mirtk::TransformationApproximationError::Put |
( |
const double * |
x | ) |
|
|
virtual |
Set function parameter values
This is function can be used to set the parameters of the objective function to particular values. In particular, it can be used to restore the function parameters after a failed incremental update which did not result in the desired improvement.
- Parameters
-
[in] | x | Function parameter (DoF) values. |
Implements mirtk::ObjectiveFunction.
§ Step()
virtual double mirtk::TransformationApproximationError::Step |
( |
double * |
dx | ) |
|
|
virtual |
Add change (i.e., scaled gradient) to each parameter value
This function updates each DoF of the objective function given a vector of corresponding changes, i.e., the computed gradient of the objective function w.r.t. these parameters or a desired change computed otherwise.
- Parameters
-
[in] | dx | Change of each function parameter (DoF) as computed by the Gradient member function and scaled by a chosen step length. |
- Returns
- Maximum change of function parameter.
Implements mirtk::ObjectiveFunction.
§ Update()
virtual void mirtk::TransformationApproximationError::Update |
( |
bool |
gradient = true | ) |
|
|
virtual |
Update internal state after change of parameters
- Parameters
-
[in] | gradient | Update also internal state required for evaluation of gradient of objective function. |
Reimplemented from mirtk::ObjectiveFunction.
The documentation for this class was generated from the following file: