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;
80 f(
const InternalParametersType & inparameters)
override;
84 gradf(
const InternalParametersType & inparameters, InternalDerivativeType & gradient)
override;
88 compute(
const InternalParametersType & x, InternalMeasureType * fun, InternalDerivativeType * g)
override;
92 ConvertExternalToInternalGradient(
const DerivativeType & input, InternalDerivativeType & output)
const;
96 SetScales(
const ScalesType & scales);
107 SetNegateCostFunction(
bool flag);
110 GetNegateCostFunction()
const;
115 m_NegateCostFunction =
true;
120 m_NegateCostFunction =
false;
135 GetCachedValue()
const;
137 const DerivativeType &
138 GetCachedDerivative()
const;
140 const ParametersType &
141 GetCachedCurrentParameters()
const;
151 itkGetConstReferenceMacro(InverseScales, ScalesType);
154 bool m_ScalesInitialized{};
156 bool m_NegateCostFunction{};