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 | Protected Member Functions | Private Member Functions | Private Attributes
elastix::OptimizerBase< TElastix > Class Template Reference

#include <elxOptimizerBase.h>

Detailed Description

template<class TElastix>
class elastix::OptimizerBase< TElastix >

This class is the elastix base class for all Optimizers.

This class contains all the common functionality for Optimizers.

The parameters used in this class are:

Parameters:
NewSamplesEveryIteration: if this flag is set to "true" some optimizers ask the metric to select a new set of spatial samples in every iteration. This, if used in combination with the correct optimizer (such as the StandardGradientDescent), and ImageSampler (Random, RandomCoordinate, or RandomSparseMask), allows for a very low number of spatial samples (around 2000), even with large images and transforms with a large number of parameters.
Choose one from {"true", "false"} for every resolution.
example: (NewSamplesEveryIteration "true" "true" "true")
Default is "false" for every resolution.

Definition at line 53 of file elxOptimizerBase.h.

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

Public Types

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 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)
 

Protected Member Functions

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 &)
 
 OptimizerBase (const Self &)
 

Private Attributes

bool m_NewSamplesEveryIteration
 

Additional Inherited Members

- 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 Attributes inherited from elastix::BaseComponentSE< TElastix >
ConfigurationPointer m_Configuration {}
 
ElastixPointer m_Elastix {}
 
RegistrationPointer m_Registration {}
 

Member Typedef Documentation

◆ ConfigurationPointer

template<class TElastix >
typedef Superclass::ConfigurationPointer elastix::OptimizerBase< TElastix >::ConfigurationPointer

Definition at line 68 of file elxOptimizerBase.h.

◆ ConfigurationType

template<class TElastix >
typedef Superclass::ConfigurationType elastix::OptimizerBase< TElastix >::ConfigurationType

Definition at line 67 of file elxOptimizerBase.h.

◆ ElastixPointer

template<class TElastix >
typedef Superclass::ElastixPointer elastix::OptimizerBase< TElastix >::ElastixPointer

Definition at line 66 of file elxOptimizerBase.h.

◆ ElastixType

template<class TElastix >
typedef Superclass::ElastixType elastix::OptimizerBase< TElastix >::ElastixType

Typedefs inherited from Elastix.

Definition at line 65 of file elxOptimizerBase.h.

◆ ITKBaseType

template<class TElastix >
typedef itk::Optimizer elastix::OptimizerBase< TElastix >::ITKBaseType

ITKBaseType.

Definition at line 73 of file elxOptimizerBase.h.

◆ ParametersType

template<class TElastix >
typedef ITKBaseType::ParametersType elastix::OptimizerBase< TElastix >::ParametersType

Typedef needed for the SetCurrentPositionPublic function.

Definition at line 76 of file elxOptimizerBase.h.

◆ RegistrationPointer

template<class TElastix >
typedef Superclass::RegistrationPointer elastix::OptimizerBase< TElastix >::RegistrationPointer

Definition at line 70 of file elxOptimizerBase.h.

◆ RegistrationType

template<class TElastix >
typedef Superclass::RegistrationType elastix::OptimizerBase< TElastix >::RegistrationType

Definition at line 69 of file elxOptimizerBase.h.

◆ Self

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

Standard ITK-stuff.

Definition at line 58 of file elxOptimizerBase.h.

◆ Superclass

template<class TElastix >
typedef BaseComponentSE< TElastix > elastix::OptimizerBase< TElastix >::Superclass

Definition at line 59 of file elxOptimizerBase.h.

Constructor & Destructor Documentation

◆ OptimizerBase() [1/2]

template<class TElastix >
elastix::OptimizerBase< TElastix >::OptimizerBase ( )
protected

The constructor.

◆ ~OptimizerBase()

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

The destructor.

Definition at line 116 of file elxOptimizerBase.h.

◆ OptimizerBase() [2/2]

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

The private constructor.

Member Function Documentation

◆ AfterRegistrationBase()

template<class TElastix >
void elastix::OptimizerBase< TElastix >::AfterRegistrationBase ( void  )
overridevirtual

Execute stuff after registration:

  • Compute and print MD5 hash of the transform parameters.

Reimplemented from elastix::BaseComponent.

◆ BeforeEachResolutionBase()

template<class TElastix >
void elastix::OptimizerBase< TElastix >::BeforeEachResolutionBase ( )
overridevirtual

Execute stuff before each new pyramid resolution:

  • Find out if new samples are used every new iteration in this resolution.

Reimplemented from elastix::BaseComponent.

◆ GetAsITKBaseType() [1/2]

template<class TElastix >
virtual ITKBaseType * elastix::OptimizerBase< TElastix >::GetAsITKBaseType ( void  )
inlinevirtual

Cast to ITKBaseType.

Definition at line 79 of file elxOptimizerBase.h.

◆ GetAsITKBaseType() [2/2]

template<class TElastix >
virtual const ITKBaseType * elastix::OptimizerBase< TElastix >::GetAsITKBaseType ( void  ) const
inlinevirtual

Cast to ITKBaseType, to use in const functions.

Definition at line 86 of file elxOptimizerBase.h.

◆ GetClassName()

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

◆ GetNewSamplesEveryIteration()

template<class TElastix >
virtual bool elastix::OptimizerBase< TElastix >::GetNewSamplesEveryIteration ( void  ) const
protectedvirtual

Check whether the user asked to select new samples every iteration.

◆ operator=()

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

The private copy constructor.

◆ SelectNewSamples()

template<class TElastix >
virtual void elastix::OptimizerBase< TElastix >::SelectNewSamples ( void  )
protectedvirtual

Force the metric to base its computation on a new subset of image samples. Not every metric may have implemented this.

◆ SetCurrentPositionPublic()

template<class TElastix >
virtual void elastix::OptimizerBase< TElastix >::SetCurrentPositionPublic ( const ParametersType param)
virtual

Add empty SetCurrentPositionPublic, so this function is known in every inherited class.

◆ SetSinusScales()

template<class TElastix >
virtual void elastix::OptimizerBase< TElastix >::SetSinusScales ( double  amplitude,
double  frequency,
unsigned long  numberOfParameters 
)
virtual

Method that sets the scales defined by a sinus scale[i] = amplitude^( sin(i/nrofparam*2pi*frequency) )

Field Documentation

◆ m_NewSamplesEveryIteration

template<class TElastix >
bool elastix::OptimizerBase< TElastix >::m_NewSamplesEveryIteration
private

Member variable to store the user preference for using new samples each iteration.

Definition at line 136 of file elxOptimizerBase.h.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo