#include <itkMultipleValuedVnlCostFunctionAdaptor.h>
This class is an Adaptor that allows to pass itk::MultipleValuedCostFunctions to vnl_optimizers expecting a vnl_cost_function.
This class returns a single valued.
Definition at line 37 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
Inheritance diagram for itk::MultipleValuedVnlCostFunctionAdaptor:
Collaboration diagram for itk::MultipleValuedVnlCostFunctionAdaptor:Public Types | |
| using | DerivativeType = MultipleValuedCostFunction::DerivativeType |
| using | InternalDerivativeType = vnl_matrix<double> |
| using | InternalMeasureType = vnl_vector<double> |
| using | InternalParametersType = vnl_vector<double> |
| using | MeasureType = MultipleValuedCostFunction::MeasureType |
| using | ParametersType = MultipleValuedCostFunction::ParametersType |
| using | ScalesType = Array<double> |
Protected Member Functions | |
| void | ReportIteration (const EventObject &event) const |
Private Member Functions | |
| virtual const ScalesType & | GetInverseScales () const |
Private Attributes | |
| ParametersType | m_CachedCurrentParameters {} |
| DerivativeType | m_CachedDerivative {} |
| MeasureType | m_CachedValue {} |
| MultipleValuedCostFunction::Pointer | m_CostFunction {} |
| ScalesType | m_InverseScales {} |
| Object::Pointer | m_Reporter {} |
| bool | m_ScalesInitialized {} |
| using itk::MultipleValuedVnlCostFunctionAdaptor::DerivativeType = MultipleValuedCostFunction::DerivativeType |
Derivatives of the MultipleValuedCostFunction
Definition at line 56 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
| using itk::MultipleValuedVnlCostFunctionAdaptor::InternalDerivativeType = vnl_matrix<double> |
InternalGradientType type alias.
Definition at line 47 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
| using itk::MultipleValuedVnlCostFunctionAdaptor::InternalMeasureType = vnl_vector<double> |
InternalMeasureType type alias.
Definition at line 44 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
| using itk::MultipleValuedVnlCostFunctionAdaptor::InternalParametersType = vnl_vector<double> |
InternalParametersType type alias.
Definition at line 41 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
| using itk::MultipleValuedVnlCostFunctionAdaptor::MeasureType = MultipleValuedCostFunction::MeasureType |
MeasureType of the MultipleValuedCostFunction
Definition at line 50 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
| using itk::MultipleValuedVnlCostFunctionAdaptor::ParametersType = MultipleValuedCostFunction::ParametersType |
Parameters of the MultipleValuedCostFunction
Definition at line 53 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
| using itk::MultipleValuedVnlCostFunctionAdaptor::ScalesType = Array<double> |
Scales type alias
Definition at line 59 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
| itk::MultipleValuedVnlCostFunctionAdaptor::MultipleValuedVnlCostFunctionAdaptor | ( | unsigned int | spaceDimension, |
| unsigned int | numberOfValues ) |
Constructor with size
| unsigned long itk::MultipleValuedVnlCostFunctionAdaptor::AddObserver | ( | const EventObject & | event, |
| Command * | ) const |
This AddObserver method allows to simulate that this class derives from an itkObject for the purpose of reporting iteration events. The goal of this method is to allow ITK-vnl optimizer adaptors to get iteration events despite the fact that VNL does not provide callbacks.
|
virtual |
Delegate computation of value and gradient to the costFunction.
| void itk::MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalGradient | ( | const DerivativeType & | input, |
| InternalDerivativeType & | output ) |
Convert external derivative measures into internal type
| void itk::MultipleValuedVnlCostFunctionAdaptor::ConvertExternalToInternalMeasures | ( | const MeasureType & | input, |
| InternalMeasureType & | output ) |
Convert external measures into internal type
|
override |
Delegate computation of the value to the CostFunction.
| const ParametersType & itk::MultipleValuedVnlCostFunctionAdaptor::GetCachedCurrentParameters | ( | ) | const |
| const DerivativeType & itk::MultipleValuedVnlCostFunctionAdaptor::GetCachedDerivative | ( | ) | const |
| const MeasureType & itk::MultipleValuedVnlCostFunctionAdaptor::GetCachedValue | ( | ) | const |
|
inline |
Get the CostFunction deriving from MultipleValuedCostFunction
Definition at line 73 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
References m_CostFunction.
|
privatevirtual |
Get current parameters scaling.
| bool itk::MultipleValuedVnlCostFunctionAdaptor::GetUseGradient | ( | ) | const |
|
override |
Delegate computation of the gradient to the costFunction.
|
protected |
This method is intended to be called by the derived classes in order to notify of an iteration event to any Command/Observers
|
inline |
Set the CostFunction deriving from MultipleValuedCostFunction
Definition at line 66 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
References m_CostFunction.
| void itk::MultipleValuedVnlCostFunctionAdaptor::SetScales | ( | const ScalesType & | scales | ) |
Set current parameters scaling.
| void itk::MultipleValuedVnlCostFunctionAdaptor::SetUseGradient | ( | bool | ) |
Define if the Cost function should provide a customized Gradient computation or the gradient can be computed internally using a default approach
Referenced by UseGradientOff(), and UseGradientOn().
|
inline |
Definition at line 110 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
References SetUseGradient().
|
inline |
Definition at line 105 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
References SetUseGradient().
|
mutableprivate |
Definition at line 159 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
|
mutableprivate |
Definition at line 158 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
|
mutableprivate |
Definition at line 157 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
|
private |
Definition at line 151 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
Referenced by GetCostFunction(), and SetCostFunction().
|
private |
Definition at line 154 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
|
private |
Definition at line 155 of file itkMultipleValuedVnlCostFunctionAdaptor.h.
|
private |
Definition at line 153 of file itkMultipleValuedVnlCostFunctionAdaptor.h.