ITK
4.2.0
Insight Segmentation and Registration Toolkit
|
#include <itkObjectToObjectOptimizerBase.h>
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef MetricType::InternalComputationValueType | InternalComputationValueType |
typedef MetricType::MeasureType | MeasureType |
typedef ObjectToObjectMetricBase | MetricType |
typedef MetricType::Pointer | MetricTypePointer |
typedef MetricType::NumberOfParametersType | NumberOfParametersType |
typedef OptimizerParameters < double > | ParametersType |
typedef SmartPointer< Self > | Pointer |
typedef OptimizerParameters < double > | ScalesType |
typedef ObjectToObjectOptimizerBase | Self |
typedef Object | Superclass |
Public Types inherited from itk::Object | |
Public Types inherited from itk::LightObject |
Public Member Functions | |
virtual const MeasureType & | GetCurrentMetricValue () |
const ParametersType & | GetCurrentPosition () |
virtual const char * | GetNameOfClass () const |
virtual const ThreadIdType & | GetNumberOfThreads () |
virtual const ScalesType & | GetScales () |
virtual const bool & | GetScalesAreIdentity () |
const MeasureType & | GetValue () |
virtual void | SetNumberOfThreads (ThreadIdType number) |
virtual void | SetScales (ScalesType _arg) |
virtual void | StartOptimization () |
virtual MetricType * | GetMetric () |
virtual void | SetMetric (MetricType *_arg) |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *) |
unsigned long | AddObserver (const EventObject &event, Command *) const |
virtual LightObject::Pointer | CreateAnother () const |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary (void) |
const MetaDataDictionary & | GetMetaDataDictionary (void) const |
virtual unsigned long | 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 |
virtual void | Register () const |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const |
Public Member Functions inherited from itk::LightObject | |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
itkCloneMacro (Self) | |
void | Print (std::ostream &os, Indent indent=0) const |
Protected Member Functions | |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
ObjectToObjectOptimizerBase () | |
virtual | ~ObjectToObjectOptimizerBase () |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &time) |
virtual | ~Object () |
Protected Member Functions inherited from itk::LightObject | |
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 | |
MeasureType | m_CurrentMetricValue |
MetricTypePointer | m_Metric |
ThreadIdType | m_NumberOfThreads |
ScalesType | m_Scales |
bool | m_ScalesAreIdentity |
Private Member Functions | |
ObjectToObjectOptimizerBase (const Self &) | |
void | operator= (const Self &) |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
Abstract base for object-to-object optimizers.
The goal of this optimizer hierarchy is to work with metrics of any type, i.e. working with any kind of object, such as image or point-set.
Transform parameters are not manipulated directly. Instead, the optimizer retrieves the metric derivative from the metric, modifies the derivative as required, then passes it back to the metric as an update. The metric then processes it as appropriate, typically by passing it to its transform that is being optimized.
SetScales
allows setting of a per-local-parameter scaling array. If unset, the m_Scales
array will be initialized to all 1's. Note that when used with transforms with local support, these scales correspond to each local parameter, and not to each parameter. For example, in a DisplacementFieldTransform of dimensionality N, the Scales is size N, with each element corresponding to a dimension within the transform's displacement field, and is applied to each vector in the displacement field.
Threading of some optimizer operations may be handled within derived classes, for example in GradientDescentOptimizer.
Definition at line 59 of file itkObjectToObjectOptimizerBase.h.
typedef SmartPointer< const Self > itk::ObjectToObjectOptimizerBase::ConstPointer |
Reimplemented from itk::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, itk::ConjugateGradientLineSearchOptimizerv4, itk::MultiGradientOptimizerv4, itk::MultiStartOptimizerv4, and itk::GradientDescentOptimizerBasev4.
Definition at line 66 of file itkObjectToObjectOptimizerBase.h.
typedef MetricType::InternalComputationValueType itk::ObjectToObjectOptimizerBase::InternalComputationValueType |
Internal computation value type
Reimplemented in itk::GradientDescentOptimizerv4, itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, itk::GradientDescentOptimizerBasev4, itk::QuasiNewtonOptimizerv4, and itk::ConjugateGradientLineSearchOptimizerv4.
Definition at line 88 of file itkObjectToObjectOptimizerBase.h.
Measure type
Reimplemented in itk::GradientDescentOptimizerv4, itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, itk::GradientDescentOptimizerBasev4, and itk::ConjugateGradientLineSearchOptimizerv4.
Definition at line 85 of file itkObjectToObjectOptimizerBase.h.
Metric function type
Reimplemented in itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, and itk::GradientDescentOptimizerBasev4.
Definition at line 78 of file itkObjectToObjectOptimizerBase.h.
Reimplemented in itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, and itk::GradientDescentOptimizerBasev4.
Definition at line 79 of file itkObjectToObjectOptimizerBase.h.
Number of parameters type
Definition at line 82 of file itkObjectToObjectOptimizerBase.h.
typedef OptimizerParameters< double > itk::ObjectToObjectOptimizerBase::ParametersType |
Parameters type.
Reimplemented in itk::MultiGradientOptimizerv4, and itk::MultiStartOptimizerv4.
Definition at line 75 of file itkObjectToObjectOptimizerBase.h.
Reimplemented from itk::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, itk::ConjugateGradientLineSearchOptimizerv4, itk::MultiGradientOptimizerv4, itk::MultiStartOptimizerv4, and itk::GradientDescentOptimizerBasev4.
Definition at line 65 of file itkObjectToObjectOptimizerBase.h.
typedef OptimizerParameters< double > itk::ObjectToObjectOptimizerBase::ScalesType |
Scale type.
Definition at line 69 of file itkObjectToObjectOptimizerBase.h.
Standard class typedefs.
Reimplemented from itk::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, itk::ConjugateGradientLineSearchOptimizerv4, itk::MultiGradientOptimizerv4, itk::MultiStartOptimizerv4, and itk::GradientDescentOptimizerBasev4.
Definition at line 63 of file itkObjectToObjectOptimizerBase.h.
Reimplemented from itk::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, itk::ConjugateGradientLineSearchOptimizerv4, itk::MultiGradientOptimizerv4, itk::MultiStartOptimizerv4, and itk::GradientDescentOptimizerBasev4.
Definition at line 64 of file itkObjectToObjectOptimizerBase.h.
|
protected |
Default constructor
|
protectedvirtual |
Default constructor
|
private |
|
virtual |
Accessor for metric value. Returns the value stored in m_CurrentMetricValue from the most recent call to evaluate the metric.
const ParametersType& itk::ObjectToObjectOptimizerBase::GetCurrentPosition | ( | ) |
Get a reference to the current position of the optimization. This returns the parameters from the assigned metric, since the optimizer itself does not store a position.
|
virtual |
Accessors for Metric
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, itk::ConjugateGradientLineSearchOptimizerv4, itk::MultiGradientOptimizerv4, itk::MultiStartOptimizerv4, and itk::GradientDescentOptimizerBasev4.
|
virtual |
Get the number of threads set to be used.
|
virtual |
Get current parameters scaling.
|
virtual |
Get whether scales are identity. Cannot be set
const MeasureType& itk::ObjectToObjectOptimizerBase::GetValue | ( | ) |
Deprecated accessor for currently stored metric value for use by classes that support both v4 and v3 optimizers.
|
private |
Mutex lock to protect modification to the reference count
Reimplemented from itk::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentOptimizerBasev4, itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, and itk::ConjugateGradientLineSearchOptimizerv4.
|
protectedvirtual |
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.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentOptimizerBasev4, itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, itk::GradientDescentLineSearchOptimizerv4, and itk::ConjugateGradientLineSearchOptimizerv4.
|
virtual |
Accessors for Metric
|
virtual |
Set the number of threads to use when threading. The default is the global default number of threads returned from itkMultiThreader.
|
virtual |
Set current parameters scaling.
|
virtual |
Run the optimization.
Reimplemented in itk::GradientDescentOptimizerv4, itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, itk::QuasiNewtonOptimizerv4, and itk::ConjugateGradientLineSearchOptimizerv4.
|
protected |
Metric measure value at a given iteration, as most recently evaluated.
Definition at line 145 of file itkObjectToObjectOptimizerBase.h.
|
protected |
Definition at line 141 of file itkObjectToObjectOptimizerBase.h.
|
protected |
Definition at line 142 of file itkObjectToObjectOptimizerBase.h.
|
protected |
Scales. Size is expected to be == metric->GetNumberOfLocalParameters(). See the main documentation for more details.
Definition at line 149 of file itkObjectToObjectOptimizerBase.h.
|
protected |
Flag to avoid unnecessary arithmetic when scales are identity.
Definition at line 153 of file itkObjectToObjectOptimizerBase.h.