19#ifndef itkScaledSingleValuedCostFunction_h
20#define itkScaledSingleValuedCostFunction_h
22#include "itkSingleValuedCostFunction.h"
23#include "itkIntTypes.h"
57 using Superclass::MeasureType;
58 using Superclass::DerivativeType;
59 using Superclass::ParametersType;
71 GetValue(
const ParametersType & parameters)
const override;
78 GetDerivative(
const ParametersType & parameters, DerivativeType & derivative)
const override;
84 DerivativeType & derivative)
const override;
114 itkSetMacro(UseScales,
bool);
117 itkGetConstMacro(UseScales,
bool);
120 itkBooleanMacro(NegateCostFunction);
123 itkSetMacro(NegateCostFunction,
bool);
125 itkGetConstMacro(NegateCostFunction,
bool);
143 PrintSelf(std::ostream & os, Indent indent)
const override;
A cost function that applies a scaling to another cost function.
virtual void SetScales(const ScalesType &scales)
itkGetModifiableObjectMacro(UnscaledCostFunction, Superclass)
virtual void ConvertUnscaledToScaledParameters(ParametersType ¶meters) const
SingleValuedCostFunction Superclass
Array< double > ScalesType
ITK_DISALLOW_COPY_AND_MOVE(ScaledSingleValuedCostFunction)
virtual void ConvertScaledToUnscaledParameters(ParametersType ¶meters) const
Superclass::Pointer SingleValuedCostFunctionPointer
SingleValuedCostFunctionPointer m_UnscaledCostFunction
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetSquaredScales(const ScalesType &squaredScales)
bool m_NegateCostFunction
ScaledSingleValuedCostFunction()
~ScaledSingleValuedCostFunction() override=default
void GetDerivative(const ParametersType ¶meters, DerivativeType &derivative) const override
SmartPointer< const Self > ConstPointer
NumberOfParametersType GetNumberOfParameters() const override
MeasureType GetValue(const ParametersType ¶meters) const override
ScalesType m_SquaredScales
void GetValueAndDerivative(const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const override