Loading...
Searching...
No Matches
elastix::RSGDEachParameterApart< TElastix > Class Template Reference
Components » Optimizers

`#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 >:
[legend]

## Public Types

using | ConstPointer = itk::SmartPointer<const Self>
using | CostFunctionPointer
using | ITKBaseType = typename Superclass2::ITKBaseType
using | Pointer = itk::SmartPointer<Self>
using | Self = RSGDEachParameterApart
using | Superclass1 = RSGDEachParameterApartOptimizer
using | Superclass2 = OptimizerBase<TElastix>
Public Types inherited from itk::RSGDEachParameterApartOptimizer
using | ConstPointer = SmartPointer<const Self>
using | CostFunctionPointer = CostFunctionType::Pointer
using | Pointer = SmartPointer<Self>
using | Self = RSGDEachParameterApartOptimizer
using | Superclass = RSGDEachParameterApartBaseOptimizer
Public Types inherited from itk::RSGDEachParameterApartBaseOptimizer
using | ConstPointer = SmartPointer<const Self>
using | Pointer = SmartPointer<Self>
using | Self = RSGDEachParameterApartBaseOptimizer
enum | StopConditionType { GradientMagnitudeTolerance = 1 , StepTooSmall , ImageNotAvailable , SamplesNotAvailable , MaximumNumberOfIterations , MetricError }
using | Superclass = SingleValuedNonLinearOptimizer
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 ("RSGDEachParameterApart")
virtual const char * | GetClassName () const
| ITK_DISALLOW_COPY_AND_MOVE (RSGDEachParameterApart)
void | SetInitialPosition (const ParametersType &param) override
Public Member Functions inherited from itk::RSGDEachParameterApartOptimizer
| ITK_DISALLOW_COPY_AND_MOVE (RSGDEachParameterApartOptimizer)
Public Member Functions inherited from itk::RSGDEachParameterApartBaseOptimizer
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
| ITK_DISALLOW_COPY_AND_MOVE (RSGDEachParameterApartBaseOptimizer)
virtual void | MaximizeOff ()
virtual void | MaximizeOn ()
void | MinimizeOff ()
void | MinimizeOn ()
void | ResumeOptimization ()
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 () override
void | StopOptimization ()
Public Member Functions inherited from elastix::OptimizerBase< TElastix >
void | AfterRegistrationBase () override
void | BeforeEachResolutionBase () override
ITKBaseType * | GetAsITKBaseType ()
const ITKBaseType * | GetAsITKBaseType () 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 Configuration * | GetConfiguration () const
ElastixType * | GetElastix () const
auto & | GetIterationInfoAt (const char *const name)
RegistrationType * | GetRegistration () 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 itk::RSGDEachParameterApartOptimizer
static Pointer | New ()
Static Public Member Functions inherited from itk::RSGDEachParameterApartBaseOptimizer
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

| RSGDEachParameterApart ()=default
| ~RSGDEachParameterApart () override=default
Protected Member Functions inherited from itk::RSGDEachParameterApartOptimizer
| RSGDEachParameterApartOptimizer ()=default
void | StepAlongGradient (const DerivativeType &factor, const DerivativeType &transformedGradient) override
| ~RSGDEachParameterApartOptimizer () override=default
Protected Member Functions inherited from itk::RSGDEachParameterApartBaseOptimizer
virtual void | AdvanceOneStep ()
void | PrintSelf (std::ostream &os, Indent indent) const override
| RSGDEachParameterApartBaseOptimizer ()
| ~RSGDEachParameterApartBaseOptimizer () 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 {}
RegistrationType * | m_Registration {}

## Member Typedef Documentation

## ConstPointer

template<class TElastix>

using elastix::RSGDEachParameterApart< TElastix >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 84 of file elxRSGDEachParameterApart.h.

## CostFunctionPointer

template<class TElastix>

using itk::RSGDEachParameterApartOptimizer::CostFunctionPointer

Definition at line 72 of file itkRSGDEachParameterApartOptimizer.h.

## ITKBaseType

template<class TElastix>

using elastix::RSGDEachParameterApart< TElastix >::ITKBaseType = typename Superclass2::ITKBaseType

Definition at line 105 of file elxRSGDEachParameterApart.h.

## Pointer

template<class TElastix>

using elastix::RSGDEachParameterApart< TElastix >::Pointer = itk::SmartPointer<Self>

Definition at line 83 of file elxRSGDEachParameterApart.h.

## Self

template<class TElastix>

using elastix::RSGDEachParameterApart< TElastix >::Self = RSGDEachParameterApart

Standard ITK.

Definition at line 80 of file elxRSGDEachParameterApart.h.

## Superclass1

template<class TElastix>

using elastix::RSGDEachParameterApart< TElastix >::Superclass1 = RSGDEachParameterApartOptimizer

Definition at line 81 of file elxRSGDEachParameterApart.h.

## Superclass2

template<class TElastix>

using elastix::RSGDEachParameterApart< TElastix >::Superclass2 = OptimizerBase<TElastix>

Definition at line 82 of file elxRSGDEachParameterApart.h.

## Constructor & Destructor Documentation

## RSGDEachParameterApart()

template<class TElastix>

elastix::RSGDEachParameterApart< TElastix >::RSGDEachParameterApart | ( |  | ) |

protected default

## ~RSGDEachParameterApart()

template<class TElastix>

elastix::RSGDEachParameterApart< TElastix >::~RSGDEachParameterApart | ( |  | ) |

override protected default

## Member Function Documentation

## AfterEachIteration()

template<class TElastix>

void elastix::RSGDEachParameterApart< TElastix >::AfterEachIteration | ( |  | ) |

override virtual

Reimplemented from elastix::BaseComponent.

## AfterEachResolution()

template<class TElastix>

void elastix::RSGDEachParameterApart< TElastix >::AfterEachResolution | ( |  | ) |

override virtual

Reimplemented from elastix::BaseComponent.

## AfterRegistration()

template<class TElastix>

void elastix::RSGDEachParameterApart< TElastix >::AfterRegistration | ( |  | ) |

override virtual

Reimplemented from elastix::BaseComponent.

## BeforeEachResolution()

template<class TElastix>

void elastix::RSGDEachParameterApart< TElastix >::BeforeEachResolution | ( |  | ) |

override virtual

Reimplemented from elastix::BaseComponent.

## BeforeRegistration()

template<class TElastix>

void elastix::RSGDEachParameterApart< TElastix >::BeforeRegistration | ( |  | ) |

override virtual

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.

## ITK_DISALLOW_COPY_AND_MOVE()

template<class TElastix>

elastix::RSGDEachParameterApart< TElastix >::ITK_DISALLOW_COPY_AND_MOVE | ( | RSGDEachParameterApart< TElastix > |  | ) |

## New()

template<class TElastix>

Pointer elastix::RSGDEachParameterApart< TElastix >::New | ( |  | ) |

static

Method for creation through the object factory.

## 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.

## Field Documentation

## elxOverrideGetSelfMacro

template<class TElastix>

elastix::RSGDEachParameterApart< TElastix >::elxOverrideGetSelfMacro

private

Definition at line 138 of file elxRSGDEachParameterApart.h.

Generated on 1768596610 for elastix by 1.15.0 |