go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
elastix::RSGDEachParameterApart< TElastix > Class Template Reference

#include <elxRSGDEachParameterApart.h>

Detailed Description

template<class TElastix>
class elastix::RSGDEachParameterApart< TElastix >

An optimizer based on gradient descent.

The underlying itk class is almost a copy of the normal RegularStepGradientDescent. The difference is that each parameter has its own step length, whereas the normal RSGD has one step length that is used for all parameters.

This could cause inaccuracies, if, for example, parameter 1, 2 and 3 are already close to the optimum, but parameter 4 not yet. The average stepsize is halved then, so parameter 4 will not have time to reach its optimum (in a worst case scenario).

The RSGDEachParameterApart stops only if ALL steplenghts are smaller than the MinimumStepSize given in the parameter file!

The elastix shell class (so, this class...), is a copy of the elxRegularStepGradientDescent, so the parameters in the parameter file, the output etc are similar.

The parameters used in this class are:

Parameters:

Optimizer: Select this optimizer as follows:
(Optimizer "RSGDEachParameterApart")

MaximumNumberOfIterations: the maximum number of iterations in each resolution.
example: (MaximumNumberOfIterations 100 100 50)
Default value: 100.

MinimumGradientMagnitude: stopping criterion. If the magnitude of the derivative of the cost function is below this value, optimisation is stopped.
example: (MinimumGradientMagnitude 0.0001 0.0001 0.001)
Default value: 1e-8.

MinimumStepLength: stopping criterion. If the steplength is below this value, optimisation is stopped.
example: (MinimumStepLength 1.0 0.5 0.1)
Default value: 0.5 / 2^resolutionlevel

MaximumStepLength: the starting steplength.
example: (MaxiumStepLength 16.0 8.0 4.0)
Default value: 16 / 2^resolutionlevel.

Definition at line 72 of file elxRSGDEachParameterApart.h.

+ Inheritance diagram for elastix::RSGDEachParameterApart< TElastix >:

Public Types

typedef Superclass2::ConfigurationPointer ConfigurationPointer
 
typedef Superclass2::ConfigurationType ConfigurationType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass1::CostFunctionPointer CostFunctionPointer
 
typedef Superclass1::CostFunctionType CostFunctionType
 
typedef Superclass2::ElastixPointer ElastixPointer
 
typedef Superclass2::ElastixType ElastixType
 
typedef Superclass2::ITKBaseType ITKBaseType
 
typedef Superclass1::ParametersType ParametersType
 
typedef itk::SmartPointer< SelfPointer
 
typedef Superclass2::RegistrationPointer RegistrationPointer
 
typedef Superclass2::RegistrationType RegistrationType
 
typedef RSGDEachParameterApart Self
 
typedef RSGDEachParameterApartOptimizer Superclass1
 
typedef OptimizerBase< TElastix > Superclass2
 
- Public Types inherited from itk::RSGDEachParameterApartOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef CostFunctionType::Pointer CostFunctionPointer
 
typedef Superclass::CostFunctionType CostFunctionType
 
typedef SmartPointer< SelfPointer
 
typedef RSGDEachParameterApartOptimizer Self
 
typedef RSGDEachParameterApartBaseOptimizer Superclass
 
- Public Types inherited from itk::RSGDEachParameterApartBaseOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef RSGDEachParameterApartBaseOptimizer Self
 
enum  StopConditionType {
  GradientMagnitudeTolerance = 1 , StepTooSmall , ImageNotAvailable , SamplesNotAvailable ,
  MaximumNumberOfIterations , MetricError
}
 
typedef SingleValuedNonLinearOptimizer Superclass
 
- Public Types inherited from elastix::OptimizerBase< TElastix >
typedef Superclass::ConfigurationPointer ConfigurationPointer
 
typedef Superclass::ConfigurationType ConfigurationType
 
typedef Superclass::ElastixPointer ElastixPointer
 
typedef Superclass::ElastixType ElastixType
 
typedef itk::Optimizer ITKBaseType
 
typedef ITKBaseType::ParametersType ParametersType
 
typedef Superclass::RegistrationPointer RegistrationPointer
 
typedef Superclass::RegistrationType RegistrationType
 
typedef OptimizerBase Self
 
typedef BaseComponentSE< TElastix > Superclass
 
- Public Types inherited from elastix::BaseComponentSE< TElastix >
typedef Configuration::Pointer ConfigurationPointer
 
typedef Configuration ConfigurationType
 
typedef itk::WeakPointer< ElastixTypeElastixPointer
 
typedef TElastix ElastixType
 
typedef RegistrationTypeRegistrationPointer
 
typedef ElastixType::RegistrationBaseType RegistrationType
 
typedef BaseComponentSE Self
 
typedef BaseComponent Superclass
 

Public Member Functions

void AfterEachIteration (void) override
 
void AfterEachResolution (void) override
 
void AfterRegistration (void) override
 
void BeforeEachResolution (void) override
 
void BeforeRegistration (void) override
 
 elxClassNameMacro ("RSGDEachParameterApart")
 
virtual const char * GetClassName () const
 
void SetInitialPosition (const ParametersType &param) override
 
virtual const char * GetClassName () const
 
- Public Member Functions inherited from itk::RSGDEachParameterApartBaseOptimizer
virtual const char * GetClassName () const
 
virtual unsigned long GetCurrentIteration () const
 
virtual double GetCurrentStepLength () const
 
virtual const DerivativeType & GetCurrentStepLengths ()
 
virtual const DerivativeType & GetGradient ()
 
virtual double GetGradientMagnitude () const
 
virtual double GetGradientMagnitudeTolerance () const
 
virtual bool GetMaximize () const
 
virtual double GetMaximumStepLength () const
 
bool GetMinimize () const
 
virtual double GetMinimumStepLength () const
 
virtual unsigned long GetNumberOfIterations () const
 
virtual StopConditionType GetStopCondition () const
 
virtual MeasureType GetValue () const
 
virtual void MaximizeOff ()
 
virtual void MaximizeOn ()
 
void MinimizeOff (void)
 
void MinimizeOn (void)
 
void ResumeOptimization (void)
 
virtual void SetGradientMagnitudeTolerance (double _arg)
 
virtual void SetMaximize (bool _arg)
 
virtual void SetMaximumStepLength (double _arg)
 
void SetMinimize (bool v)
 
virtual void SetMinimumStepLength (double _arg)
 
virtual void SetNumberOfIterations (unsigned long _arg)
 
void StartOptimization (void) override
 
void StopOptimization (void)
 
- Public Member Functions inherited from elastix::OptimizerBase< TElastix >
void AfterRegistrationBase (void) override
 
void BeforeEachResolutionBase () override
 
virtual ITKBaseTypeGetAsITKBaseType (void)
 
virtual const ITKBaseTypeGetAsITKBaseType (void) const
 
virtual const char * GetClassName () const
 
virtual void SetCurrentPositionPublic (const ParametersType &param)
 
virtual void SetSinusScales (double amplitude, double frequency, unsigned long numberOfParameters)
 
- Public Member Functions inherited from elastix::BaseComponentSE< TElastix >
ConfigurationTypeGetConfiguration (void) const
 
ElastixTypeGetElastix (void) const
 
RegistrationPointer GetRegistration (void) const
 
 ITK_DISALLOW_COPY_AND_ASSIGN (BaseComponentSE)
 
void SetConfiguration (ConfigurationType *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIteration (void)
 
virtual void AfterEachIterationBase (void)
 
virtual void AfterEachResolution (void)
 
virtual void AfterEachResolutionBase (void)
 
virtual void AfterRegistration (void)
 
virtual void AfterRegistrationBase (void)
 
virtual int BeforeAll (void)
 
virtual int BeforeAllBase (void)
 
virtual void BeforeEachResolution (void)
 
virtual void BeforeEachResolutionBase (void)
 
virtual void BeforeRegistration (void)
 
virtual void BeforeRegistrationBase (void)
 
virtual const char * elxGetClassName (void) const
 
const char * GetComponentLabel (void) const
 
 ITK_DISALLOW_COPY_AND_ASSIGN (BaseComponent)
 
 itkTypeMacroNoParent (BaseComponent)
 
void SetComponentLabel (const char *label, unsigned int idx)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::RSGDEachParameterApartOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from itk::RSGDEachParameterApartBaseOptimizer
static Pointer New ()
 
- Static Public Member Functions inherited from elastix::BaseComponent
static std::string ConvertSecondsToDHMS (const double totalSeconds, const unsigned int precision)
 
static void InitializeElastixExecutable ()
 
static bool IsElastixLibrary ()
 

Protected Member Functions

 RSGDEachParameterApart ()
 
 ~RSGDEachParameterApart () override
 
- Protected Member Functions inherited from itk::RSGDEachParameterApartOptimizer
 RSGDEachParameterApartOptimizer ()
 
void StepAlongGradient (const DerivativeType &factor, const DerivativeType &transformedGradient) override
 
 ~RSGDEachParameterApartOptimizer () override
 
- Protected Member Functions inherited from itk::RSGDEachParameterApartBaseOptimizer
virtual void AdvanceOneStep (void)
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 RSGDEachParameterApartBaseOptimizer ()
 
virtual void StepAlongGradient (const DerivativeType &, const DerivativeType &)
 
 ~RSGDEachParameterApartBaseOptimizer () override
 
- Protected Member Functions inherited from elastix::OptimizerBase< TElastix >
virtual bool GetNewSamplesEveryIteration (void) const
 
 OptimizerBase ()
 
virtual void SelectNewSamples (void)
 
 ~OptimizerBase () override
 
- Protected Member Functions inherited from elastix::BaseComponentSE< TElastix >
 BaseComponentSE ()=default
 
 ~BaseComponentSE () override=default
 
- Protected Member Functions inherited from elastix::BaseComponent
 BaseComponent ()=default
 
virtual ~BaseComponent ()=default
 

Private Member Functions

void operator= (const Self &)
 
 RSGDEachParameterApart (const Self &)
 

Additional Inherited Members

- Protected Attributes inherited from itk::RSGDEachParameterApartBaseOptimizer
unsigned long m_CurrentIteration
 
double m_CurrentStepLength
 
DerivativeType m_CurrentStepLengths
 
DerivativeType m_Gradient
 
double m_GradientMagnitude
 
double m_GradientMagnitudeTolerance
 
bool m_Maximize
 
double m_MaximumStepLength
 
double m_MinimumStepLength
 
unsigned long m_NumberOfIterations
 
DerivativeType m_PreviousGradient
 
bool m_Stop
 
StopConditionType m_StopCondition
 
MeasureType m_Value
 
- Protected Attributes inherited from elastix::BaseComponentSE< TElastix >
ConfigurationPointer m_Configuration {}
 
ElastixPointer m_Elastix {}
 
RegistrationPointer m_Registration {}
 

Member Typedef Documentation

◆ ConfigurationPointer

template<class TElastix >
typedef Superclass2::ConfigurationPointer elastix::RSGDEachParameterApart< TElastix >::ConfigurationPointer

Definition at line 107 of file elxRSGDEachParameterApart.h.

◆ ConfigurationType

template<class TElastix >
typedef Superclass2::ConfigurationType elastix::RSGDEachParameterApart< TElastix >::ConfigurationType

Definition at line 106 of file elxRSGDEachParameterApart.h.

◆ ConstPointer

template<class TElastix >
typedef itk::SmartPointer< const Self > elastix::RSGDEachParameterApart< TElastix >::ConstPointer

Definition at line 85 of file elxRSGDEachParameterApart.h.

◆ CostFunctionPointer

template<class TElastix >
typedef Superclass1::CostFunctionPointer elastix::RSGDEachParameterApart< TElastix >::CostFunctionPointer

Definition at line 101 of file elxRSGDEachParameterApart.h.

◆ CostFunctionType

template<class TElastix >
typedef Superclass1::CostFunctionType elastix::RSGDEachParameterApart< TElastix >::CostFunctionType

Typedef's inherited from Superclass1.

Definition at line 100 of file elxRSGDEachParameterApart.h.

◆ ElastixPointer

template<class TElastix >
typedef Superclass2::ElastixPointer elastix::RSGDEachParameterApart< TElastix >::ElastixPointer

Definition at line 105 of file elxRSGDEachParameterApart.h.

◆ ElastixType

template<class TElastix >
typedef Superclass2::ElastixType elastix::RSGDEachParameterApart< TElastix >::ElastixType

Typedef's inherited from Elastix.

Definition at line 104 of file elxRSGDEachParameterApart.h.

◆ ITKBaseType

template<class TElastix >
typedef Superclass2::ITKBaseType elastix::RSGDEachParameterApart< TElastix >::ITKBaseType

Definition at line 110 of file elxRSGDEachParameterApart.h.

◆ ParametersType

template<class TElastix >
typedef Superclass1::ParametersType elastix::RSGDEachParameterApart< TElastix >::ParametersType

Typedef for the ParametersType.

Definition at line 113 of file elxRSGDEachParameterApart.h.

◆ Pointer

template<class TElastix >
typedef itk::SmartPointer< Self > elastix::RSGDEachParameterApart< TElastix >::Pointer

Definition at line 84 of file elxRSGDEachParameterApart.h.

◆ RegistrationPointer

template<class TElastix >
typedef Superclass2::RegistrationPointer elastix::RSGDEachParameterApart< TElastix >::RegistrationPointer

Definition at line 109 of file elxRSGDEachParameterApart.h.

◆ RegistrationType

template<class TElastix >
typedef Superclass2::RegistrationType elastix::RSGDEachParameterApart< TElastix >::RegistrationType

Definition at line 108 of file elxRSGDEachParameterApart.h.

◆ Self

template<class TElastix >
typedef RSGDEachParameterApart elastix::RSGDEachParameterApart< TElastix >::Self

Standard ITK.

Definition at line 81 of file elxRSGDEachParameterApart.h.

◆ Superclass1

template<class TElastix >
typedef RSGDEachParameterApartOptimizer elastix::RSGDEachParameterApart< TElastix >::Superclass1

Definition at line 82 of file elxRSGDEachParameterApart.h.

◆ Superclass2

template<class TElastix >
typedef OptimizerBase< TElastix > elastix::RSGDEachParameterApart< TElastix >::Superclass2

Definition at line 83 of file elxRSGDEachParameterApart.h.

Constructor & Destructor Documentation

◆ RSGDEachParameterApart() [1/2]

template<class TElastix >
elastix::RSGDEachParameterApart< TElastix >::RSGDEachParameterApart ( )
inlineprotected

Definition at line 134 of file elxRSGDEachParameterApart.h.

◆ ~RSGDEachParameterApart()

template<class TElastix >
elastix::RSGDEachParameterApart< TElastix >::~RSGDEachParameterApart ( )
inlineoverrideprotected

Definition at line 135 of file elxRSGDEachParameterApart.h.

◆ RSGDEachParameterApart() [2/2]

template<class TElastix >
elastix::RSGDEachParameterApart< TElastix >::RSGDEachParameterApart ( const Self )
private

Member Function Documentation

◆ AfterEachIteration()

template<class TElastix >
void elastix::RSGDEachParameterApart< TElastix >::AfterEachIteration ( void  )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ AfterEachResolution()

template<class TElastix >
void elastix::RSGDEachParameterApart< TElastix >::AfterEachResolution ( void  )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ AfterRegistration()

template<class TElastix >
void elastix::RSGDEachParameterApart< TElastix >::AfterRegistration ( void  )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ BeforeEachResolution()

template<class TElastix >
void elastix::RSGDEachParameterApart< TElastix >::BeforeEachResolution ( void  )
overridevirtual

Reimplemented from elastix::BaseComponent.

◆ BeforeRegistration()

template<class TElastix >
void elastix::RSGDEachParameterApart< TElastix >::BeforeRegistration ( void  )
overridevirtual

Methods that have to be present everywhere.

Reimplemented from elastix::BaseComponent.

◆ elxClassNameMacro()

template<class TElastix >
elastix::RSGDEachParameterApart< TElastix >::elxClassNameMacro ( "RSGDEachParameterApart< TElastix >"  )

Name of this class. Use this name in the parameter file to select this specific optimizer.
example: (Optimizer "RSGDEachParameterApart")

◆ GetClassName()

template<class TElastix >
virtual const char * elastix::RSGDEachParameterApart< TElastix >::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::RSGDEachParameterApartOptimizer.

◆ New()

template<class TElastix >
static Pointer elastix::RSGDEachParameterApart< TElastix >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TElastix >
void elastix::RSGDEachParameterApart< TElastix >::operator= ( const Self )
private

◆ SetInitialPosition()

template<class TElastix >
void elastix::RSGDEachParameterApart< TElastix >::SetInitialPosition ( const ParametersType param)
override

Override the SetInitialPosition. Override the implementation in itkOptimizer.h, to ensure that the scales array and the parameters array have the same size.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo