ITK
4.10.0
Insight Segmentation and Registration Toolkit
|
#include <itkObjectToObjectMultiMetricv4.h>
This class takes one ore more ObjectToObject metrics and assigns weights to their derivatives to compute a single result.
This class takes N ObjectToObject-derived component metrics and assigns a weight to each of the metrics' derivatives. It then computes a weighted measure of the metric. The GetValue() and GetValueAndDerivative() methods compute the measure and derivative using the following calculation:
metric value = Sum_j ( w_j * M_j ) (see important note below)
and the GetDerivative() method computes the derivative by computing:
derivative = Sum_j ( w_j * dM_j / ||dM_j|| ) * ( Sum_j( ||dM_j|| ) / J )
The assigned weights are normalized internally to sum to one before use, and the weights default to 1/N, where N is the number of component metrics.
Each component will be initialized by this metric in the call to Initialize().
Definition at line 93 of file itkObjectToObjectMultiMetricv4.h.
Static Public Member Functions | |
static Pointer | New () |
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 () |
static Pointer | New () |
Private Member Functions | |
ObjectToObjectMultiMetricv4 (const Self &) ITK_DELETE_FUNCTION | |
void | operator= (const Self &) ITK_DELETE_FUNCTION |
Private Attributes | |
MetricQueueType | m_MetricQueue |
MetricValueArrayType | m_MetricValueArray |
WeightsArrayType | m_MetricWeights |
Additional Inherited Members | |
Static Public Attributes inherited from itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType > | |
static const DimensionType | FixedDimension |
static const DimensionType | MovingDimension |
static const DimensionType | VirtualDimension |
Protected Attributes inherited from itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType > | |
FixedTransformPointer | m_FixedTransform |
MovingTransformPointer | m_MovingTransform |
SizeValueType | m_NumberOfValidPoints |
bool | m_UserHasSetVirtualDomain |
VirtualImagePointer | m_VirtualImage |
Protected Attributes inherited from itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType > | |
ObjectConstPointer | m_FixedObject |
GradientSourceType | m_GradientSource |
ObjectConstPointer | m_MovingObject |
MeasureType | m_Value |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
typedef SmartPointer<const Self> itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ConstPointer |
Definition at line 101 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::CoordinateRepresentationType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::CoordinateRepresentationType |
Definition at line 116 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::DerivativeType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::DerivativeType |
Definition at line 111 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::DerivativeValueType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::DerivativeValueType |
Definition at line 112 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::FixedTransformType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::FixedTransformType |
Definition at line 118 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::MeasureType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MeasureType |
Types inherited from Superclass.
Definition at line 107 of file itkObjectToObjectMultiMetricv4.h.
typedef MetricType::ConstPointer itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricBaseConstPointer |
Definition at line 123 of file itkObjectToObjectMultiMetricv4.h.
typedef MetricType::Pointer itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricBasePointer |
Definition at line 122 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::MetricCategoryType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricCategoryType |
Definition at line 193 of file itkObjectToObjectMultiMetricv4.h.
typedef std::deque<MetricBasePointer> itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricQueueType |
Definition at line 124 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricType |
typedefs related to the metric queue
Definition at line 121 of file itkObjectToObjectMultiMetricv4.h.
typedef Array<MeasureType> itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricValueArrayType |
Definition at line 130 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::MovingTransformType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MovingTransformType |
Definition at line 117 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::NumberOfParametersType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::NumberOfParametersType |
Definition at line 115 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::ObjectType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ObjectType |
Definition at line 126 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::ParametersType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ParametersType |
Definition at line 113 of file itkObjectToObjectMultiMetricv4.h.
typedef Superclass::ParametersValueType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ParametersValueType |
Definition at line 114 of file itkObjectToObjectMultiMetricv4.h.
typedef SmartPointer<Self> itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::Pointer |
Definition at line 100 of file itkObjectToObjectMultiMetricv4.h.
typedef ObjectToObjectMultiMetricv4 itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::Self |
Standard class typedefs
Definition at line 98 of file itkObjectToObjectMultiMetricv4.h.
typedef ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType> itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::Superclass |
Definition at line 99 of file itkObjectToObjectMultiMetricv4.h.
typedef Array<WeightValueType> itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::WeightsArrayType |
Definition at line 129 of file itkObjectToObjectMultiMetricv4.h.
typedef DerivativeType::ValueType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::WeightValueType |
Definition at line 128 of file itkObjectToObjectMultiMetricv4.h.
|
protected |
|
protectedvirtual |
|
private |
void itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::AddMetric | ( | MetricType * | metric | ) |
Add a metric to the queue
void itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ClearMetricQueue | ( | ) |
Clear the metric queue
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
|
overridevirtual |
This method returns the derivative based on the current transformation(s).
Implements itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
|
inlineoverridevirtual |
Get metric category
Reimplemented from itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >.
Definition at line 196 of file itkObjectToObjectMultiMetricv4.h.
References itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >::MULTI_METRIC, itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ObjectToObjectMultiMetricv4(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::operator=(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::PrintSelf(), and itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::~ObjectToObjectMultiMetricv4().
const MetricQueueType& itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetMetricQueue | ( | ) | const |
Get the metrics queue
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
|
virtual |
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >.
SizeValueType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetNumberOfMetrics | ( | ) | const |
Get the number of metrics
|
overridevirtual |
Evaluate the metrics and return the value of only the first metric.
Implements itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
|
override |
Evaluate the metric value and derivative.
value | will contain the value of only the first metric on return. |
derivative | holds the combined derivative on return. |
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
MetricValueArrayType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetValueArray | ( | ) | const |
Returns an itkArray of metric values, one for each component metric. It only has meaning after a call to GetValue(), GetDerivative() or GetValueAndDerivative().
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
MeasureType itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetWeightedValue | ( | ) | const |
Returns a combined metric value of all component metrics, using the assigned weights. It only has meaning after a call to GetValue(), GetDerivative() or GetValueAndDerivative().
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
|
overridevirtual |
Initialize the Metric by making sure that all the components are present and plugged together correctly, and initializing internal variables as required. This is for one-time initialization, e.g. before starting an optimization process.
Reimplemented from itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >.
|
static |
New macro for creation of through a Smart Pointer
|
private |
|
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::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
|
inlineoverridevirtual |
Set fixed object (image, point set, etc.)
Reimplemented from itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
Definition at line 147 of file itkObjectToObjectMultiMetricv4.h.
|
overridevirtual |
Set each of the component metrics to use this fixed transform.
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
|
virtual |
|
inlineoverridevirtual |
Set moving object (image, point set, etc.)
Reimplemented from itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
Definition at line 153 of file itkObjectToObjectMultiMetricv4.h.
References itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetDerivative(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetMetricQueue(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetValue(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetValueAndDerivative(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetValueArray(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetWeightedValue(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetFixedTransform(), itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingTransform(), and itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SupportsArbitraryVirtualDomainSamples().
|
overridevirtual |
Set each of the component metrics to use this moving transform.
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
|
overridevirtual |
Returns a flag. True if arbitrary virtual domain points will always correspond to data points. False if not. For example, point-set metrics return false because only some virtual domain points will correspond to points within the point sets.
Implements itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >.
Referenced by itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::SetMovingObject().
|
private |
Definition at line 211 of file itkObjectToObjectMultiMetricv4.h.
|
mutableprivate |
Definition at line 213 of file itkObjectToObjectMultiMetricv4.h.
|
private |
Definition at line 212 of file itkObjectToObjectMultiMetricv4.h.