Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ExhaustiveOptimizer Class Reference
[NumericsOptimizers]

Optimizer that fully samples a grid on the parametric space. More...

#include <itkExhaustiveOptimizer.h>

Inheritance diagram for itk::ExhaustiveOptimizer:

Inheritance graph
[legend]
Collaboration diagram for itk::ExhaustiveOptimizer:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ExhaustiveOptimizer Self
typedef SingleValuedNonLinearOptimizer Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef Array< unsigned long > StepsType

Public Member Functions

virtual const char * GetNameOfClass () const
virtual void StartOptimization (void)
void StartWalking (void)
void ResumeWalking (void)
void StopWalking (void)
virtual void SetStepLength (double _arg)
virtual void SetNumberOfSteps (StepsType _arg)
virtual const double & GetStepLength ()
virtual const StepsTypeGetNumberOfSteps ()
virtual const MeasureTypeGetCurrentValue ()
virtual const MeasureTypeGetMaximumMetricValue ()
virtual const MeasureTypeGetMinimumMetricValue ()
virtual const ParametersTypeGetMinimumMetricValuePosition ()
virtual const ParametersTypeGetMaximumMetricValuePosition ()
virtual const ParametersTypeGetCurrentIndex ()
virtual const unsigned long & GetMaximumNumberOfIterations ()

Static Public Member Functions

Pointer New ()

Protected Member Functions

 ExhaustiveOptimizer ()
virtual ~ExhaustiveOptimizer ()
void PrintSelf (std::ostream &os, Indent indent) const
void AdvanceOneStep (void)
void IncrementIndex (ParametersType &param)

Protected Attributes

MeasureType m_CurrentValue
StepsType m_NumberOfSteps
unsigned long m_CurrentIteration
bool m_Stop
unsigned int m_CurrentParameter
double m_StepLength
ParametersType m_CurrentIndex
unsigned long m_MaximumNumberOfIterations
MeasureType m_MaximumMetricValue
MeasureType m_MinimumMetricValue
ParametersType m_MinimumMetricValuePosition
ParametersType m_MaximumMetricValuePosition

Detailed Description

Optimizer that fully samples a grid on the parametric space.

This optimizer is equivalent to an exahaustive search in a discrete grid defined over the parametric space. The grid parameters are define through an array of minimum and maximum values. The subdivisions of the grid along each one of the dimensions of the parametric space is defined by an array of number of steps. This optimizer is useful when its needed to plot the entire metric space to get an idea of how noisy it is etc...

A typical use of the optimizer is to plot the metric space to get an idea of how noisy it is. An example is given below, where it is desired to plot the metric space with respect to translations along x, y and z in a 3D registration application: Here it is assumed that the transform is Euler3DTransform.

 OptimizerType::StepsType steps( m_Transform->GetNumberOfParameters() );
 steps[1] = 0;  
 steps[2] = 0;  
 steps[3] = 0;  
 steps[3] = 10;
 steps[4] = 10;
 steps[5] = 10;
 m_Optimizer->SetNumberOfSteps( steps );
 m_Optimizer->SetStepLength( 2 );

The optimizer throws IterationEvents after every iteration. We use this to plot the metric space in an image as follows:

  if( itk::IterationEvent().CheckEvent(& event ) )
    {
    IndexType index;
    index[0] = m_Optimizer->GetCurrentIndex()[3];
    index[1] = m_Optimizer->GetCurrentIndex()[1];
    index[2] = m_Optimizer->GetCurrentIndex()[2];
    image->SetPixel( index, m_Optimizer->GetCurrentValue() );
    }

The image size is expected to be 21 x 21 x 21 with a spacing of 2.

If you wish to use different step lengths along each parametric axis, you can use the SetScales() method. This accepts an array, each element represents the number of subdivisions per step length. For instance scales of [0 0 0 0.5 1 4 ] along with a step length of 2 will cause the optimizer to search the metric space on a grid with x,y,z spacing of [1 2 8].

Definition at line 81 of file itkExhaustiveOptimizer.h.


Member Typedef Documentation

typedef SmartPointer<const Self> itk::ExhaustiveOptimizer::ConstPointer
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Definition at line 89 of file itkExhaustiveOptimizer.h.

typedef SmartPointer<Self> itk::ExhaustiveOptimizer::Pointer
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Definition at line 88 of file itkExhaustiveOptimizer.h.

typedef ExhaustiveOptimizer itk::ExhaustiveOptimizer::Self
 

Standard "Self" typedef.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Definition at line 86 of file itkExhaustiveOptimizer.h.

typedef Array< unsigned long > itk::ExhaustiveOptimizer::StepsType
 

Definition at line 91 of file itkExhaustiveOptimizer.h.

typedef SingleValuedNonLinearOptimizer itk::ExhaustiveOptimizer::Superclass
 

Reimplemented from itk::SingleValuedNonLinearOptimizer.

Definition at line 87 of file itkExhaustiveOptimizer.h.


Constructor & Destructor Documentation

itk::ExhaustiveOptimizer::ExhaustiveOptimizer  )  [protected]
 

virtual itk::ExhaustiveOptimizer::~ExhaustiveOptimizer  )  [inline, protected, virtual]
 

Definition at line 119 of file itkExhaustiveOptimizer.h.


Member Function Documentation

void itk::ExhaustiveOptimizer::AdvanceOneStep void   )  [protected]
 

Advance one step following the gradient direction This method verifies if a change in direction is required and if a reduction in steplength is required.

virtual const ParametersType& itk::ExhaustiveOptimizer::GetCurrentIndex  )  [virtual]
 

virtual const MeasureType& itk::ExhaustiveOptimizer::GetCurrentValue  )  [virtual]
 

virtual const MeasureType& itk::ExhaustiveOptimizer::GetMaximumMetricValue  )  [virtual]
 

virtual const ParametersType& itk::ExhaustiveOptimizer::GetMaximumMetricValuePosition  )  [virtual]
 

virtual const unsigned long& itk::ExhaustiveOptimizer::GetMaximumNumberOfIterations  )  [virtual]
 

virtual const MeasureType& itk::ExhaustiveOptimizer::GetMinimumMetricValue  )  [virtual]
 

virtual const ParametersType& itk::ExhaustiveOptimizer::GetMinimumMetricValuePosition  )  [virtual]
 

virtual const char* itk::ExhaustiveOptimizer::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedNonLinearOptimizer.

virtual const StepsType& itk::ExhaustiveOptimizer::GetNumberOfSteps  )  [virtual]
 

virtual const double& itk::ExhaustiveOptimizer::GetStepLength  )  [virtual]
 

void itk::ExhaustiveOptimizer::IncrementIndex ParametersType param  )  [protected]
 

Advance one step following the gradient direction This method verifies if a change in direction is required and if a reduction in steplength is required.

Pointer itk::ExhaustiveOptimizer::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

void itk::ExhaustiveOptimizer::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::SingleValuedNonLinearOptimizer.

void itk::ExhaustiveOptimizer::ResumeWalking void   ) 
 

virtual void itk::ExhaustiveOptimizer::SetNumberOfSteps StepsType  _arg  )  [virtual]
 

virtual void itk::ExhaustiveOptimizer::SetStepLength double  _arg  )  [virtual]
 

virtual void itk::ExhaustiveOptimizer::StartOptimization void   )  [virtual]
 

Start optimization.

Reimplemented from itk::Optimizer.

void itk::ExhaustiveOptimizer::StartWalking void   ) 
 

void itk::ExhaustiveOptimizer::StopWalking void   ) 
 


Member Data Documentation

ParametersType itk::ExhaustiveOptimizer::m_CurrentIndex [protected]
 

Definition at line 142 of file itkExhaustiveOptimizer.h.

unsigned long itk::ExhaustiveOptimizer::m_CurrentIteration [protected]
 

Definition at line 138 of file itkExhaustiveOptimizer.h.

unsigned int itk::ExhaustiveOptimizer::m_CurrentParameter [protected]
 

Definition at line 140 of file itkExhaustiveOptimizer.h.

MeasureType itk::ExhaustiveOptimizer::m_CurrentValue [protected]
 

Definition at line 136 of file itkExhaustiveOptimizer.h.

MeasureType itk::ExhaustiveOptimizer::m_MaximumMetricValue [protected]
 

Definition at line 144 of file itkExhaustiveOptimizer.h.

ParametersType itk::ExhaustiveOptimizer::m_MaximumMetricValuePosition [protected]
 

Definition at line 147 of file itkExhaustiveOptimizer.h.

unsigned long itk::ExhaustiveOptimizer::m_MaximumNumberOfIterations [protected]
 

Definition at line 143 of file itkExhaustiveOptimizer.h.

MeasureType itk::ExhaustiveOptimizer::m_MinimumMetricValue [protected]
 

Definition at line 145 of file itkExhaustiveOptimizer.h.

ParametersType itk::ExhaustiveOptimizer::m_MinimumMetricValuePosition [protected]
 

Definition at line 146 of file itkExhaustiveOptimizer.h.

StepsType itk::ExhaustiveOptimizer::m_NumberOfSteps [protected]
 

Definition at line 137 of file itkExhaustiveOptimizer.h.

double itk::ExhaustiveOptimizer::m_StepLength [protected]
 

Definition at line 141 of file itkExhaustiveOptimizer.h.

bool itk::ExhaustiveOptimizer::m_Stop [protected]
 

Definition at line 139 of file itkExhaustiveOptimizer.h.


The documentation for this class was generated from the following file:
Generated at Thu May 25 00:51:39 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000