18#ifndef itkMultipleValuedVnlCostFunctionAdaptor_h
19#define itkMultipleValuedVnlCostFunctionAdaptor_h
22#include "vnl/vnl_least_squares_function.h"
23#include "ITKOptimizersExport.h"
68 m_CostFunction = costFunction;
75 return m_CostFunction;
107 this->SetUseGradient(
true);
112 this->SetUseGradient(
false);
153 bool m_ScalesInitialized{};
Array2D class representing a 2D array.
Superclass for callback/observer methods.
Abstraction of the Events used to communicating among filters and with GUIs.
This class is a base for the CostFunctions returning a multiple values.
Superclass::ParametersType ParametersType
Array< double > MeasureType
Array2D< double > DerivativeType
This class is an Adaptor that allows to pass itk::MultipleValuedCostFunctions to vnl_optimizers expec...
vnl_matrix< double > InternalDerivativeType
const MeasureType & GetCachedValue() const
void ConvertExternalToInternalMeasures(const MeasureType &input, InternalMeasureType &output)
void ReportIteration(const EventObject &event) const
virtual void compute(const InternalParametersType &x, InternalMeasureType *ff, InternalDerivativeType *g)
MultipleValuedCostFunction::ParametersType ParametersType
MultipleValuedVnlCostFunctionAdaptor(unsigned int spaceDimension, unsigned int numberOfValues)
const DerivativeType & GetCachedDerivative() const
void SetScales(const ScalesType &scales)
void ConvertExternalToInternalGradient(const DerivativeType &input, InternalDerivativeType &output)
void gradf(const InternalParametersType &inparameters, InternalDerivativeType &gradient) override
void SetCostFunction(MultipleValuedCostFunction *costFunction)
const MultipleValuedCostFunction * GetCostFunction() const
unsigned long AddObserver(const EventObject &event, Command *) const
const ParametersType & GetCachedCurrentParameters() const
void f(const InternalParametersType &inparameters, InternalMeasureType &measures) override
vnl_vector< double > InternalMeasureType
void SetUseGradient(bool)
bool GetUseGradient() const
vnl_vector< double > InternalParametersType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....