ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkObjectToObjectOptimizerBase.h>
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::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::GradientDescentOptimizerBasev4, and itk::QuasiNewtonOptimizerv4.
Definition at line 89 of file itkObjectToObjectOptimizerBase.h.
Measure type
Reimplemented in itk::GradientDescentOptimizerv4, itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, and itk::GradientDescentOptimizerBasev4.
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::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::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::MultiGradientOptimizerv4, itk::MultiStartOptimizerv4, and itk::GradientDescentOptimizerBasev4.
Definition at line 64 of file itkObjectToObjectOptimizerBase.h.
itk::ObjectToObjectOptimizerBase::ObjectToObjectOptimizerBase | ( | ) | [protected] |
Default constructor
virtual itk::ObjectToObjectOptimizerBase::~ObjectToObjectOptimizerBase | ( | ) | [protected, virtual] |
Default constructor
itk::ObjectToObjectOptimizerBase::ObjectToObjectOptimizerBase | ( | const Self & | ) | [private] |
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 MetricType* itk::ObjectToObjectOptimizerBase::GetMetric | ( | ) | [virtual] |
Accessors for Metric
virtual const char* itk::ObjectToObjectOptimizerBase::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::MultiGradientOptimizerv4, itk::MultiStartOptimizerv4, and itk::GradientDescentOptimizerBasev4.
virtual const ThreadIdType& itk::ObjectToObjectOptimizerBase::GetNumberOfThreads | ( | ) | [virtual] |
Get the number of threads set to be used.
virtual const ScalesType& itk::ObjectToObjectOptimizerBase::GetScales | ( | ) | [virtual] |
Get current parameters scaling.
virtual const bool& itk::ObjectToObjectOptimizerBase::GetScalesAreIdentity | ( | ) | [virtual] |
Get whether scales are identity. Cannot be set
virtual const MeasureType& itk::ObjectToObjectOptimizerBase::GetValue | ( | ) | [virtual] |
Accessor for metric value
void itk::ObjectToObjectOptimizerBase::operator= | ( | const Self & | ) | [private] |
Mutex lock to protect modification to the reference count
Reimplemented from itk::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentOptimizerBasev4, itk::MultiStartOptimizerv4, and itk::MultiGradientOptimizerv4.
virtual void itk::ObjectToObjectOptimizerBase::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::Object.
Reimplemented in itk::GradientDescentOptimizerv4, itk::QuasiNewtonOptimizerv4, itk::GradientDescentOptimizerBasev4, itk::MultiStartOptimizerv4, and itk::MultiGradientOptimizerv4.
virtual void itk::ObjectToObjectOptimizerBase::SetMetric | ( | MetricType * | _arg | ) | [virtual] |
Accessors for Metric
virtual void itk::ObjectToObjectOptimizerBase::SetNumberOfThreads | ( | ThreadIdType | number | ) | [virtual] |
Set the number of threads to use when threading. The default is the global default number of threads returned from itkMultiThreader.
virtual void itk::ObjectToObjectOptimizerBase::SetScales | ( | ScalesType | _arg | ) | [virtual] |
Set current parameters scaling.
virtual void itk::ObjectToObjectOptimizerBase::StartOptimization | ( | ) | [virtual] |
Run the optimization.
Reimplemented in itk::GradientDescentOptimizerv4, itk::MultiStartOptimizerv4, itk::MultiGradientOptimizerv4, and itk::QuasiNewtonOptimizerv4.
Definition at line 133 of file itkObjectToObjectOptimizerBase.h.
Definition at line 134 of file itkObjectToObjectOptimizerBase.h.
ScalesType itk::ObjectToObjectOptimizerBase::m_Scales [protected] |
Scales. Size is expected to be == metric->GetNumberOfLocalParameters(). See the main documentation for more details.
Definition at line 141 of file itkObjectToObjectOptimizerBase.h.
bool itk::ObjectToObjectOptimizerBase::m_ScalesAreIdentity [protected] |
Flag to avoid unnecessary arithmetic when scales are identity.
Definition at line 145 of file itkObjectToObjectOptimizerBase.h.
MeasureType itk::ObjectToObjectOptimizerBase::m_Value [protected] |
Metric measure value at a given iteration
Definition at line 137 of file itkObjectToObjectOptimizerBase.h.