18#ifndef itkSingleValuedVnlCostFunctionAdaptor_h
19#define itkSingleValuedVnlCostFunctionAdaptor_h
22#include "vnl/vnl_cost_function.h"
23#include "ITKOptimizersExport.h"
68 m_CostFunction = costFunction;
75 return m_CostFunction;
115 m_NegateCostFunction =
true;
120 m_NegateCostFunction =
false;
154 bool m_ScalesInitialized{};
156 bool m_NegateCostFunction{};
Array class with size defined at construction time.
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 single value.
Array< ParametersValueType > DerivativeType
Superclass::ParametersType ParametersType
This class is an Adaptor that allows to pass itk::SingleValuedCostFunctions to vnl_optimizers expecti...
const MeasureType & GetCachedValue() const
const ParametersType & GetCachedCurrentParameters() const
void compute(const InternalParametersType &x, InternalMeasureType *fun, InternalDerivativeType *g) override
vnl_vector< double > InternalDerivativeType
void SetNegateCostFunction(bool flag)
vnl_vector< double > InternalParametersType
InternalMeasureType f(const InternalParametersType &inparameters) override
void NegateCostFunctionOff()
SingleValuedVnlCostFunctionAdaptor(unsigned int spaceDimension)
bool GetNegateCostFunction() const
void ReportIteration(const EventObject &event) const
SingleValuedCostFunction::MeasureType MeasureType
unsigned long AddObserver(const EventObject &event, Command *) const
SingleValuedCostFunction::ParametersType ParametersType
void SetCostFunction(SingleValuedCostFunction *costFunction)
void ConvertExternalToInternalGradient(const DerivativeType &input, InternalDerivativeType &output) const
void gradf(const InternalParametersType &inparameters, InternalDerivativeType &gradient) override
void SetScales(const ScalesType &scales)
double InternalMeasureType
void NegateCostFunctionOn()
const DerivativeType & GetCachedDerivative() const
const SingleValuedCostFunction * GetCostFunction() const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....