ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | List of all members

#include <itkSingleValuedNonLinearVnlOptimizer.h>

+ Inheritance diagram for itk::SingleValuedNonLinearVnlOptimizer:
+ Collaboration diagram for itk::SingleValuedNonLinearVnlOptimizer:

Public Types

using CommandType = ReceptorMemberCommand< Self >
 
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = SingleValuedNonLinearVnlOptimizer
 
using Superclass = SingleValuedNonLinearOptimizer
 
- Public Types inherited from itk::SingleValuedNonLinearOptimizer
using ConstPointer = SmartPointer< const Self >
 
using CostFunctionPointer = CostFunctionType::Pointer
 
using CostFunctionType = SingleValuedCostFunction
 
using DerivativeType = CostFunctionType::DerivativeType
 
using MeasureType = CostFunctionType::MeasureType
 
using ParametersType = Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using Self = SingleValuedNonLinearOptimizer
 
using Superclass = NonLinearOptimizer
 
- Public Types inherited from itk::NonLinearOptimizer
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using ScalesType = Superclass::ScalesType
 
using Self = NonLinearOptimizer
 
using Superclass = Optimizer
 
- Public Types inherited from itk::Optimizer
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = OptimizerParameters< double >
 
using Pointer = SmartPointer< Self >
 
using ScalesType = Array< double >
 
using Self = Optimizer
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual const char * GetNameOfClass () const
 
void SetCostFunction (SingleValuedCostFunction *costFunction) override=0
 
- Public Member Functions inherited from itk::SingleValuedNonLinearOptimizer
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const CostFunctionTypeGetCostFunction () const
 
virtual CostFunctionTypeGetModifiableCostFunction ()
 
MeasureType GetValue (const ParametersType &parameters) const
 
virtual void SetCostFunction (CostFunctionType *costFunction)
 
- Public Member Functions inherited from itk::Optimizer
virtual const ParametersTypeGetInitialPosition () const
 
virtual void SetInitialPosition (const ParametersType &param)
 
void SetScales (const ScalesType &scales)
 
virtual const ScalesTypeGetScales () const
 
virtual const ScalesTypeGetInverseScales () const
 
virtual const ParametersTypeGetCurrentPosition () const
 
virtual void StartOptimization ()
 
virtual const std::string GetStopConditionDescription () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
using CostFunctionAdaptorType = SingleValuedVnlCostFunctionAdaptor
 
CostFunctionAdaptorTypem_CostFunctionAdaptor
 
bool m_Maximize
 
CommandType::Pointer m_Command
 
ParametersType m_CachedCurrentPosition
 
MeasureType m_CachedValue
 
DerivativeType m_CachedDerivative
 
virtual const bool & GetMaximize () const
 
virtual void SetMaximize (bool _arg)
 
virtual void MaximizeOn ()
 
virtual void MaximizeOff ()
 
bool GetMinimize () const
 
void SetMinimize (bool v)
 
void MinimizeOn ()
 
void MinimizeOff ()
 
virtual const MeasureTypeGetCachedValue () const
 
virtual const DerivativeTypeGetCachedDerivative () const
 
virtual const ParametersTypeGetCachedCurrentPosition () const
 
 SingleValuedNonLinearVnlOptimizer ()
 
 ~SingleValuedNonLinearVnlOptimizer () override
 
void SetCostFunctionAdaptor (CostFunctionAdaptorType *adaptor)
 
const CostFunctionAdaptorTypeGetCostFunctionAdaptor () const
 
CostFunctionAdaptorTypeGetCostFunctionAdaptor ()
 
CostFunctionAdaptorTypeGetNonConstCostFunctionAdaptor () const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void IterationReport (const EventObject &event)
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::SingleValuedNonLinearOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::NonLinearOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Optimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Member Functions inherited from itk::SingleValuedNonLinearOptimizer
 SingleValuedNonLinearOptimizer ()
 
 ~SingleValuedNonLinearOptimizer () override=default
 
- Protected Member Functions inherited from itk::NonLinearOptimizer
 NonLinearOptimizer ()=default
 
 ~NonLinearOptimizer () override
 
- Protected Member Functions inherited from itk::Optimizer
 Optimizer ()
 
 ~Optimizer () override=default
 
virtual void SetCurrentPosition (const ParametersType &param)
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::SingleValuedNonLinearOptimizer
CostFunctionPointer m_CostFunction
 
- Protected Attributes inherited from itk::Optimizer
bool m_ScalesInitialized { false }
 
ParametersType m_CurrentPosition
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

This class is a base for the Optimization methods that optimize a single valued function.

It is an Adaptor class for optimizers provided by the vnl library

Definition at line 37 of file itkSingleValuedNonLinearVnlOptimizer.h.

Member Typedef Documentation

◆ CommandType

Command observer that will interact with the ITKVNL cost-function adaptor in order to generate iteration events. This will allow to overcome the limitation of VNL optimizers not offering callbacks for every iteration

Definition at line 55 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ ConstPointer

Definition at line 46 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ CostFunctionAdaptorType

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 110 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ Pointer

Definition at line 45 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ Self

Standard class type aliases.

Definition at line 43 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ Superclass

Definition at line 44 of file itkSingleValuedNonLinearVnlOptimizer.h.

Constructor & Destructor Documentation

◆ SingleValuedNonLinearVnlOptimizer()

itk::SingleValuedNonLinearVnlOptimizer::SingleValuedNonLinearVnlOptimizer ( )
protected

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ ~SingleValuedNonLinearVnlOptimizer()

itk::SingleValuedNonLinearVnlOptimizer::~SingleValuedNonLinearVnlOptimizer ( )
overrideprotected

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Member Function Documentation

◆ GetCachedCurrentPosition()

virtual const ParametersType& itk::SingleValuedNonLinearVnlOptimizer::GetCachedCurrentPosition ( ) const
virtual

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ GetCachedDerivative()

virtual const DerivativeType& itk::SingleValuedNonLinearVnlOptimizer::GetCachedDerivative ( ) const
virtual

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ GetCachedValue()

virtual const MeasureType& itk::SingleValuedNonLinearVnlOptimizer::GetCachedValue ( ) const
virtual

Return Cached Values. These method have the advantage of not triggering a recomputation of the metric value, but it has the disadvantage of returning a value that may not be the one corresponding to the current parameters. For GUI update purposes, this method is a good option, for mathematical validation you should rather call GetValue().

◆ GetCostFunctionAdaptor() [1/2]

CostFunctionAdaptorType* itk::SingleValuedNonLinearVnlOptimizer::GetCostFunctionAdaptor ( )
protected

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ GetCostFunctionAdaptor() [2/2]

const CostFunctionAdaptorType* itk::SingleValuedNonLinearVnlOptimizer::GetCostFunctionAdaptor ( ) const
protected

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ GetMaximize()

virtual const bool& itk::SingleValuedNonLinearVnlOptimizer::GetMaximize ( ) const
virtual

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ GetMinimize()

bool itk::SingleValuedNonLinearVnlOptimizer::GetMinimize ( ) const
inline

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 75 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ GetNameOfClass()

virtual const char* itk::SingleValuedNonLinearVnlOptimizer::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Reimplemented in itk::LBFGSOptimizer, itk::AmoebaOptimizer, itk::LBFGSBOptimizer, and itk::ConjugateGradientOptimizer.

◆ GetNonConstCostFunctionAdaptor()

CostFunctionAdaptorType* itk::SingleValuedNonLinearVnlOptimizer::GetNonConstCostFunctionAdaptor ( ) const
protected

The purpose of this method is to get around the lack of const-correctness in VNL cost-functions and optimizers

◆ IterationReport()

void itk::SingleValuedNonLinearVnlOptimizer::IterationReport ( const EventObject event)
private

Callback function for the Command Observer

◆ MaximizeOff()

virtual void itk::SingleValuedNonLinearVnlOptimizer::MaximizeOff ( )
virtual

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ MaximizeOn()

virtual void itk::SingleValuedNonLinearVnlOptimizer::MaximizeOn ( )
virtual

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ MinimizeOff()

void itk::SingleValuedNonLinearVnlOptimizer::MinimizeOff ( )
inline

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 90 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ MinimizeOn()

void itk::SingleValuedNonLinearVnlOptimizer::MinimizeOn ( )
inline

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 85 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ PrintSelf()

void itk::SingleValuedNonLinearVnlOptimizer::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Print out internal state

Reimplemented from itk::SingleValuedNonLinearOptimizer.

◆ SetCostFunction()

void itk::SingleValuedNonLinearVnlOptimizer::SetCostFunction ( SingleValuedCostFunction costFunction)
overridepure virtual

Set the cost Function. This method has to be overloaded by derived classes because the CostFunctionAdaptor requires to know the number of parameters at construction time. This number of parameters is obtained at run-time from the itkCostFunction. As a consequence each derived optimizer should construct its own CostFunctionAdaptor when overloading this method

Implemented in itk::LBFGSOptimizer, itk::LBFGSBOptimizer, itk::AmoebaOptimizer, and itk::ConjugateGradientOptimizer.

◆ SetCostFunctionAdaptor()

void itk::SingleValuedNonLinearVnlOptimizer::SetCostFunctionAdaptor ( CostFunctionAdaptorType adaptor)
protected

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ SetMaximize()

virtual void itk::SingleValuedNonLinearVnlOptimizer::SetMaximize ( bool  _arg)
virtual

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

◆ SetMinimize()

void itk::SingleValuedNonLinearVnlOptimizer::SetMinimize ( bool  v)
inline

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 80 of file itkSingleValuedNonLinearVnlOptimizer.h.

Member Data Documentation

◆ m_CachedCurrentPosition

ParametersType itk::SingleValuedNonLinearVnlOptimizer::m_CachedCurrentPosition
mutableprivate

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 141 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ m_CachedDerivative

DerivativeType itk::SingleValuedNonLinearVnlOptimizer::m_CachedDerivative
mutableprivate

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 143 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ m_CachedValue

MeasureType itk::SingleValuedNonLinearVnlOptimizer::m_CachedValue
mutableprivate

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 142 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ m_Command

CommandType::Pointer itk::SingleValuedNonLinearVnlOptimizer::m_Command
private

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 139 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ m_CostFunctionAdaptor

CostFunctionAdaptorType* itk::SingleValuedNonLinearVnlOptimizer::m_CostFunctionAdaptor
private

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 135 of file itkSingleValuedNonLinearVnlOptimizer.h.

◆ m_Maximize

bool itk::SingleValuedNonLinearVnlOptimizer::m_Maximize
private

Methods to define whether the cost function will be maximized or minimized. By default the VNL amoeba optimizer is only a minimizer. Maximization is implemented here by notifying the CostFunctionAdaptor which in its turn will multiply the function values and its derivative by -1.0.

Definition at line 137 of file itkSingleValuedNonLinearVnlOptimizer.h.


The documentation for this class was generated from the following file: