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

#include <elxFullSearchOptimizer.h>

Detailed Description

template<class TElastix>
class elastix::FullSearch< TElastix >

An optimizer based on the itk::FullSearchOptimizer.

Optimizer that scans a subspace of the parameter space and searches for the best parameters.

The results are written to the output-directory as an image OptimizationSurface.<elastixlevel>.R<resolution>.mhd", which is an N-dimensional float image, where N is the dimension of the search space.

The parameters used in this class are:

Parameters:

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

FullSearchSpace<r>: Defines for resolution r a range of parameters to scan.
Full syntax: (FullSearchSpace<r> <parameter_name> <parameter_nr> <min> <max> <stepsize> [...] )
example: (FullSearchSpace0 "translation_x" 2 -4.0 3.0 1.0 "rotation_y" 3 -1.0 1.0 0.5)
This varies the second transform parameter in the range [-4.0 3.0] with steps of 1.0 and the third parameter in the range [-1.0 1.0] with steps of 0.5. The names are used as column headers in the screen output.

See also
FullSearchOptimizer

Definition at line 57 of file elxFullSearchOptimizer.h.

+ Inheritance diagram for elastix::FullSearch< 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 std::map< unsigned int, std::string > DimensionNameMapType
 
typedef Superclass2::ElastixPointer ElastixPointer
 
typedef Superclass2::ElastixType ElastixType
 
typedef Superclass2::ITKBaseType ITKBaseType
 
typedef Superclass1::MeasureType MeasureType
 
typedef DimensionNameMapType::const_iterator NameIteratorType
 
typedef NDImageType::Pointer NDImagePointer
 
typedef itk::NDImageBase< floatNDImageType
 
typedef Superclass1::ParametersType ParametersType
 
typedef Superclass1::ParameterValueType ParameterValueType
 
typedef itk::SmartPointer< SelfPointer
 
typedef Superclass1::RangeType RangeType
 
typedef Superclass1::RangeValueType RangeValueType
 
typedef Superclass2::RegistrationPointer RegistrationPointer
 
typedef Superclass2::RegistrationType RegistrationType
 
typedef Superclass1::SearchSpaceIndexType SearchSpaceIndexType
 
typedef Superclass1::SearchSpaceIteratorType SearchSpaceIteratorType
 
typedef Superclass1::SearchSpacePointer SearchSpacePointer
 
typedef Superclass1::SearchSpacePointType SearchSpacePointType
 
typedef Superclass1::SearchSpaceSizeType SearchSpaceSizeType
 
typedef Superclass1::SearchSpaceType SearchSpaceType
 
typedef FullSearch Self
 
typedef itk::FullSearchOptimizer Superclass1
 
typedef OptimizerBase< TElastix > Superclass2
 
- Public Types inherited from itk::FullSearchOptimizer
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::CostFunctionPointer CostFunctionPointer
 
typedef Superclass::CostFunctionType CostFunctionType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef ParametersType::ValueType ParameterValueType
 
typedef SmartPointer< SelfPointer
 
typedef FixedArray< RangeValueType, 3 > RangeType
 
typedef ParameterValueType RangeValueType
 
typedef Array< IndexValueType > SearchSpaceIndexType
 
typedef SearchSpaceType::ConstIterator SearchSpaceIteratorType
 
typedef SearchSpaceType::Pointer SearchSpacePointer
 
typedef Array< ParameterValueTypeSearchSpacePointType
 
typedef Array< SizeValueType > SearchSpaceSizeType
 
typedef MapContainer< unsigned int, RangeTypeSearchSpaceType
 
typedef FullSearchOptimizer Self
 
enum  StopConditionType { FullRangeSearched , 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 ("FullSearch")
 
virtual const char * GetClassName () const
 
 itkGetModifiableObjectMacro (OptimizationSurface, NDImageType)
 
- Public Member Functions inherited from itk::FullSearchOptimizer
virtual void AddSearchDimension (unsigned int param_nr, RangeValueType minimum, RangeValueType maximum, RangeValueType step)
 
virtual const SearchSpaceIndexTypeGetBestIndexInSearchSpace ()
 
virtual const SearchSpacePointTypeGetBestPointInSearchSpace ()
 
virtual double GetBestValue () const
 
virtual const char * GetClassName () const
 
virtual const SearchSpaceIndexTypeGetCurrentIndexInSearchSpace ()
 
virtual unsigned long GetCurrentIteration () const
 
virtual const SearchSpacePointTypeGetCurrentPointInSearchSpace ()
 
virtual bool GetMaximize () const
 
bool GetMinimize () const
 
virtual unsigned long GetNumberOfIterations (void)
 
virtual unsigned int GetNumberOfSearchSpaceDimensions (void)
 
virtual const SearchSpaceSizeTypeGetSearchSpaceSize (void)
 
virtual StopConditionType GetStopCondition () const
 
virtual double GetValue () const
 
virtual SearchSpacePointType IndexToPoint (const SearchSpaceIndexType &index)
 
virtual ParametersType IndexToPosition (const SearchSpaceIndexType &index)
 
 itkGetModifiableObjectMacro (SearchSpace, SearchSpaceType)
 
virtual void MaximizeOff ()
 
virtual void MaximizeOn ()
 
void MinimizeOff ()
 
void MinimizeOn ()
 
virtual ParametersType PointToPosition (const SearchSpacePointType &point)
 
virtual void RemoveSearchDimension (unsigned int param_nr)
 
virtual void ResumeOptimization (void)
 
virtual void SetMaximize (bool _arg)
 
void SetMinimize (bool v)
 
virtual void SetSearchSpace (SearchSpaceType *_arg)
 
void StartOptimization (void) override
 
virtual void StopOptimization (void)
 
virtual void UpdateCurrentPosition (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::FullSearchOptimizer
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

virtual bool CheckSearchSpaceRangeDefinition (const std::string &fullFieldName, const bool found, const unsigned int entry_nr) const
 
 FullSearch ()
 
 ~FullSearch () override
 
- Protected Member Functions inherited from itk::FullSearchOptimizer
 FullSearchOptimizer ()
 
virtual void ProcessSearchSpaceChanges (void)
 
 ~FullSearchOptimizer () 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
 

Protected Attributes

NDImagePointer m_OptimizationSurface
 
DimensionNameMapType m_SearchSpaceDimensionNames
 
- Protected Attributes inherited from itk::FullSearchOptimizer
SearchSpaceIndexType m_BestIndexInSearchSpace
 
SearchSpacePointType m_BestPointInSearchSpace
 
double m_BestValue
 
SearchSpaceIndexType m_CurrentIndexInSearchSpace
 
SearchSpacePointType m_CurrentPointInSearchSpace
 
unsigned long m_LastSearchSpaceChanges
 
bool m_Maximize
 
unsigned int m_NumberOfSearchSpaceDimensions
 
SearchSpacePointer m_SearchSpace
 
SearchSpaceSizeType m_SearchSpaceSize
 
bool m_Stop
 
StopConditionType m_StopCondition
 
double m_Value
 
- Protected Attributes inherited from elastix::BaseComponentSE< TElastix >
ConfigurationPointer m_Configuration {}
 
ElastixPointer m_Elastix {}
 
RegistrationPointer m_Registration {}
 

Private Member Functions

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

Member Typedef Documentation

◆ ConfigurationPointer

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

Definition at line 103 of file elxFullSearchOptimizer.h.

◆ ConfigurationType

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

Definition at line 102 of file elxFullSearchOptimizer.h.

◆ ConstPointer

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

Definition at line 70 of file elxFullSearchOptimizer.h.

◆ CostFunctionPointer

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

Definition at line 86 of file elxFullSearchOptimizer.h.

◆ CostFunctionType

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

Typedef's inherited from Superclass1.

Definition at line 85 of file elxFullSearchOptimizer.h.

◆ DimensionNameMapType

template<class TElastix >
typedef std::map< unsigned int, std::string > elastix::FullSearch< TElastix >::DimensionNameMapType

To store the names of the search space dimensions

Definition at line 113 of file elxFullSearchOptimizer.h.

◆ ElastixPointer

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

Definition at line 101 of file elxFullSearchOptimizer.h.

◆ ElastixType

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

Typedef's inherited from Elastix.

Definition at line 100 of file elxFullSearchOptimizer.h.

◆ ITKBaseType

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

Definition at line 106 of file elxFullSearchOptimizer.h.

◆ MeasureType

template<class TElastix >
typedef Superclass1::MeasureType elastix::FullSearch< TElastix >::MeasureType

Definition at line 88 of file elxFullSearchOptimizer.h.

◆ NameIteratorType

template<class TElastix >
typedef DimensionNameMapType::const_iterator elastix::FullSearch< TElastix >::NameIteratorType

Definition at line 114 of file elxFullSearchOptimizer.h.

◆ NDImagePointer

template<class TElastix >
typedef NDImageType::Pointer elastix::FullSearch< TElastix >::NDImagePointer

Definition at line 110 of file elxFullSearchOptimizer.h.

◆ NDImageType

template<class TElastix >
typedef itk::NDImageBase< float > elastix::FullSearch< TElastix >::NDImageType

To store the results of the full search

Definition at line 109 of file elxFullSearchOptimizer.h.

◆ ParametersType

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

Definition at line 87 of file elxFullSearchOptimizer.h.

◆ ParameterValueType

template<class TElastix >
typedef Superclass1::ParameterValueType elastix::FullSearch< TElastix >::ParameterValueType

Definition at line 89 of file elxFullSearchOptimizer.h.

◆ Pointer

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

Definition at line 69 of file elxFullSearchOptimizer.h.

◆ RangeType

template<class TElastix >
typedef Superclass1::RangeType elastix::FullSearch< TElastix >::RangeType

Definition at line 91 of file elxFullSearchOptimizer.h.

◆ RangeValueType

template<class TElastix >
typedef Superclass1::RangeValueType elastix::FullSearch< TElastix >::RangeValueType

Definition at line 90 of file elxFullSearchOptimizer.h.

◆ RegistrationPointer

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

Definition at line 105 of file elxFullSearchOptimizer.h.

◆ RegistrationType

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

Definition at line 104 of file elxFullSearchOptimizer.h.

◆ SearchSpaceIndexType

template<class TElastix >
typedef Superclass1::SearchSpaceIndexType elastix::FullSearch< TElastix >::SearchSpaceIndexType

Definition at line 96 of file elxFullSearchOptimizer.h.

◆ SearchSpaceIteratorType

template<class TElastix >
typedef Superclass1::SearchSpaceIteratorType elastix::FullSearch< TElastix >::SearchSpaceIteratorType

Definition at line 94 of file elxFullSearchOptimizer.h.

◆ SearchSpacePointer

template<class TElastix >
typedef Superclass1::SearchSpacePointer elastix::FullSearch< TElastix >::SearchSpacePointer

Definition at line 93 of file elxFullSearchOptimizer.h.

◆ SearchSpacePointType

template<class TElastix >
typedef Superclass1::SearchSpacePointType elastix::FullSearch< TElastix >::SearchSpacePointType

Definition at line 95 of file elxFullSearchOptimizer.h.

◆ SearchSpaceSizeType

template<class TElastix >
typedef Superclass1::SearchSpaceSizeType elastix::FullSearch< TElastix >::SearchSpaceSizeType

Definition at line 97 of file elxFullSearchOptimizer.h.

◆ SearchSpaceType

template<class TElastix >
typedef Superclass1::SearchSpaceType elastix::FullSearch< TElastix >::SearchSpaceType

Definition at line 92 of file elxFullSearchOptimizer.h.

◆ Self

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

Standard ITK.

Definition at line 66 of file elxFullSearchOptimizer.h.

◆ Superclass1

template<class TElastix >
typedef itk::FullSearchOptimizer elastix::FullSearch< TElastix >::Superclass1

Definition at line 67 of file elxFullSearchOptimizer.h.

◆ Superclass2

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

Definition at line 68 of file elxFullSearchOptimizer.h.

Constructor & Destructor Documentation

◆ FullSearch() [1/2]

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

◆ ~FullSearch()

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

Definition at line 135 of file elxFullSearchOptimizer.h.

◆ FullSearch() [2/2]

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

Member Function Documentation

◆ AfterEachIteration()

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

Reimplemented from elastix::BaseComponent.

◆ AfterEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ AfterRegistration()

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

Reimplemented from elastix::BaseComponent.

◆ BeforeEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ BeforeRegistration()

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

Methods that have to be present everywhere.

Reimplemented from elastix::BaseComponent.

◆ CheckSearchSpaceRangeDefinition()

template<class TElastix >
virtual bool elastix::FullSearch< TElastix >::CheckSearchSpaceRangeDefinition ( const std::string &  fullFieldName,
const bool  found,
const unsigned int  entry_nr 
) const
protectedvirtual

Checks if an error generated while reading the search space ranges from the parameter file is a real error. Prints some error message if so.

◆ elxClassNameMacro()

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

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

◆ GetClassName()

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

Run-time type information (and related methods).

Reimplemented from itk::FullSearchOptimizer.

◆ itkGetModifiableObjectMacro()

template<class TElastix >
elastix::FullSearch< TElastix >::itkGetModifiableObjectMacro ( OptimizationSurface  ,
NDImageType   
)
Todo:
BeforeAll, checking parameters.

Get a pointer to the image containing the optimization surface.

◆ New()

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

Method for creation through the object factory.

◆ operator=()

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

Field Documentation

◆ m_OptimizationSurface

template<class TElastix >
NDImagePointer elastix::FullSearch< TElastix >::m_OptimizationSurface
protected

Definition at line 137 of file elxFullSearchOptimizer.h.

◆ m_SearchSpaceDimensionNames

template<class TElastix >
DimensionNameMapType elastix::FullSearch< TElastix >::m_SearchSpaceDimensionNames
protected

Definition at line 139 of file elxFullSearchOptimizer.h.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo