![]() |
ITK
5.4.0
Insight Toolkit
|
#include <itkExhaustiveOptimizer.h>
Public Member Functions | |
virtual const ParametersType & | GetCurrentIndex () const |
virtual const MeasureType & | GetCurrentValue () const |
virtual const MeasureType & | GetMaximumMetricValue () const |
virtual const ParametersType & | GetMaximumMetricValuePosition () const |
virtual const SizeValueType & | GetMaximumNumberOfIterations () const |
virtual const MeasureType & | GetMinimumMetricValue () const |
virtual const ParametersType & | GetMinimumMetricValuePosition () const |
virtual const char * | GetNameOfClass () const |
virtual const StepsType & | GetNumberOfSteps () const |
virtual const double & | GetStepLength () const |
const std::string | GetStopConditionDescription () const override |
void | ResumeWalking () |
virtual void | SetNumberOfSteps (StepsType _arg) |
virtual void | SetStepLength (double _arg) |
void | StartOptimization () override |
void | StartWalking () |
void | StopWalking () |
![]() | |
virtual CostFunctionType * | GetModifiableCostFunction () |
MeasureType | GetValue (const ParametersType ¶meters) const |
virtual void | SetCostFunction (CostFunctionType *costFunction) |
![]() | |
virtual const ParametersType & | GetCurrentPosition () const |
virtual const ParametersType & | GetInitialPosition () const |
virtual void | SetInitialPosition (const ParametersType ¶m) |
void | SetScales (const ScalesType &scales) |
virtual const ScalesType & | GetScales () const |
virtual const ScalesType & | GetInverseScales () const |
![]() | |
unsigned long | AddObserver (const EventObject &event, Command *) |
unsigned long | AddObserver (const EventObject &event, Command *) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
![]() | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
itkTypeMacroNoParent (LightObject) | |
void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static Pointer | New () |
![]() | |
static Pointer | New () |
![]() | |
static Pointer | New () |
![]() | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
![]() | |
static void | BreakOnError () |
static Pointer | New () |
Protected Member Functions | |
void | AdvanceOneStep () |
ExhaustiveOptimizer () | |
void | IncrementIndex (ParametersType &newPosition) |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~ExhaustiveOptimizer () override=default | |
![]() | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
SingleValuedNonLinearOptimizer () | |
~SingleValuedNonLinearOptimizer () override=default | |
![]() | |
NonLinearOptimizer ()=default | |
~NonLinearOptimizer () override | |
![]() | |
Optimizer () | |
virtual void | SetCurrentPosition (const ParametersType ¶m) |
~Optimizer () override=default | |
![]() | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
![]() | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Protected Attributes | |
ParametersType | m_CurrentIndex {} |
SizeValueType | m_CurrentIteration { 0 } |
unsigned int | m_CurrentParameter { 0 } |
MeasureType | m_CurrentValue { 0 } |
MeasureType | m_MaximumMetricValue { itk::NumericTraits<MeasureType>::max() } |
ParametersType | m_MaximumMetricValuePosition {} |
SizeValueType | m_MaximumNumberOfIterations { 1 } |
MeasureType | m_MinimumMetricValue { itk::NumericTraits<MeasureType>::Zero } |
ParametersType | m_MinimumMetricValuePosition {} |
StepsType | m_NumberOfSteps {} |
double | m_StepLength { 1.0 } |
bool | m_Stop { false } |
![]() | |
CostFunctionPointer | m_CostFunction {} |
![]() | |
ParametersType | m_CurrentPosition {} |
bool | m_ScalesInitialized { false } |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
Private Attributes | |
std::ostringstream | m_StopConditionDescription {} |
Optimizer that fully samples a grid on the parametric space.
This optimizer is equivalent to an exhaustive search in a discrete grid defined over the parametric space. The grid is centered on the initial position. The subdivisions of the grid along each one of the dimensions of the parametric space is defined by an array of number of steps.
A typical use 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.
The optimizer throws IterationEvents after every iteration. We use this to plot the metric space in an image as follows:
The image size is expected to be 11 x 11 x 11.
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.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].
Physical dimensions of the grid are influenced by both the scales and the number of steps along each dimension, a side of the region is stepLength*(2*numberOfSteps[d]+1)*scaling[d].
Definition at line 83 of file itkExhaustiveOptimizer.h.
using itk::ExhaustiveOptimizer::ConstPointer = SmartPointer<const Self> |
Definition at line 92 of file itkExhaustiveOptimizer.h.
Definition at line 91 of file itkExhaustiveOptimizer.h.
Standard "Self" type alias.
Definition at line 89 of file itkExhaustiveOptimizer.h.
Definition at line 94 of file itkExhaustiveOptimizer.h.
Definition at line 90 of file itkExhaustiveOptimizer.h.
|
protected |
|
overrideprotecteddefault |
|
protected |
Advance to the next grid position.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::SingleValuedNonLinearOptimizer.
|
virtual |
|
virtual |
|
overridevirtual |
Get the reason for termination
Reimplemented from itk::Optimizer.
|
protected |
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
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::Object.
void itk::ExhaustiveOptimizer::ResumeWalking | ( | ) |
Resume optimization.
|
virtual |
|
virtual |
|
overridevirtual |
Start optimization.
Reimplemented from itk::Optimizer.
void itk::ExhaustiveOptimizer::StartWalking | ( | ) |
void itk::ExhaustiveOptimizer::StopWalking | ( | ) |
Stop optimization.
|
protected |
Definition at line 158 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 150 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 154 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 146 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 162 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 168 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 160 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 164 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 166 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 148 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 156 of file itkExhaustiveOptimizer.h.
|
protected |
Definition at line 152 of file itkExhaustiveOptimizer.h.
|
private |
Definition at line 171 of file itkExhaustiveOptimizer.h.