18 #ifndef __itkSingleValuedVnlCostFunctionAdaptor_h
19 #define __itkSingleValuedVnlCostFunctionAdaptor_h
22 #include "vnl/vnl_cost_function.h"
37 public vnl_cost_function
67 { m_CostFunction = costFunction; }
71 {
return m_CostFunction; }
74 virtual InternalMeasureType f(
const InternalParametersType & inparameters);
77 virtual void gradf(
const InternalParametersType & inparameters,
78 InternalDerivativeType & gradient);
81 virtual void compute(
const InternalParametersType & x,
82 InternalMeasureType *f,
83 InternalDerivativeType *g);
86 void ConvertExternalToInternalGradient(
87 const DerivativeType & input,
88 InternalDerivativeType & output)
const;
91 void SetScales(
const ScalesType & scales);
101 void SetNegateCostFunction(
bool value);
103 bool GetNegateCostFunction()
const;
118 const MeasureType & GetCachedValue()
const;
120 const DerivativeType & GetCachedDerivative()
const;
122 const ParametersType & GetCachedCurrentParameters()
const;
128 void ReportIteration(
const EventObject & event)
const;