ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkObjectToObjectMetric.h>
Computes similarity between regions of two objects.
This class is templated over the type of the two input objects. This is the abstract base class for a hierarchy of similarity metrics that may, in derived classes, operate on meshes, images, etc. This class computes a value that measures the similarity between the two objects.
Derived classes must provide implementations for: GetValue GetValueAndDerivative Initialize GetNumberOfParameters GetNumberOfLocalParameters GetParameters SetParameters HasLocalSupport UpdateTransformParameters
Definition at line 54 of file itkObjectToObjectMetric.h.
typedef SmartPointer< const Self > itk::ObjectToObjectMetric::ConstPointer |
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 62 of file itkObjectToObjectMetric.h.
Type used for representing object components
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 65 of file itkObjectToObjectMetric.h.
Type of the derivative.
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 77 of file itkObjectToObjectMetric.h.
typedef double itk::ObjectToObjectMetric::InternalComputationValueType |
Type for internal computations
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 71 of file itkObjectToObjectMetric.h.
Type of the measure.
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 74 of file itkObjectToObjectMetric.h.
typedef unsigned int itk::ObjectToObjectMetric::NumberOfParametersType |
Type to represent the number of parameters that are being optimized at any given iteration of the optimizer.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 120 of file itkObjectToObjectMetric.h.
Type of the parameters.
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, and itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 80 of file itkObjectToObjectMetric.h.
ParametersType typedef. It defines a position in the optimization search space.
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 81 of file itkObjectToObjectMetric.h.
typedef SmartPointer< Self > itk::ObjectToObjectMetric::Pointer |
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 61 of file itkObjectToObjectMetric.h.
Standard class typedefs.
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 59 of file itkObjectToObjectMetric.h.
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 60 of file itkObjectToObjectMetric.h.
Source of the gradient(s) used by the metric (e.g. image gradients, in the case of image to image metrics). Defaults to Moving.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
Definition at line 86 of file itkObjectToObjectMetric.h.
itk::ObjectToObjectMetric::ObjectToObjectMetric | ( | ) | [protected] |
virtual itk::ObjectToObjectMetric::~ObjectToObjectMetric | ( | ) | [protected, virtual] |
itk::ObjectToObjectMetric::ObjectToObjectMetric | ( | const Self & | ) | [private] |
virtual GradientSourceType itk::ObjectToObjectMetric::GetGradientSource | ( | ) | const [virtual] |
Get gradient source. See GetGradientSourceIncludesFixed
and GetGradientSourceIncludesMoving
for convenience methods.
bool itk::ObjectToObjectMetric::GetGradientSourceIncludesFixed | ( | ) | const |
Return true of m_GradientSource
is either GRADIENT_SOURCE_FIXED
or GRADIENT_SOURCE_BOTH
. Convenience method.
bool itk::ObjectToObjectMetric::GetGradientSourceIncludesMoving | ( | ) | const |
Return true of m_GradientSource
is either GRADIENT_SOURCE_MOVING
or GRADIENT_SOURCE_BOTH
. Convenience method.
virtual const char* itk::ObjectToObjectMetric::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, and itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
virtual NumberOfParametersType itk::ObjectToObjectMetric::GetNumberOfLocalParameters | ( | ) | const [pure virtual] |
Methods for working with the metric's 'active' transform, e.g. the transform being optimized in the case of registration. Some of these are used in non-metric classes, e.g. optimizers.
Implemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >.
virtual NumberOfParametersType itk::ObjectToObjectMetric::GetNumberOfParameters | ( | ) | const [pure virtual] |
Methods for working with the metric's 'active' transform, e.g. the transform being optimized in the case of registration. Some of these are used in non-metric classes, e.g. optimizers.
Implements itk::CostFunction.
Implemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >.
virtual const ParametersType& itk::ObjectToObjectMetric::GetParameters | ( | ) | const [pure virtual] |
Get a const reference to the active transform's parameters
Implemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >.
virtual bool itk::ObjectToObjectMetric::HasLocalSupport | ( | ) | const [pure virtual] |
Return whether the metric's active transform has local support, e.g. whether it is dense/high-dimensional.
Implemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >.
virtual void itk::ObjectToObjectMetric::Initialize | ( | void | ) | throw ( ExceptionObject ) [pure virtual] |
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.
Implemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >.
void itk::ObjectToObjectMetric::operator= | ( | const Self & | ) | [private] |
Mutex lock to protect modification to the reference count
Reimplemented from itk::SingleValuedCostFunctionv4.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >.
void itk::ObjectToObjectMetric::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::CostFunction.
Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >.
virtual void itk::ObjectToObjectMetric::SetGradientSource | ( | GradientSourceType | _arg | ) | [virtual] |
Set source of gradient. This variable allows the user to switch between calculating the gradient with respect to the fixed object or moving object.
virtual void itk::ObjectToObjectMetric::SetParameters | ( | ParametersType & | params | ) | [pure virtual] |
Set the active transform's parameters
Implemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >.
virtual void itk::ObjectToObjectMetric::UpdateTransformParameters | ( | DerivativeType & | derivative, |
ParametersValueType | factor = NumericTraits< ParametersValueType >::One |
||
) | [pure virtual] |
Update the parameters of the metric's active transform. Typically this call is passed through directly to the transform. factor
is a scalar multiplier for each value in update, and defaults to 1.0 . derivative
must be the proper size, as retrieved from GetNumberOfParameters.
Implemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, and itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >.
Definition at line 154 of file itkObjectToObjectMetric.h.