Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <elxRSGDEachParameterApart.h>
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:
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.
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 ¶m) 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 ITKBaseType * | GetAsITKBaseType (void) |
virtual const ITKBaseType * | GetAsITKBaseType (void) const |
virtual const char * | GetClassName () const |
virtual void | SetCurrentPositionPublic (const ParametersType ¶m) |
virtual void | SetSinusScales (double amplitude, double frequency, unsigned long numberOfParameters) |
Public Member Functions inherited from elastix::BaseComponentSE< TElastix > | |
ConfigurationType * | GetConfiguration (void) const |
ElastixType * | GetElastix (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 {} |
typedef Superclass2::ConfigurationPointer elastix::RSGDEachParameterApart< TElastix >::ConfigurationPointer |
Definition at line 107 of file elxRSGDEachParameterApart.h.
typedef Superclass2::ConfigurationType elastix::RSGDEachParameterApart< TElastix >::ConfigurationType |
Definition at line 106 of file elxRSGDEachParameterApart.h.
typedef itk::SmartPointer< const Self > elastix::RSGDEachParameterApart< TElastix >::ConstPointer |
Definition at line 85 of file elxRSGDEachParameterApart.h.
typedef Superclass1::CostFunctionPointer elastix::RSGDEachParameterApart< TElastix >::CostFunctionPointer |
Definition at line 101 of file elxRSGDEachParameterApart.h.
typedef Superclass1::CostFunctionType elastix::RSGDEachParameterApart< TElastix >::CostFunctionType |
Typedef's inherited from Superclass1.
Definition at line 100 of file elxRSGDEachParameterApart.h.
typedef Superclass2::ElastixPointer elastix::RSGDEachParameterApart< TElastix >::ElastixPointer |
Definition at line 105 of file elxRSGDEachParameterApart.h.
typedef Superclass2::ElastixType elastix::RSGDEachParameterApart< TElastix >::ElastixType |
Typedef's inherited from Elastix.
Definition at line 104 of file elxRSGDEachParameterApart.h.
typedef Superclass2::ITKBaseType elastix::RSGDEachParameterApart< TElastix >::ITKBaseType |
Definition at line 110 of file elxRSGDEachParameterApart.h.
typedef Superclass1::ParametersType elastix::RSGDEachParameterApart< TElastix >::ParametersType |
Typedef for the ParametersType.
Definition at line 113 of file elxRSGDEachParameterApart.h.
typedef itk::SmartPointer< Self > elastix::RSGDEachParameterApart< TElastix >::Pointer |
Definition at line 84 of file elxRSGDEachParameterApart.h.
typedef Superclass2::RegistrationPointer elastix::RSGDEachParameterApart< TElastix >::RegistrationPointer |
Definition at line 109 of file elxRSGDEachParameterApart.h.
typedef Superclass2::RegistrationType elastix::RSGDEachParameterApart< TElastix >::RegistrationType |
Definition at line 108 of file elxRSGDEachParameterApart.h.
typedef RSGDEachParameterApart elastix::RSGDEachParameterApart< TElastix >::Self |
Standard ITK.
Definition at line 81 of file elxRSGDEachParameterApart.h.
typedef RSGDEachParameterApartOptimizer elastix::RSGDEachParameterApart< TElastix >::Superclass1 |
Definition at line 82 of file elxRSGDEachParameterApart.h.
typedef OptimizerBase< TElastix > elastix::RSGDEachParameterApart< TElastix >::Superclass2 |
Definition at line 83 of file elxRSGDEachParameterApart.h.
|
inlineprotected |
Definition at line 134 of file elxRSGDEachParameterApart.h.
|
inlineoverrideprotected |
Definition at line 135 of file elxRSGDEachParameterApart.h.
|
private |
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Methods that have to be present everywhere.
Reimplemented from elastix::BaseComponent.
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")
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::RSGDEachParameterApartOptimizer.
|
static |
Method for creation through the object factory.
|
private |
|
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 1.9.4 |