go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elastix::RegularStepGradientDescent< TElastix > Class Template Reference

#include <elxRegularStepGradientDescent.h>

Detailed Description

template<class TElastix>
class elastix::RegularStepGradientDescent< TElastix >

An optimizer based on gradient descent...

This optimizer is a wrap around the itk::RegularStepGradientDescentOptimizer. This wrap-around class takes care of setting parameters, and printing progress information. For detailed information about the optimisation method, please read the documentation of the itkRegularStepGradientDescentOptimizer (in the ITK-manual).

The parameters used in this class are:

Parameters

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

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

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: (MaximumStepLength 16.0 8.0 4.0)
Default value: 16 / 2^resolutionlevel.

RelaxationFactor: the factor with which the steplength is multiplied, if the optimiser notices that a smaller steplength is needed.
example: (RelaxationFactor 0.5 0.5 0.8 ).
Default/recommended value: 0.5.

See also
ImprovedRegularStepGradientDescentOptimizer

Definition at line 65 of file elxRegularStepGradientDescent.h.

Inheritance diagram for elastix::RegularStepGradientDescent< TElastix >:

Public Types

using ConstPointer = itk::SmartPointer<const Self>
 
using ITKBaseType = typename Superclass2::ITKBaseType
 
using Pointer = itk::SmartPointer<Self>
 
using Self = RegularStepGradientDescent
 
using Superclass1 = RegularStepGradientDescentOptimizer
 
using Superclass2 = OptimizerBase<TElastix>
 
- Public Types inherited from elastix::OptimizerBase< TElastix >
using ElastixType
 
using ITKBaseType = itk::Optimizer
 
using ParametersType = typename ITKBaseType::ParametersType
 
using RegistrationType
 
using Self = OptimizerBase
 
using Superclass = BaseComponentSE<TElastix>
 
- Public Types inherited from elastix::BaseComponentSE< TElastix >
using ElastixType = TElastix
 
using RegistrationType = typename ElastixType::RegistrationBaseType
 
using Self = BaseComponentSE
 
using Superclass = BaseComponent
 

Public Member Functions

void AfterEachIteration () override
 
void AfterEachResolution () override
 
void AfterRegistration () override
 
void BeforeEachResolution () override
 
void BeforeRegistration () override
 
 elxClassNameMacro ("RegularStepGradientDescent")
 
virtual const char * GetClassName () const
 
 ITK_DISALLOW_COPY_AND_MOVE (RegularStepGradientDescent)
 
void SetInitialPosition (const ParametersType &param) override
 
- Public Member Functions inherited from elastix::OptimizerBase< TElastix >
void AfterRegistrationBase () override
 
void BeforeEachResolutionBase () override
 
ITKBaseTypeGetAsITKBaseType ()
 
const ITKBaseTypeGetAsITKBaseType () const
 
 ITK_DISALLOW_COPY_AND_MOVE (OptimizerBase)
 
virtual void SetCurrentPositionPublic (const ParametersType &param)
 
virtual void SetSinusScales (double amplitude, double frequency, unsigned long numberOfParameters)
 
- Public Member Functions inherited from elastix::BaseComponentSE< TElastix >
void AddTargetCellToIterationInfo (const char *const name)
 
const ConfigurationGetConfiguration () const
 
ElastixTypeGetElastix () const
 
auto & GetIterationInfoAt (const char *const name)
 
RegistrationTypeGetRegistration () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponentSE)
 
void RemoveTargetCellFromIterationInfo (const char *const name)
 
void SetConfiguration (const Configuration *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIterationBase ()
 
virtual void AfterEachResolutionBase ()
 
virtual int BeforeAll ()
 
virtual int BeforeAllBase ()
 
virtual void BeforeRegistrationBase ()
 
virtual const char * elxGetClassName () const
 
const char * GetComponentLabel () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponent)
 
 itkTypeMacroNoParent (BaseComponent)
 
void SetComponentLabel (const char *label, unsigned int idx)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from elastix::BaseComponent
template<typename TBaseComponent >
static auto AsITKBaseType (TBaseComponent *const baseComponent) -> decltype(baseComponent->GetAsITKBaseType())
 
static void InitializeElastixExecutable ()
 
static bool IsElastixLibrary ()
 

Protected Member Functions

 RegularStepGradientDescent ()=default
 
 ~RegularStepGradientDescent () override=default
 
- Protected Member Functions inherited from elastix::OptimizerBase< TElastix >
virtual bool GetNewSamplesEveryIteration () const
 
 OptimizerBase ()=default
 
virtual void SelectNewSamples ()
 
 ~OptimizerBase () override=default
 
- 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 Attributes

 elxOverrideGetSelfMacro
 

Additional Inherited Members

- Protected Types inherited from elastix::OptimizerBase< TElastix >
using SettingsVectorType = typename std::vector<SettingsType>
 
- Static Protected Member Functions inherited from elastix::OptimizerBase< TElastix >
static void PrintSettingsVector (const SettingsVectorType &settings)
 
- Protected Attributes inherited from elastix::BaseComponentSE< TElastix >
Configuration::ConstPointer m_Configuration {}
 
itk::WeakPointer< TElastix > m_Elastix {}
 
RegistrationTypem_Registration {}
 

Member Typedef Documentation

◆ ConstPointer

template<class TElastix >
using elastix::RegularStepGradientDescent< TElastix >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 77 of file elxRegularStepGradientDescent.h.

◆ ITKBaseType

template<class TElastix >
using elastix::RegularStepGradientDescent< TElastix >::ITKBaseType = typename Superclass2::ITKBaseType

Definition at line 98 of file elxRegularStepGradientDescent.h.

◆ Pointer

template<class TElastix >
using elastix::RegularStepGradientDescent< TElastix >::Pointer = itk::SmartPointer<Self>

Definition at line 76 of file elxRegularStepGradientDescent.h.

◆ Self

template<class TElastix >
using elastix::RegularStepGradientDescent< TElastix >::Self = RegularStepGradientDescent

Standard ITK.

Definition at line 73 of file elxRegularStepGradientDescent.h.

◆ Superclass1

template<class TElastix >
using elastix::RegularStepGradientDescent< TElastix >::Superclass1 = RegularStepGradientDescentOptimizer

Definition at line 74 of file elxRegularStepGradientDescent.h.

◆ Superclass2

template<class TElastix >
using elastix::RegularStepGradientDescent< TElastix >::Superclass2 = OptimizerBase<TElastix>

Definition at line 75 of file elxRegularStepGradientDescent.h.

Constructor & Destructor Documentation

◆ RegularStepGradientDescent()

template<class TElastix >
elastix::RegularStepGradientDescent< TElastix >::RegularStepGradientDescent ( )
protecteddefault

◆ ~RegularStepGradientDescent()

template<class TElastix >
elastix::RegularStepGradientDescent< TElastix >::~RegularStepGradientDescent ( )
overrideprotecteddefault

Member Function Documentation

◆ AfterEachIteration()

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

Reimplemented from elastix::BaseComponent.

◆ AfterEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ AfterRegistration()

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

Reimplemented from elastix::BaseComponent.

◆ BeforeEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ BeforeRegistration()

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

Methods invoked by elastix, in which parameters can be set and progress information can be printed.

Reimplemented from elastix::BaseComponent.

◆ elxClassNameMacro()

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

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

◆ GetClassName()

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

Run-time type information (and related methods).

Reimplemented from elastix::OptimizerBase< TElastix >.

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<class TElastix >
elastix::RegularStepGradientDescent< TElastix >::ITK_DISALLOW_COPY_AND_MOVE ( RegularStepGradientDescent< TElastix > )

◆ New()

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

Method for creation through the object factory.

◆ SetInitialPosition()

template<class TElastix >
void elastix::RegularStepGradientDescent< 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.

Field Documentation

◆ elxOverrideGetSelfMacro

template<class TElastix >
elastix::RegularStepGradientDescent< TElastix >::elxOverrideGetSelfMacro
private

Definition at line 132 of file elxRegularStepGradientDescent.h.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo