#include <itkScaledSingleValuedCostFunction.h>
A cost function that applies a scaling to another cost function.
This class can be used to adapt an existing, badly scaled, cost function.
By default it does not apply any scaling. Use the method SetUseScales(true) to enable the use of scales.
Definition at line 39 of file itkScaledSingleValuedCostFunction.h.
Public Types | |
using | ConstPointer = SmartPointer<const Self> |
using | NumberOfParametersType = unsigned int |
using | Pointer = SmartPointer<Self> |
using | ScalesType = Array<double> |
using | Self = ScaledSingleValuedCostFunction |
using | SingleValuedCostFunctionPointer = Superclass::Pointer |
using | Superclass = SingleValuedCostFunction |
Public Member Functions | |
virtual void | ConvertScaledToUnscaledParameters (ParametersType ¶meters) const |
virtual void | ConvertUnscaledToScaledParameters (ParametersType ¶meters) const |
virtual const char * | GetClassName () const |
void | GetDerivative (const ParametersType ¶meters, DerivativeType &derivative) const override |
virtual bool | GetNegateCostFunction () const |
NumberOfParametersType | GetNumberOfParameters () const override |
virtual const ScalesType & | GetScales () |
virtual const ScalesType & | GetSquaredScales () |
virtual bool | GetUseScales () const |
MeasureType | GetValue (const ParametersType ¶meters) const override |
void | GetValueAndDerivative (const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const override |
ITK_DISALLOW_COPY_AND_MOVE (ScaledSingleValuedCostFunction) | |
itkGetModifiableObjectMacro (UnscaledCostFunction, Superclass) | |
virtual void | NegateCostFunctionOff () |
virtual void | NegateCostFunctionOn () |
virtual void | SetNegateCostFunction (bool _arg) |
virtual void | SetScales (const ScalesType &scales) |
virtual void | SetSquaredScales (const ScalesType &squaredScales) |
virtual void | SetUnscaledCostFunction (Superclass *_arg) |
virtual void | SetUseScales (bool _arg) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ScaledSingleValuedCostFunction () | |
~ScaledSingleValuedCostFunction () override=default | |
Private Attributes | |
bool | m_NegateCostFunction { false } |
ScalesType | m_Scales {} |
ScalesType | m_SquaredScales {} |
SingleValuedCostFunctionPointer | m_UnscaledCostFunction { nullptr } |
bool | m_UseScales { false } |
using itk::ScaledSingleValuedCostFunction::ConstPointer = SmartPointer<const Self> |
Definition at line 48 of file itkScaledSingleValuedCostFunction.h.
using itk::ScaledSingleValuedCostFunction::NumberOfParametersType = unsigned int |
Definition at line 62 of file itkScaledSingleValuedCostFunction.h.
using itk::ScaledSingleValuedCostFunction::Pointer = SmartPointer<Self> |
Definition at line 47 of file itkScaledSingleValuedCostFunction.h.
using itk::ScaledSingleValuedCostFunction::ScalesType = Array<double> |
Definition at line 65 of file itkScaledSingleValuedCostFunction.h.
Standard ITK-stuff.
Definition at line 45 of file itkScaledSingleValuedCostFunction.h.
using itk::ScaledSingleValuedCostFunction::SingleValuedCostFunctionPointer = Superclass::Pointer |
Definition at line 63 of file itkScaledSingleValuedCostFunction.h.
using itk::ScaledSingleValuedCostFunction::Superclass = SingleValuedCostFunction |
Definition at line 46 of file itkScaledSingleValuedCostFunction.h.
|
protected |
The constructor.
|
overrideprotecteddefault |
The destructor.
|
virtual |
Convert the parameters from scaled to unscaled: x = y/s.
|
virtual |
Convert the parameters from unscaled to scaled: y = x*s.
|
virtual |
Run-time type information (and related methods).
|
override |
Divide the parameters by the scales, call the GetDerivative routine of the unscaled cost function and divide the resulting derivative by the scales.
|
virtual |
Get the flag to negate the cost function or not.
|
override |
Ask the UnscaledCostFunction how many parameters it has.
|
virtual |
Get the scales.
|
virtual |
The ITK convention is to use the squared scales. This function returns the squared actual scales.
|
virtual |
Get the flag to use scales or not.
|
override |
Divide the parameters by the scales and call the GetValue routine of the unscaled cost function.
|
override |
Same procedure as in GetValue and GetDerivative.
itk::ScaledSingleValuedCostFunction::ITK_DISALLOW_COPY_AND_MOVE | ( | ScaledSingleValuedCostFunction | ) |
itk::ScaledSingleValuedCostFunction::itkGetModifiableObjectMacro | ( | UnscaledCostFunction | , |
Superclass | ) |
Get the cost function that needs scaling.
|
virtual |
|
virtual |
Set the flag to negate the cost function or not.
|
static |
Method for creation through the object factory.
|
overrideprotected |
PrintSelf.
|
virtual |
Set the flag to negate the cost function or not.
|
virtual |
Set the scales. Also computes the squared scales, just in case users call GetSquaredScales (for compatibility with the ITK convention).
|
virtual |
The ITK convention is to use the squared scales. This function takes the square root of the input scales and sets them as the the actual scales
|
virtual |
Set the cost function that needs scaling.
|
virtual |
Set the flag to use scales or not.
|
private |
Definition at line 151 of file itkScaledSingleValuedCostFunction.h.
|
private |
Member variables.
Definition at line 147 of file itkScaledSingleValuedCostFunction.h.
|
private |
Definition at line 148 of file itkScaledSingleValuedCostFunction.h.
|
private |
Definition at line 149 of file itkScaledSingleValuedCostFunction.h.
|
private |
Definition at line 150 of file itkScaledSingleValuedCostFunction.h.
Generated on 2024-07-17 for elastix by 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) |