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

#include <itkOnePlusOneEvolutionaryOptimizer.h>

+ Inheritance diagram for itk::OnePlusOneEvolutionaryOptimizer:
+ Collaboration diagram for itk::OnePlusOneEvolutionaryOptimizer:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using CostFunctionPointer = CostFunctionType::Pointer
 
using CostFunctionType = SingleValuedCostFunction
 
using NormalVariateGeneratorType = Statistics::RandomVariateGeneratorBase
 
using Pointer = SmartPointer< Self >
 
using Self = OnePlusOneEvolutionaryOptimizer
 
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 ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
- 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
 
- 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::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 val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
NormalVariateGeneratorType::Pointer m_RandomGenerator
 
unsigned int m_MaximumIteration
 
unsigned int m_CurrentIteration
 
bool m_CatchGetValueException
 
double m_MetricWorstPossibleValue
 
bool m_Maximize
 
double m_Epsilon
 
double m_InitialRadius
 
double m_GrowthFactor
 
double m_ShrinkFactor
 
bool m_Initialized
 
MeasureType m_CurrentCost
 
bool m_Stop
 
std::ostringstream m_StopConditionDescription
 
double m_FrobeniusNorm
 
virtual void SetMaximize (bool _arg)
 
virtual void MaximizeOn ()
 
virtual void MaximizeOff ()
 
virtual const bool & GetMaximize () const
 
bool GetMinimize () const
 
void SetMinimize (bool v)
 
void MinimizeOn ()
 
void MinimizeOff ()
 
virtual void SetMaximumIteration (unsigned int _arg)
 
virtual const unsigned int & GetMaximumIteration () const
 
virtual void SetGrowthFactor (double _arg)
 
virtual const double & GetGrowthFactor () const
 
virtual void SetShrinkFactor (double _arg)
 
virtual const double & GetShrinkFactor () const
 
virtual void SetInitialRadius (double _arg)
 
virtual const double & GetInitialRadius () const
 
virtual void SetEpsilon (double _arg)
 
virtual const double & GetEpsilon () const
 
virtual const double & GetFrobeniusNorm () const
 
void SetNormalVariateGenerator (NormalVariateGeneratorType *generator)
 
void Initialize (double initialRadius, double grow=-1, double shrink=-1)
 
virtual const MeasureTypeGetCurrentCost () const
 
MeasureType GetValue () const
 
virtual const unsigned int & GetCurrentIteration () const
 
virtual const bool & GetInitialized () const
 
void StartOptimization () override
 
void StopOptimization ()
 
virtual const bool & GetCatchGetValueException () const
 
virtual void SetCatchGetValueException (bool _arg)
 
virtual const double & GetMetricWorstPossibleValue () const
 
virtual void SetMetricWorstPossibleValue (double _arg)
 
const std::string GetStopConditionDescription () const override
 
 OnePlusOneEvolutionaryOptimizer ()
 
 OnePlusOneEvolutionaryOptimizer (const OnePlusOneEvolutionaryOptimizer &)
 
 ~OnePlusOneEvolutionaryOptimizer () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

Additional Inherited Members

- Protected Member Functions inherited from itk::SingleValuedNonLinearOptimizer
void PrintSelf (std::ostream &os, Indent indent) const override
 
 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 &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::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

1+1 evolutionary strategy optimizer

This optimizer searches for the optimal parameters. It changes its search radius and position using the grow factor ,shrink factor, and isotropic probability function (which is a random unit normal variate generator).

This optimizer needs a cost function and a random unit normal variate generator. The cost function should return cost with new position in parameter space which will be generated by 1+1 evolutionary strategy. Users should plug-in the random unit normal variate generator using SetNormalVariateGenerator method.

The SetEpsilon method is the minimum value for the frobenius_norm of the covariance matrix. If the fnorm is smaller than this value, the optimization process will stop even before it hits the maximum iteration.

Another way to stop the optimization process is calling the StopOptimization method. At next iteration after calling it, the optimization process will stop.

This optimizing scheme was initially developed and implemented by Martin Styner, Univ. of North Carolina at Chapel Hill, and his colleagues.

For more details. refer to the following articles. "Parametric estimate of intensity inhomogeneities applied to MRI" Martin Styner, G. Gerig, Christian Brechbuehler, Gabor Szekely, IEEE TRANSACTIONS ON MEDICAL IMAGING; 19(3), pp. 153-165, 2000, (http://www.cs.unc.edu/~styner/docs/tmi00.pdf)

"Evaluation of 2D/3D bias correction with 1+1ES-optimization" Martin Styner, Prof. Dr. G. Gerig (IKT, BIWI, ETH Zuerich), TR-197 (http://www.cs.unc.edu/~styner/docs/StynerTR97.pdf)

See also
NormalVariateGenerator
Examples
Examples/RegistrationITKv4/ImageRegistration14.cxx, Examples/RegistrationITKv4/ImageRegistration15.cxx, Examples/RegistrationITKv4/ModelToImageRegistration1.cxx, and Examples/Segmentation/GeodesicActiveContourShapePriorLevelSetImageFilter.cxx.

Definition at line 71 of file itkOnePlusOneEvolutionaryOptimizer.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 78 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ CostFunctionPointer

Definition at line 88 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ CostFunctionType

Type of the Cost Function

Definition at line 87 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ NormalVariateGeneratorType

Normal random variate generator type.

Definition at line 91 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ Pointer

Definition at line 77 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ Self

Standard "Self" type alias.

Definition at line 75 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ Superclass

Definition at line 76 of file itkOnePlusOneEvolutionaryOptimizer.h.

Constructor & Destructor Documentation

◆ OnePlusOneEvolutionaryOptimizer() [1/2]

itk::OnePlusOneEvolutionaryOptimizer::OnePlusOneEvolutionaryOptimizer ( )
protected

Smart pointer to the normal random variate generator.

◆ OnePlusOneEvolutionaryOptimizer() [2/2]

itk::OnePlusOneEvolutionaryOptimizer::OnePlusOneEvolutionaryOptimizer ( const OnePlusOneEvolutionaryOptimizer )
protected

Smart pointer to the normal random variate generator.

◆ ~OnePlusOneEvolutionaryOptimizer()

itk::OnePlusOneEvolutionaryOptimizer::~OnePlusOneEvolutionaryOptimizer ( )
overrideprotecteddefault

Smart pointer to the normal random variate generator.

Member Function Documentation

◆ CreateAnother()

virtual::itk::LightObject::Pointer itk::OnePlusOneEvolutionaryOptimizer::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::NonLinearOptimizer.

◆ GetCatchGetValueException()

virtual const bool& itk::OnePlusOneEvolutionaryOptimizer::GetCatchGetValueException ( ) const
virtual

Smart pointer to the normal random variate generator.

◆ GetCurrentCost()

virtual const MeasureType& itk::OnePlusOneEvolutionaryOptimizer::GetCurrentCost ( ) const
virtual

Return Current Value

◆ GetCurrentIteration()

virtual const unsigned int& itk::OnePlusOneEvolutionaryOptimizer::GetCurrentIteration ( ) const
virtual

Return Current Iteration

◆ GetEpsilon()

virtual const double& itk::OnePlusOneEvolutionaryOptimizer::GetEpsilon ( ) const
virtual

Smart pointer to the normal random variate generator.

◆ GetFrobeniusNorm()

virtual const double& itk::OnePlusOneEvolutionaryOptimizer::GetFrobeniusNorm ( ) const
virtual

Get the current Frobenius norm of covariance matrix

◆ GetGrowthFactor()

virtual const double& itk::OnePlusOneEvolutionaryOptimizer::GetGrowthFactor ( ) const
virtual

Smart pointer to the normal random variate generator.

◆ GetInitialized()

virtual const bool& itk::OnePlusOneEvolutionaryOptimizer::GetInitialized ( ) const
virtual

Return if optimizer has been initialized

◆ GetInitialRadius()

virtual const double& itk::OnePlusOneEvolutionaryOptimizer::GetInitialRadius ( ) const
virtual

Smart pointer to the normal random variate generator.

◆ GetMaximize()

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

Smart pointer to the normal random variate generator.

◆ GetMaximumIteration()

virtual const unsigned int& itk::OnePlusOneEvolutionaryOptimizer::GetMaximumIteration ( ) const
virtual

Smart pointer to the normal random variate generator.

◆ GetMetricWorstPossibleValue()

virtual const double& itk::OnePlusOneEvolutionaryOptimizer::GetMetricWorstPossibleValue ( ) const
virtual

Smart pointer to the normal random variate generator.

◆ GetMinimize()

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

Smart pointer to the normal random variate generator.

Definition at line 100 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ GetNameOfClass()

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

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedNonLinearOptimizer.

◆ GetShrinkFactor()

virtual const double& itk::OnePlusOneEvolutionaryOptimizer::GetShrinkFactor ( ) const
virtual

Smart pointer to the normal random variate generator.

◆ GetStopConditionDescription()

const std::string itk::OnePlusOneEvolutionaryOptimizer::GetStopConditionDescription ( ) const
overridevirtual

Smart pointer to the normal random variate generator.

Reimplemented from itk::Optimizer.

◆ GetValue()

MeasureType itk::OnePlusOneEvolutionaryOptimizer::GetValue ( ) const
inline

Smart pointer to the normal random variate generator.

Definition at line 164 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ Initialize()

void itk::OnePlusOneEvolutionaryOptimizer::Initialize ( double  initialRadius,
double  grow = -1,
double  shrink = -1 
)

Initializes the optimizer. Before running this optimizer, this function should have been called.

initialRadius: search radius in parameter space grow: search radius grow factor shrink: search radius shrink factor

◆ MaximizeOff()

virtual void itk::OnePlusOneEvolutionaryOptimizer::MaximizeOff ( )
virtual

Smart pointer to the normal random variate generator.

◆ MaximizeOn()

virtual void itk::OnePlusOneEvolutionaryOptimizer::MaximizeOn ( )
virtual

Smart pointer to the normal random variate generator.

◆ MinimizeOff()

void itk::OnePlusOneEvolutionaryOptimizer::MinimizeOff ( )
inline

Smart pointer to the normal random variate generator.

Definition at line 115 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ MinimizeOn()

void itk::OnePlusOneEvolutionaryOptimizer::MinimizeOn ( )
inline

Smart pointer to the normal random variate generator.

Definition at line 110 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ New()

static Pointer itk::OnePlusOneEvolutionaryOptimizer::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

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

Smart pointer to the normal random variate generator.

Reimplemented from itk::Object.

◆ SetCatchGetValueException()

virtual void itk::OnePlusOneEvolutionaryOptimizer::SetCatchGetValueException ( bool  _arg)
virtual

Smart pointer to the normal random variate generator.

◆ SetEpsilon()

virtual void itk::OnePlusOneEvolutionaryOptimizer::SetEpsilon ( double  _arg)
virtual

Set/Get the minimal size of search radius (frobenius_norm of covariance matrix).

◆ SetGrowthFactor()

virtual void itk::OnePlusOneEvolutionaryOptimizer::SetGrowthFactor ( double  _arg)
virtual

Set/Get the search radius grow factor in parameter space.

◆ SetInitialRadius()

virtual void itk::OnePlusOneEvolutionaryOptimizer::SetInitialRadius ( double  _arg)
virtual

Set/Get initial search radius in parameter space

◆ SetMaximize()

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

Set if the Optimizer should Maximize the metric

◆ SetMaximumIteration()

virtual void itk::OnePlusOneEvolutionaryOptimizer::SetMaximumIteration ( unsigned int  _arg)
virtual

Set/Get maximum iteration limit.

◆ SetMetricWorstPossibleValue()

virtual void itk::OnePlusOneEvolutionaryOptimizer::SetMetricWorstPossibleValue ( double  _arg)
virtual

Smart pointer to the normal random variate generator.

◆ SetMinimize()

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

Smart pointer to the normal random variate generator.

Definition at line 105 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ SetNormalVariateGenerator()

void itk::OnePlusOneEvolutionaryOptimizer::SetNormalVariateGenerator ( NormalVariateGeneratorType generator)

Smart pointer to the normal random variate generator.

◆ SetShrinkFactor()

virtual void itk::OnePlusOneEvolutionaryOptimizer::SetShrinkFactor ( double  _arg)
virtual

Set/Get the search radius shrink factor.

◆ StartOptimization()

void itk::OnePlusOneEvolutionaryOptimizer::StartOptimization ( )
overridevirtual

Start optimization. Optimization will stop when it meets either of two termination conditions, the maximum iteration limit or epsilon (minimal search radius)

Reimplemented from itk::Optimizer.

◆ StopOptimization()

void itk::OnePlusOneEvolutionaryOptimizer::StopOptimization ( )
inline

when users call StartOptimization, this value will be set false. By calling StopOptimization, this flag will be set true, and optimization will stop at the next iteration.

Definition at line 186 of file itkOnePlusOneEvolutionaryOptimizer.h.

Member Data Documentation

◆ m_CatchGetValueException

bool itk::OnePlusOneEvolutionaryOptimizer::m_CatchGetValueException
private

Smart pointer to the normal random variate generator.

Definition at line 217 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_CurrentCost

MeasureType itk::OnePlusOneEvolutionaryOptimizer::m_CurrentCost
private

Internal storage for the value type / used as a cache

Definition at line 240 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_CurrentIteration

unsigned int itk::OnePlusOneEvolutionaryOptimizer::m_CurrentIteration
private

Current iteration

Definition at line 215 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_Epsilon

double itk::OnePlusOneEvolutionaryOptimizer::m_Epsilon
private

The minimal size of search radius (frobenius_norm of covariance matrix).

Definition at line 225 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_FrobeniusNorm

double itk::OnePlusOneEvolutionaryOptimizer::m_FrobeniusNorm
private

Cache variable for reporting the Frobenius Norm

Definition at line 253 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_GrowthFactor

double itk::OnePlusOneEvolutionaryOptimizer::m_GrowthFactor
private

Search radius growth factor in parameter space.

Definition at line 231 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_Initialized

bool itk::OnePlusOneEvolutionaryOptimizer::m_Initialized
private

Flag tells if the optimizer was initialized using Initialize function.

Definition at line 237 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_InitialRadius

double itk::OnePlusOneEvolutionaryOptimizer::m_InitialRadius
private

Initial search radius in parameter space.

Definition at line 228 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_Maximize

bool itk::OnePlusOneEvolutionaryOptimizer::m_Maximize
private

Set if the Metric should be maximized: Default = False

Definition at line 221 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_MaximumIteration

unsigned int itk::OnePlusOneEvolutionaryOptimizer::m_MaximumIteration
private

Maximum iteration limit.

Definition at line 212 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_MetricWorstPossibleValue

double itk::OnePlusOneEvolutionaryOptimizer::m_MetricWorstPossibleValue
private

Smart pointer to the normal random variate generator.

Definition at line 218 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_RandomGenerator

NormalVariateGeneratorType::Pointer itk::OnePlusOneEvolutionaryOptimizer::m_RandomGenerator
private

Smart pointer to the normal random variate generator.

Definition at line 209 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_ShrinkFactor

double itk::OnePlusOneEvolutionaryOptimizer::m_ShrinkFactor
private

Search radius shrink factor in parameter space,

Definition at line 234 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_Stop

bool itk::OnePlusOneEvolutionaryOptimizer::m_Stop
private

This is user-settable flag to stop optimization. when users call StartOptimization, this value will be set false. By calling StopOptimization, this flag will be set true, and optimization will stop at the next iteration.

Definition at line 246 of file itkOnePlusOneEvolutionaryOptimizer.h.

◆ m_StopConditionDescription

std::ostringstream itk::OnePlusOneEvolutionaryOptimizer::m_StopConditionDescription
private

Stop description

Definition at line 249 of file itkOnePlusOneEvolutionaryOptimizer.h.


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