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 Attributes
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 >:
Inheritance graph
[legend]

Public Types

using ConstPointer = itk::SmartPointer< const Self >
 
using DimensionNameMapType = std::map< unsigned int, std::string >
 
using ITKBaseType = typename Superclass2::ITKBaseType
 
using NameIteratorType = typename DimensionNameMapType::const_iterator
 
using NDImagePointer = typename NDImageType::Pointer
 
using NDImageType = itk::NDImageBase< float >
 
using ParameterValueType = ParametersType::ValueType
 
using Pointer = itk::SmartPointer< Self >
 
using RangeType = FixedArray< RangeValueType, 3 >
 
using RangeValueType = ParameterValueType
 
using SearchSpaceIndexType = Array< IndexValueType >
 
using SearchSpaceIteratorType = SearchSpaceType::ConstIterator
 
using SearchSpacePointer = SearchSpaceType::Pointer
 
using SearchSpacePointType = Array< ParameterValueType >
 
using SearchSpaceSizeType = Array< SizeValueType >
 
using SearchSpaceType = MapContainer< unsigned int, RangeType >
 
using Self = FullSearch
 
using Superclass1 = itk::FullSearchOptimizer
 
using Superclass2 = OptimizerBase< TElastix >
 
- Public Types inherited from itk::FullSearchOptimizer
using ConstPointer = SmartPointer< const Self >
 
using ParameterValueType = ParametersType::ValueType
 
using Pointer = SmartPointer< Self >
 
using RangeType = FixedArray< RangeValueType, 3 >
 
using RangeValueType = ParameterValueType
 
using SearchSpaceIndexType = Array< IndexValueType >
 
using SearchSpaceIteratorType = SearchSpaceType::ConstIterator
 
using SearchSpacePointer = SearchSpaceType::Pointer
 
using SearchSpacePointType = Array< ParameterValueType >
 
using SearchSpaceSizeType = Array< SizeValueType >
 
using SearchSpaceType = MapContainer< unsigned int, RangeType >
 
using Self = FullSearchOptimizer
 
enum  StopConditionType { FullRangeSearched , MetricError }
 
using Superclass = SingleValuedNonLinearOptimizer
 
- Public Types inherited from elastix::OptimizerBase< TElastix >
using ElastixType = TElastix
 
using ITKBaseType = itk::Optimizer
 
using ParametersType = typename ITKBaseType::ParametersType
 
using RegistrationType = typename ElastixType::RegistrationBaseType
 
using Self = OptimizerBase
 
using Superclass = BaseComponentSE< TElastix >
 
- Public Types inherited from elastix::BaseComponentSE< TElastix >
using ConfigurationPointer = Configuration::Pointer
 
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 ("FullSearch")
 
virtual const char * GetClassName () const
 
 ITK_DISALLOW_COPY_AND_MOVE (FullSearch)
 
 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 ()
 
virtual unsigned int GetNumberOfSearchSpaceDimensions ()
 
virtual const SearchSpaceSizeTypeGetSearchSpaceSize ()
 
virtual StopConditionType GetStopCondition () const
 
virtual double GetValue () const
 
virtual SearchSpacePointType IndexToPoint (const SearchSpaceIndexType &index)
 
virtual ParametersType IndexToPosition (const SearchSpaceIndexType &index)
 
 ITK_DISALLOW_COPY_AND_MOVE (FullSearchOptimizer)
 
 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 ()
 
virtual void SetMaximize (bool _arg)
 
void SetMinimize (bool v)
 
virtual void SetSearchSpace (SearchSpaceType *_arg)
 
void StartOptimization () override
 
virtual void StopOptimization ()
 
virtual void UpdateCurrentPosition ()
 
- Public Member Functions inherited from elastix::OptimizerBase< TElastix >
void AfterRegistrationBase () override
 
void BeforeEachResolutionBase () override
 
ITKBaseTypeGetAsITKBaseType ()
 
const ITKBaseTypeGetAsITKBaseType () const
 
virtual const char * GetClassName () 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)
 
ConfigurationGetConfiguration () const
 
ElastixTypeGetElastix () const
 
xl::xoutbaseGetIterationInfoAt (const char *const name)
 
RegistrationTypeGetRegistration () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponentSE)
 
int RemoveTargetCellFromIterationInfo (const char *const name)
 
void SetConfiguration (Configuration *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIteration ()
 
virtual void AfterEachIterationBase ()
 
virtual void AfterEachResolution ()
 
virtual void AfterEachResolutionBase ()
 
virtual void AfterRegistration ()
 
virtual void AfterRegistrationBase ()
 
virtual int BeforeAll ()
 
virtual int BeforeAllBase ()
 
virtual void BeforeEachResolution ()
 
virtual void BeforeEachResolutionBase ()
 
virtual void BeforeRegistration ()
 
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::FullSearchOptimizer
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

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

Protected Attributes

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

Private Attributes

 elxOverrideGetSelfMacro
 

Member Typedef Documentation

◆ ConstPointer

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

Definition at line 69 of file elxFullSearchOptimizer.h.

◆ DimensionNameMapType

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

To store the names of the search space dimensions

Definition at line 108 of file elxFullSearchOptimizer.h.

◆ ITKBaseType

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

Definition at line 101 of file elxFullSearchOptimizer.h.

◆ NameIteratorType

template<class TElastix >
using elastix::FullSearch< TElastix >::NameIteratorType = typename DimensionNameMapType::const_iterator

Definition at line 109 of file elxFullSearchOptimizer.h.

◆ NDImagePointer

template<class TElastix >
using elastix::FullSearch< TElastix >::NDImagePointer = typename NDImageType::Pointer

Definition at line 105 of file elxFullSearchOptimizer.h.

◆ NDImageType

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

To store the results of the full search

Definition at line 104 of file elxFullSearchOptimizer.h.

◆ ParameterValueType

template<class TElastix >
using itk::FullSearchOptimizer::ParameterValueType = ParametersType::ValueType

Definition at line 76 of file itkFullSearchOptimizer.h.

◆ Pointer

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

Definition at line 68 of file elxFullSearchOptimizer.h.

◆ RangeType

template<class TElastix >
using itk::FullSearchOptimizer::RangeType = FixedArray<RangeValueType, 3>

Definition at line 78 of file itkFullSearchOptimizer.h.

◆ RangeValueType

Definition at line 77 of file itkFullSearchOptimizer.h.

◆ SearchSpaceIndexType

template<class TElastix >
using itk::FullSearchOptimizer::SearchSpaceIndexType = Array<IndexValueType>

The same values, but transformed to integer indices. These can be used to create an image visualizing the search space.

Definition at line 89 of file itkFullSearchOptimizer.h.

◆ SearchSpaceIteratorType

template<class TElastix >
using itk::FullSearchOptimizer::SearchSpaceIteratorType = SearchSpaceType::ConstIterator

Definition at line 81 of file itkFullSearchOptimizer.h.

◆ SearchSpacePointer

template<class TElastix >
using itk::FullSearchOptimizer::SearchSpacePointer = SearchSpaceType::Pointer

Definition at line 80 of file itkFullSearchOptimizer.h.

◆ SearchSpacePointType

template<class TElastix >
using itk::FullSearchOptimizer::SearchSpacePointType = Array<ParameterValueType>

Type that stores the parameter values of the parameters to be optimized. Updated every iteration.

Definition at line 85 of file itkFullSearchOptimizer.h.

◆ SearchSpaceSizeType

template<class TElastix >
using itk::FullSearchOptimizer::SearchSpaceSizeType = Array<SizeValueType>

The size of each dimension to be searched ((max-min)/step))

Definition at line 92 of file itkFullSearchOptimizer.h.

◆ SearchSpaceType

template<class TElastix >
using itk::FullSearchOptimizer::SearchSpaceType = MapContainer<unsigned int, RangeType>

Definition at line 79 of file itkFullSearchOptimizer.h.

◆ Self

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

Standard ITK.

Definition at line 65 of file elxFullSearchOptimizer.h.

◆ Superclass1

template<class TElastix >
using elastix::FullSearch< TElastix >::Superclass1 = itk::FullSearchOptimizer

Definition at line 66 of file elxFullSearchOptimizer.h.

◆ Superclass2

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

Definition at line 67 of file elxFullSearchOptimizer.h.

Constructor & Destructor Documentation

◆ FullSearch()

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

◆ ~FullSearch()

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

Member Function Documentation

◆ AfterEachIteration()

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

Reimplemented from elastix::BaseComponent.

◆ AfterEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ AfterRegistration()

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

Reimplemented from elastix::BaseComponent.

◆ BeforeEachResolution()

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

Reimplemented from elastix::BaseComponent.

◆ BeforeRegistration()

template<class TElastix >
void elastix::FullSearch< TElastix >::BeforeRegistration ( )
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.

◆ ITK_DISALLOW_COPY_AND_MOVE()

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

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

Field Documentation

◆ elxOverrideGetSelfMacro

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

Definition at line 152 of file elxFullSearchOptimizer.h.

◆ m_OptimizationSurface

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

Definition at line 136 of file elxFullSearchOptimizer.h.

◆ m_SearchSpaceDimensionNames

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

Definition at line 138 of file elxFullSearchOptimizer.h.



Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo