Public Types | Public Member Functions | Protected Attributes

cmtk::Optimizer Class Reference
[cmtkRegistration Library]

Abstract optimizer. More...

#include <cmtkOptimizer.h>

Inheritance diagram for cmtk::Optimizer:
Inheritance graph
[legend]
Collaboration diagram for cmtk::Optimizer:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Optimizer Self
 This class.
typedef OptimizerBase Superclass
 Superclass.
typedef SmartPointer< SelfSmartPtr
 Smart pointer to Optimizer.

Public Member Functions

 cmtkGetSetMacro (bool, UpdateStepScaleVector)
 This flag determines whether the vector of step sizes is updated.
 cmtkGetSetMacro (RegistrationCallback::SmartPtr, Callback)
 External callback object.
 cmtkGetSetMacro (Functional::SmartPtr, Functional)
 Optimization functional.
virtual void SetDeltaFThreshold (const Self::ReturnType value)
 Set DeltaF threshold.
virtual CallbackResult CallbackExecuteWithData (const CoordinateVector &v, const Self::ReturnType metric)
 Execute callback if one was set.
virtual CallbackResult CallbackExecute ()
 Execute callback if one was set.
virtual void CallbackComment (const char *comment=NULL)
 Notify callback of an annotation if one exists.
virtual unsigned int GetSearchSpaceDimension () const
 Return dimension of search space.
virtual Self::ParameterType GetParamStep (unsigned int idx, const Self::ParameterType mmStep=1.0) const
 Return parameter stepping.
virtual Self::ReturnType Evaluate (CoordinateVector &v)
 Return functional value.
virtual Self::ReturnType EvaluateWithGradient (CoordinateVector &v, CoordinateVector &directionVector, const Self::ParameterType step=1)
 Evaluate functional and also return its gradient.
 Optimizer ()
 Default constructor.
virtual ~Optimizer ()
 Virtual destructor.
virtual CallbackResult Optimize (CoordinateVector &, const Self::ParameterType=1, const Self::ParameterType=0)=0
 Interface: Optimize functional.
bool GetLastOptimizeChangedParameters () const
 Get flag to check whether previous call to Optimize() changed parameters.

Protected Attributes

bool m_LastOptimizeChangedParameters
 Flag whether the last call to Optimize() made any changes to functional parameters.
Self::ReturnType m_DeltaFThreshold
 Threshold for termination based on change of target function.

Detailed Description

Abstract optimizer.

Definition at line 57 of file cmtkOptimizer.h.


Member Typedef Documentation

This class.

Reimplemented from cmtk::OptimizerBase.

Reimplemented in cmtk::BestDirectionOptimizer, and cmtk::BestNeighbourOptimizer.

Definition at line 63 of file cmtkOptimizer.h.

Smart pointer to Optimizer.

Definition at line 69 of file cmtkOptimizer.h.

Superclass.

Reimplemented in cmtk::BestDirectionOptimizer, and cmtk::BestNeighbourOptimizer.

Definition at line 66 of file cmtkOptimizer.h.


Constructor & Destructor Documentation

cmtk::Optimizer::Optimizer (  ) [inline]

Default constructor.

Definition at line 144 of file cmtkOptimizer.h.

virtual cmtk::Optimizer::~Optimizer (  ) [inline, virtual]

Virtual destructor.

Definition at line 153 of file cmtkOptimizer.h.


Member Function Documentation

virtual void cmtk::Optimizer::CallbackComment ( const char *  comment = NULL ) [inline, virtual]

Notify callback of an annotation if one exists.

Definition at line 113 of file cmtkOptimizer.h.

virtual CallbackResult cmtk::Optimizer::CallbackExecute (  ) [inline, virtual]

Execute callback if one was set.

Definition at line 105 of file cmtkOptimizer.h.

References cmtk::CALLBACK_OK.

virtual CallbackResult cmtk::Optimizer::CallbackExecuteWithData ( const CoordinateVector v,
const Self::ReturnType  metric 
) [inline, virtual]

Execute callback if one was set.

Definition at line 97 of file cmtkOptimizer.h.

References cmtk::CALLBACK_OK.

cmtk::Optimizer::cmtkGetSetMacro ( bool  ,
UpdateStepScaleVector   
)

This flag determines whether the vector of step sizes is updated.

For some optimization problems, such as 2-D projection to 3-D image registration, the current parameter vector determines the optimum step sizes for the transformation parameters. In such cases, this flag can be set to "true" so that after each optimization step the functional is queried for updated steppings.

cmtk::Optimizer::cmtkGetSetMacro ( RegistrationCallback::SmartPtr  ,
Callback   
)

External callback object.

This object is called during the optimization, reporting optimization progress to the user and checking for user interrupts.

cmtk::Optimizer::cmtkGetSetMacro ( Functional::SmartPtr  ,
Functional   
)

Optimization functional.

virtual Self::ReturnType cmtk::Optimizer::Evaluate ( CoordinateVector v ) [inline, virtual]

Return functional value.

Definition at line 132 of file cmtkOptimizer.h.

virtual Self::ReturnType cmtk::Optimizer::EvaluateWithGradient ( CoordinateVector v,
CoordinateVector directionVector,
const Self::ParameterType  step = 1 
) [inline, virtual]

Evaluate functional and also return its gradient.

Definition at line 138 of file cmtkOptimizer.h.

bool cmtk::Optimizer::GetLastOptimizeChangedParameters (  ) const [inline]

Get flag to check whether previous call to Optimize() changed parameters.

Definition at line 159 of file cmtkOptimizer.h.

virtual Self::ParameterType cmtk::Optimizer::GetParamStep ( unsigned int  idx,
const Self::ParameterType  mmStep = 1.0 
) const [inline, virtual]

Return parameter stepping.

Definition at line 126 of file cmtkOptimizer.h.

virtual unsigned int cmtk::Optimizer::GetSearchSpaceDimension (  ) const [inline, virtual]

Return dimension of search space.

Definition at line 120 of file cmtkOptimizer.h.

virtual CallbackResult cmtk::Optimizer::Optimize ( CoordinateVector ,
const Self::ParameterType  = 1,
const Self::ParameterType  = 0 
) [pure virtual]

Interface: Optimize functional.

Implemented in cmtk::BestDirectionOptimizer, and cmtk::BestNeighbourOptimizer.

virtual void cmtk::Optimizer::SetDeltaFThreshold ( const Self::ReturnType  value ) [inline, virtual]

Set DeltaF threshold.

Definition at line 91 of file cmtkOptimizer.h.


Member Data Documentation

Threshold for termination based on change of target function.

Optimization should terminate if the relative change of the target function in one step falls below this threshold.

Definition at line 172 of file cmtkOptimizer.h.

Flag whether the last call to Optimize() made any changes to functional parameters.

Definition at line 166 of file cmtkOptimizer.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines