ITK
5.0.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.
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | CoordinateRepresentationType = typename Superclass::CoordinateRepresentationType |
using | DerivativeType = typename Superclass::DerivativeType |
using | DerivativeValueType = typename Superclass::DerivativeValueType |
using | FixedTransformType = typename Superclass::FixedTransformType |
using | MeasureType = typename Superclass::MeasureType |
using | MetricBaseConstPointer = typename MetricType::ConstPointer |
using | MetricBasePointer = typename MetricType::Pointer |
using | MetricCategoryType = typename Superclass::MetricCategoryType |
using | MetricQueueType = std::deque< MetricBasePointer > |
using | MetricType = Superclass |
using | MetricValueArrayType = Array< MeasureType > |
using | MovingTransformType = typename Superclass::MovingTransformType |
using | NumberOfParametersType = typename Superclass::NumberOfParametersType |
using | ObjectType = typename Superclass::ObjectType |
using | ParametersType = typename Superclass::ParametersType |
using | ParametersValueType = typename Superclass::ParametersValueType |
using | Pointer = SmartPointer< Self > |
using | Self = ObjectToObjectMultiMetricv4 |
using | Superclass = ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType > |
using | WeightsArrayType = Array< WeightValueType > |
using | WeightValueType = typename DerivativeType::ValueType |
Public Types inherited from itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType > | |
using | ConstPointer = SmartPointer< const Self > |
using | CoordinateRepresentationType = TInternalComputationValueType |
using | DerivativeType = typename Superclass::DerivativeType |
using | DerivativeValueType = typename Superclass::DerivativeValueType |
using | DimensionType = SizeValueType |
using | FixedInputPointType = typename FixedTransformType::InputPointType |
using | FixedOutputPointType = typename FixedTransformType::OutputPointType |
using | FixedTransformJacobianType = typename FixedTransformType::JacobianType |
using | FixedTransformParametersType = typename FixedTransformType::ParametersType |
using | FixedTransformPointer = typename FixedTransformType::Pointer |
using | FixedTransformType = Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TFixedDimension > |
using | GradientSourceType = typename Superclass::GradientSourceType |
using | InternalComputationValueType = TInternalComputationValueType |
using | JacobianType = typename FixedTransformType::JacobianType |
using | MeasureType = typename Superclass::MeasureType |
using | MetricCategoryType = typename Superclass::MetricCategoryType |
using | MovingDisplacementFieldTransformType = DisplacementFieldTransform< CoordinateRepresentationType, Self::MovingDimension > |
using | MovingInputPointType = typename MovingTransformType::InputPointType |
using | MovingOutputPointType = typename MovingTransformType::OutputPointType |
using | MovingTransformJacobianType = typename MovingTransformType::JacobianType |
using | MovingTransformParametersType = typename MovingTransformType::ParametersType |
using | MovingTransformPointer = typename MovingTransformType::Pointer |
using | MovingTransformType = Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TMovingDimension > |
using | NumberOfParametersType = typename Superclass::NumberOfParametersType |
using | ObjectType = typename Superclass::Object |
using | ParametersType = typename Superclass::ParametersType |
using | Pointer = SmartPointer< Self > |
using | Self = ObjectToObjectMetric |
using | Superclass = ObjectToObjectMetricBaseTemplate< TInternalComputationValueType > |
using | VirtualDirectionType = typename VirtualImageType::DirectionType |
using | VirtualImageConstPointer = typename VirtualImageType::ConstPointer |
using | VirtualImagePointer = typename VirtualImageType::Pointer |
using | VirtualImageType = TVirtualImage |
using | VirtualIndexType = typename VirtualImageType::IndexType |
using | VirtualOriginType = typename VirtualImageType::PointType |
using | VirtualPixelType = typename VirtualImageType::PixelType |
using | VirtualPointSetPointer = typename VirtualPointSetType::Pointer |
using | VirtualPointSetType = PointSet< VirtualPixelType, Self::VirtualDimension > |
using | VirtualPointType = typename VirtualImageType::PointType |
using | VirtualRadiusType = typename VirtualImageType::SizeType |
using | VirtualRegionType = typename VirtualImageType::RegionType |
using | VirtualSizeType = typename VirtualRegionType::SizeType |
using | VirtualSpacingType = typename VirtualImageType::SpacingType |
Public Types inherited from itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType > | |
using | ConstPointer = SmartPointer< const Self > |
using | CoordinateRepresentationType = TInternalComputationValueType |
using | DerivativeType = typename Superclass::DerivativeType |
using | DerivativeValueType = typename DerivativeType::ValueType |
enum | GradientSourceType { GRADIENT_SOURCE_FIXED =0, GRADIENT_SOURCE_MOVING, GRADIENT_SOURCE_BOTH } |
using | MeasureType = typename Superclass::MeasureType |
enum | MetricCategoryType { UNKNOWN_METRIC = 0, OBJECT_METRIC = 1, IMAGE_METRIC = 2, POINT_SET_METRIC = 3, MULTI_METRIC = 4 } |
using | NumberOfParametersType = unsigned int |
using | ObjectConstPointer = typename ObjectType::ConstPointer |
using | ObjectType = Object |
using | ParametersType = typename Superclass::ParametersType |
using | ParametersValueType = TInternalComputationValueType |
using | Pointer = SmartPointer< Self > |
using | Self = ObjectToObjectMetricBaseTemplate |
using | Superclass = SingleValuedCostFunctionv4Template< TInternalComputationValueType > |
Public Types inherited from itk::SingleValuedCostFunctionv4Template< TInternalComputationValueType > | |
using | ConstPointer = SmartPointer< const Self > |
using | DerivativeType = Array< TInternalComputationValueType > |
using | MeasureType = TInternalComputationValueType |
using | ParametersType = typename Superclass::ParametersType |
using | Pointer = SmartPointer< Self > |
using | Self = SingleValuedCostFunctionv4Template |
using | Superclass = CostFunctionTemplate< TInternalComputationValueType > |
Public Types inherited from itk::CostFunctionTemplate< TInternalComputationValueType > | |
using | ConstPointer = SmartPointer< const Self > |
using | ParametersType = OptimizerParameters< TInternalComputationValueType > |
using | ParametersValueType = TInternalComputationValueType |
using | Pointer = SmartPointer< Self > |
using | Self = CostFunctionTemplate |
using | Superclass = Object |
Public Types inherited from itk::Object | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = Object |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
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 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 constexpr DimensionType | FixedDimension |
static constexpr DimensionType | MovingDimension |
static constexpr 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 | |
std::atomic< int > | m_ReferenceCount |
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ConstPointer = SmartPointer<const Self> |
Definition at line 103 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::CoordinateRepresentationType = typename Superclass::CoordinateRepresentationType |
Definition at line 118 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::DerivativeType = typename Superclass::DerivativeType |
Definition at line 113 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::DerivativeValueType = typename Superclass::DerivativeValueType |
Definition at line 114 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::FixedTransformType = typename Superclass::FixedTransformType |
Definition at line 120 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MeasureType = typename Superclass::MeasureType |
Types inherited from Superclass.
Definition at line 112 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricBaseConstPointer = typename MetricType::ConstPointer |
Definition at line 125 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricBasePointer = typename MetricType::Pointer |
Definition at line 124 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricCategoryType = typename Superclass::MetricCategoryType |
Definition at line 195 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricQueueType = std::deque<MetricBasePointer> |
Definition at line 126 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricType = Superclass |
type alias related to the metric queue
Definition at line 123 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MetricValueArrayType = Array<MeasureType> |
Definition at line 132 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::MovingTransformType = typename Superclass::MovingTransformType |
Definition at line 119 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::NumberOfParametersType = typename Superclass::NumberOfParametersType |
Definition at line 117 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ObjectType = typename Superclass::ObjectType |
Definition at line 128 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ParametersType = typename Superclass::ParametersType |
Definition at line 115 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::ParametersValueType = typename Superclass::ParametersValueType |
Definition at line 116 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::Pointer = SmartPointer<Self> |
Definition at line 102 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::Self = ObjectToObjectMultiMetricv4 |
Standard class type aliases
Definition at line 100 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::Superclass = ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType> |
Definition at line 101 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::WeightsArrayType = Array<WeightValueType> |
Definition at line 131 of file itkObjectToObjectMultiMetricv4.h.
using itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::WeightValueType = typename DerivativeType::ValueType |
Definition at line 130 of file itkObjectToObjectMultiMetricv4.h.
|
protected |
|
overrideprotecteddefault |
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 >.
|
inlineoverridevirtual |
Get metric category
Reimplemented from itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
Definition at line 198 of file itkObjectToObjectMultiMetricv4.h.
const MetricQueueType& itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType >::GetMetricQueue | ( | ) | const |
Get the metrics queue
|
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 >.
|
overridevirtual |
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. |
Implements itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
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().
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().
|
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.
Implements itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
|
static |
New macro for creation of through a Smart Pointer
|
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 149 of file itkObjectToObjectMultiMetricv4.h.
|
override |
Set each of the component metrics to use this fixed transform.
|
virtual |
|
inlineoverridevirtual |
Set moving object (image, point set, etc.)
Reimplemented from itk::ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >.
Definition at line 155 of file itkObjectToObjectMultiMetricv4.h.
|
override |
Set each of the component metrics to use this moving transform.
|
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 >.
|
private |
Definition at line 210 of file itkObjectToObjectMultiMetricv4.h.
|
mutableprivate |
Definition at line 212 of file itkObjectToObjectMultiMetricv4.h.
|
private |
Definition at line 211 of file itkObjectToObjectMultiMetricv4.h.