ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | List of all members
itk::MultiStartOptimizerv4Template< TInternalComputationValueType > Class Template Reference

#include <itkMultiStartOptimizerv4.h>

+ Inheritance diagram for itk::MultiStartOptimizerv4Template< TInternalComputationValueType >:
+ Collaboration diagram for itk::MultiStartOptimizerv4Template< TInternalComputationValueType >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = typename MetricType::DerivativeType
 
using InternalComputationValueType = TInternalComputationValueType
 
using LocalOptimizerPointer = typename LocalOptimizerType::Pointer
 
using LocalOptimizerType = typename itk::GradientDescentOptimizerv4Template< TInternalComputationValueType >
 
using MeasureType = typename Superclass::MeasureType
 
using MetricType = typename Superclass::MetricType
 
using MetricTypePointer = typename MetricType::Pointer
 
using MetricValuesListType = std::vector< MeasureType >
 
using OptimizerPointer = typename OptimizerType::Pointer
 
using OptimizerType = ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType >
 
using ParameterListSizeType = typename ParametersListType::size_type
 
using ParametersListType = std::vector< ParametersType >
 
using ParametersType = typename Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using Self = MultiStartOptimizerv4Template
 
using StopConditionDescriptionType = typename Superclass::StopConditionDescriptionType
 
using StopConditionReturnStringType = typename Superclass::StopConditionReturnStringType
 
using Superclass = ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType >
 
- Public Types inherited from itk::ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType >
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = typename MetricType::DerivativeType
 
using MeasureType = typename MetricType::MeasureType
 
using MetricType = ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >
 
using MetricTypePointer = typename MetricType::Pointer
 
using NumberOfParametersType = typename MetricType::NumberOfParametersType
 
using ParametersType = OptimizerParameters< TInternalComputationValueType >
 
using Pointer = SmartPointer< Self >
 
using ScalesEstimatorType = OptimizerParameterScalesEstimatorTemplate< TInternalComputationValueType >
 
using ScalesType = OptimizerParameters< TInternalComputationValueType >
 
using Self = ObjectToObjectOptimizerBaseTemplate
 
using StopConditionDescriptionType = std::ostringstream
 
using StopConditionReturnStringType = std::string
 
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 ::itk::LightObject::Pointer CreateAnother () const
 
ParametersType GetBestParameters ()
 
const MetricValuesListTypeGetMetricValuesList () const
 
virtual const char * GetNameOfClass () const
 
ParametersListTypeGetParametersList ()
 
virtual const StopConditionObjectToObjectOptimizerEnumGetStopCondition () const
 
const StopConditionReturnStringType GetStopConditionDescription () const override
 
void InstantiateLocalOptimizer ()
 
virtual void ResumeOptimization ()
 
void SetParametersList (ParametersListType &p)
 
void StartOptimization (bool doOnlyInitialization=false) override
 
virtual void StopOptimization ()
 
- Public Member Functions inherited from itk::ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType >
virtual void SetMetric (MetricType *_arg)
 
virtual MetricTypeGetModifiableMetric ()
 
virtual const MetricTypeGetMetric () const
 
virtual const MeasureTypeGetCurrentMetricValue () const
 
virtual const MeasureTypeGetValue () const
 
virtual void SetScales (const ScalesType &scales)
 
virtual const ScalesTypeGetScales () const
 
virtual const bool & GetScalesAreIdentity () const
 
virtual void SetWeights (ScalesType _arg)
 
virtual const ScalesTypeGetWeights () const
 
virtual const bool & GetWeightsAreIdentity () const
 
bool GetScalesInitialized () const
 
virtual void SetScalesEstimator (ScalesEstimatorType *_arg)
 
virtual void SetDoEstimateScales (bool _arg)
 
virtual const bool & GetDoEstimateScales () const
 
virtual void DoEstimateScalesOn ()
 
virtual void DoEstimateScalesOff ()
 
virtual void SetNumberOfWorkUnits (ThreadIdType number)
 
virtual const ThreadIdTypeGetNumberOfWorkUnits () const
 
virtual SizeValueType GetCurrentIteration () const
 
virtual void SetNumberOfIterations (SizeValueType _arg)
 
virtual SizeValueType GetNumberOfIterations () const
 
virtual const ParametersTypeGetCurrentPosition () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) 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
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

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 val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
bool m_Stop { false }
 
StopConditionObjectToObjectOptimizerEnum m_StopCondition
 
StopConditionDescriptionType m_StopConditionDescription
 
ParametersListType m_ParametersList
 
MetricValuesListType m_MetricValuesList
 
MeasureType m_MinimumMetricValue
 
MeasureType m_MaximumMetricValue
 
ParameterListSizeType m_BestParametersIndex
 
OptimizerPointer m_LocalOptimizer
 
virtual void SetLocalOptimizer (OptimizerType *_arg)
 
virtual OptimizerTypeGetModifiableLocalOptimizer ()
 
virtual const OptimizerTypeGetLocalOptimizer () const
 
ParameterListSizeType GetBestParametersIndex ()
 
 MultiStartOptimizerv4Template ()
 
 ~MultiStartOptimizerv4Template () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

Additional Inherited Members

- Protected Member Functions inherited from itk::ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType >
 ObjectToObjectOptimizerBaseTemplate ()
 
 ~ObjectToObjectOptimizerBaseTemplate () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- 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::ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType >
MetricTypePointer m_Metric
 
ThreadIdType m_NumberOfWorkUnits
 
SizeValueType m_CurrentIteration
 
SizeValueType m_NumberOfIterations
 
MeasureType m_CurrentMetricValue
 
ScalesType m_Scales
 
ScalesType m_Weights
 
bool m_ScalesAreIdentity
 
ScalesEstimatorType::Pointer m_ScalesEstimator
 
bool m_WeightsAreIdentity
 
bool m_DoEstimateScales
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TInternalComputationValueType>
class itk::MultiStartOptimizerv4Template< TInternalComputationValueType >

Multi-start searches over input parameters and returns the best metric value.

The multi-start algorithm performs gradient descent from N (large) number of starting points and returns the best solution. Ideal start points would sample the solution space almost uniformly, thus, in theory, this is a global optimizer. In this implementation, the quality of the optimization depends on the parameter space samples that the user inputs to the optimizer. Multi-start can be modified in numerous ways to improve robustness of standard approaches. These improvements usually focus modifying the parameter sample space. This is why we place the burden on the user to provide the parameter samples over which to optimize.

Definition at line 42 of file itkMultiStartOptimizerv4.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::ConstPointer = SmartPointer<const Self>

Definition at line 52 of file itkMultiStartOptimizerv4.h.

◆ DerivativeType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::DerivativeType = typename MetricType::DerivativeType

Derivative type

Definition at line 103 of file itkMultiStartOptimizerv4.h.

◆ InternalComputationValueType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::InternalComputationValueType = TInternalComputationValueType

Stop condition return string type It should be possible to derive the internal computation type from the class object.

Definition at line 96 of file itkMultiStartOptimizerv4.h.

◆ LocalOptimizerPointer

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::LocalOptimizerPointer = typename LocalOptimizerType::Pointer

Definition at line 67 of file itkMultiStartOptimizerv4.h.

◆ LocalOptimizerType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::LocalOptimizerType = typename itk::GradientDescentOptimizerv4Template<TInternalComputationValueType>

Definition at line 66 of file itkMultiStartOptimizerv4.h.

◆ MeasureType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::MeasureType = typename Superclass::MeasureType

Measure type

Definition at line 106 of file itkMultiStartOptimizerv4.h.

◆ MetricType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::MetricType = typename Superclass::MetricType

Metric type over which this class is templated

Definition at line 99 of file itkMultiStartOptimizerv4.h.

◆ MetricTypePointer

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::MetricTypePointer = typename MetricType::Pointer

Definition at line 100 of file itkMultiStartOptimizerv4.h.

◆ MetricValuesListType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::MetricValuesListType = std::vector<MeasureType>

Definition at line 107 of file itkMultiStartOptimizerv4.h.

◆ OptimizerPointer

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::OptimizerPointer = typename OptimizerType::Pointer

Definition at line 65 of file itkMultiStartOptimizerv4.h.

◆ OptimizerType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::OptimizerType = ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>

Definition at line 64 of file itkMultiStartOptimizerv4.h.

◆ ParameterListSizeType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::ParameterListSizeType = typename ParametersListType::size_type

Definition at line 62 of file itkMultiStartOptimizerv4.h.

◆ ParametersListType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::ParametersListType = std::vector<ParametersType>

Definition at line 61 of file itkMultiStartOptimizerv4.h.

◆ ParametersType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::ParametersType = typename Superclass::ParametersType

Definition at line 60 of file itkMultiStartOptimizerv4.h.

◆ Pointer

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::Pointer = SmartPointer<Self>

Definition at line 51 of file itkMultiStartOptimizerv4.h.

◆ Self

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::Self = MultiStartOptimizerv4Template

Standard class type aliases.

Definition at line 49 of file itkMultiStartOptimizerv4.h.

◆ StopConditionDescriptionType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::StopConditionDescriptionType = typename Superclass::StopConditionDescriptionType

Stop condition internal string type

Definition at line 91 of file itkMultiStartOptimizerv4.h.

◆ StopConditionReturnStringType

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::StopConditionReturnStringType = typename Superclass::StopConditionReturnStringType

Enables backwards compatibility for enum values Stop condition return string type

Definition at line 88 of file itkMultiStartOptimizerv4.h.

◆ Superclass

template<typename TInternalComputationValueType >
using itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::Superclass = ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>

Definition at line 50 of file itkMultiStartOptimizerv4.h.

Constructor & Destructor Documentation

◆ MultiStartOptimizerv4Template()

template<typename TInternalComputationValueType >
itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::MultiStartOptimizerv4Template ( )
protected

Default constructor

◆ ~MultiStartOptimizerv4Template()

template<typename TInternalComputationValueType >
itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::~MultiStartOptimizerv4Template ( )
overrideprotecteddefault

Set/Get the optimizer.

Member Function Documentation

◆ CreateAnother()

template<typename TInternalComputationValueType >
virtual::itk::LightObject::Pointer itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ GetBestParameters()

template<typename TInternalComputationValueType >
ParametersType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetBestParameters ( )

Return the parameters from the best visited position

◆ GetBestParametersIndex()

template<typename TInternalComputationValueType >
ParameterListSizeType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetBestParametersIndex ( )
inline

Set/Get the optimizer.

Definition at line 156 of file itkMultiStartOptimizerv4.h.

◆ GetLocalOptimizer()

template<typename TInternalComputationValueType >
virtual const OptimizerType* itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetLocalOptimizer ( ) const
virtual

Set/Get the optimizer.

◆ GetMetricValuesList()

template<typename TInternalComputationValueType >
const MetricValuesListType& itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetMetricValuesList ( ) const

Get the list of metric values that we produced after the multi-start search.

◆ GetModifiableLocalOptimizer()

template<typename TInternalComputationValueType >
virtual OptimizerType* itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetModifiableLocalOptimizer ( )
virtual

Set/Get the optimizer.

◆ GetNameOfClass()

template<typename TInternalComputationValueType >
virtual const char* itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ObjectToObjectOptimizerBaseTemplate< TInternalComputationValueType >.

◆ GetParametersList()

template<typename TInternalComputationValueType >
ParametersListType& itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetParametersList ( )

Get the list of parameters over which to search.

◆ GetStopCondition()

template<typename TInternalComputationValueType >
virtual const StopConditionObjectToObjectOptimizerEnum& itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetStopCondition ( ) const
virtual

Get stop condition enum

◆ GetStopConditionDescription()

template<typename TInternalComputationValueType >
const StopConditionReturnStringType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::GetStopConditionDescription ( ) const
overridevirtual

◆ InstantiateLocalOptimizer()

template<typename TInternalComputationValueType >
void itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::InstantiateLocalOptimizer ( )

Create an instance of the local optimizer

◆ New()

template<typename TInternalComputationValueType >
static Pointer itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<typename TInternalComputationValueType >
void itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Set/Get the optimizer.

Reimplemented from itk::Object.

◆ ResumeOptimization()

template<typename TInternalComputationValueType >
virtual void itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::ResumeOptimization ( )
virtual

Resume the optimization. Can be called after StopOptimization to resume. The bulk of the optimization work loop is here.

◆ SetLocalOptimizer()

template<typename TInternalComputationValueType >
virtual void itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::SetLocalOptimizer ( OptimizerType _arg)
virtual

Set/Get the optimizer.

◆ SetParametersList()

template<typename TInternalComputationValueType >
void itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::SetParametersList ( ParametersListType p)

Set the list of parameters over which to search

◆ StartOptimization()

template<typename TInternalComputationValueType >
void itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::StartOptimization ( bool  doOnlyInitialization = false)
overridevirtual

◆ StopOptimization()

template<typename TInternalComputationValueType >
virtual void itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::StopOptimization ( )
virtual

Stop optimization. The object is left in a state so the optimization can be resumed by calling ResumeOptimization.

Member Data Documentation

◆ m_BestParametersIndex

template<typename TInternalComputationValueType >
ParameterListSizeType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_BestParametersIndex
protected

Set/Get the optimizer.

Definition at line 178 of file itkMultiStartOptimizerv4.h.

◆ m_LocalOptimizer

template<typename TInternalComputationValueType >
OptimizerPointer itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_LocalOptimizer
protected

Set/Get the optimizer.

Definition at line 179 of file itkMultiStartOptimizerv4.h.

◆ m_MaximumMetricValue

template<typename TInternalComputationValueType >
MeasureType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_MaximumMetricValue
protected

Set/Get the optimizer.

Definition at line 177 of file itkMultiStartOptimizerv4.h.

◆ m_MetricValuesList

template<typename TInternalComputationValueType >
MetricValuesListType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_MetricValuesList
protected

Set/Get the optimizer.

Definition at line 175 of file itkMultiStartOptimizerv4.h.

◆ m_MinimumMetricValue

template<typename TInternalComputationValueType >
MeasureType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_MinimumMetricValue
protected

Set/Get the optimizer.

Definition at line 176 of file itkMultiStartOptimizerv4.h.

◆ m_ParametersList

template<typename TInternalComputationValueType >
ParametersListType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_ParametersList
protected

Set/Get the optimizer.

Definition at line 174 of file itkMultiStartOptimizerv4.h.

◆ m_Stop

template<typename TInternalComputationValueType >
bool itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_Stop { false }
protected

Set/Get the optimizer.

Definition at line 171 of file itkMultiStartOptimizerv4.h.

◆ m_StopCondition

template<typename TInternalComputationValueType >
StopConditionObjectToObjectOptimizerEnum itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_StopCondition
protected

Set/Get the optimizer.

Definition at line 172 of file itkMultiStartOptimizerv4.h.

◆ m_StopConditionDescription

template<typename TInternalComputationValueType >
StopConditionDescriptionType itk::MultiStartOptimizerv4Template< TInternalComputationValueType >::m_StopConditionDescription
protected

Set/Get the optimizer.

Definition at line 173 of file itkMultiStartOptimizerv4.h.


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