ITK  4.3.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
itk::ObjectToObjectMetricBase Class Referenceabstract

#include <itkObjectToObjectMetricBase.h>

+ Inheritance diagram for itk::ObjectToObjectMetricBase:
+ Collaboration diagram for itk::ObjectToObjectMetricBase:

Detailed Description

Base class for all object-to-object similarlity metrics added in ITKv4.

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 GetDerivative GetValueAndDerivative Initialize GetNumberOfParameters GetNumberOfLocalParameters GetParameters SetParameters HasLocalSupport UpdateTransformParameters

Definition at line 49 of file itkObjectToObjectMetricBase.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::ParametersValueType 
CoordinateRepresentationType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef DerivativeType::ValueType DerivativeValueType
 
enum  GradientSourceType {
  GRADIENT_SOURCE_FIXED =0,
  GRADIENT_SOURCE_MOVING,
  GRADIENT_SOURCE_BOTH
}
 
typedef double InternalComputationValueType
 
typedef Superclass::MeasureType MeasureType
 
typedef unsigned int NumberOfParametersType
 
typedef Superclass::ParametersType ParametersType
 
typedef
Superclass::ParametersValueType 
ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef ObjectToObjectMetricBase Self
 
typedef SingleValuedCostFunctionv4 Superclass
 
- Public Types inherited from itk::SingleValuedCostFunctionv4
typedef SmartPointer< const SelfConstPointer
 
typedef Array
< ParametersValueType
DerivativeType
 
typedef double MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef
Superclass::ParametersValueType 
ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef SingleValuedCostFunctionv4 Self
 
typedef CostFunction Superclass
 
- Public Types inherited from itk::CostFunction
typedef SmartPointer< const SelfConstPointer
 
typedef OptimizerParameters
< ParametersValueType
ParametersType
 
typedef double ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef CostFunction Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

MeasureType GetCurrentValue () const
 
virtual void GetDerivative (DerivativeType &) const =0
 
virtual GradientSourceType GetGradientSource () const
 
bool GetGradientSourceIncludesFixed () const
 
bool GetGradientSourceIncludesMoving () const
 
virtual const char * GetNameOfClass () const
 
virtual const ParametersTypeGetParameters () const =0
 
virtual MeasureType GetValue () const =0
 
virtual void GetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const =0
 
virtual bool HasLocalSupport () const =0
 
virtual void Initialize (void)=0 throw ( ExceptionObject )
 
virtual void SetGradientSource (GradientSourceType _arg)
 
virtual void SetParameters (ParametersType &params)=0
 
virtual void UpdateTransformParameters (const DerivativeType &derivative, ParametersValueType factor=NumericTraits< ParametersValueType >::One)=0
 
virtual NumberOfParametersType GetNumberOfParameters () const =0
 
virtual NumberOfParametersType GetNumberOfLocalParameters () const =0
 
- Public Member Functions inherited from itk::SingleValuedCostFunctionv4
virtual void GetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const =0
 

Protected Member Functions

 ObjectToObjectMetricBase ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual ~ObjectToObjectMetricBase ()
 
- Protected Member Functions inherited from itk::SingleValuedCostFunctionv4
 SingleValuedCostFunctionv4 ()
 
virtual ~SingleValuedCostFunctionv4 ()
 
- Protected Member Functions inherited from itk::CostFunction
 CostFunction ()
 
virtual ~CostFunction ()
 
- 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

GradientSourceType m_GradientSource
 
MeasureType m_Value
 

Private Member Functions

 ObjectToObjectMetricBase (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)
 
- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 

Member Typedef Documentation

Definition at line 57 of file itkObjectToObjectMetricBase.h.

Type used for representing object components

Definition at line 60 of file itkObjectToObjectMetricBase.h.

typedef Superclass::DerivativeType itk::ObjectToObjectMetricBase::DerivativeType

Type of the derivative.

Definition at line 72 of file itkObjectToObjectMetricBase.h.

typedef DerivativeType::ValueType itk::ObjectToObjectMetricBase::DerivativeValueType

Definition at line 73 of file itkObjectToObjectMetricBase.h.

Type for internal computations

Definition at line 66 of file itkObjectToObjectMetricBase.h.

Type of the measure.

Definition at line 69 of file itkObjectToObjectMetricBase.h.

Type to represent the number of parameters that are being optimized at any given iteration of the optimizer.

Definition at line 116 of file itkObjectToObjectMetricBase.h.

typedef Superclass::ParametersType itk::ObjectToObjectMetricBase::ParametersType

Type of the parameters.

Definition at line 76 of file itkObjectToObjectMetricBase.h.

typedef Superclass::ParametersValueType itk::ObjectToObjectMetricBase::ParametersValueType

Definition at line 77 of file itkObjectToObjectMetricBase.h.

Definition at line 56 of file itkObjectToObjectMetricBase.h.

Standard class typedefs.

Definition at line 54 of file itkObjectToObjectMetricBase.h.

Definition at line 55 of file itkObjectToObjectMetricBase.h.

Member Enumeration Documentation

Source of the gradient(s) used by the metric (e.g. image gradients, in the case of image to image metrics). Defaults to Moving.

Enumerator:
GRADIENT_SOURCE_FIXED 
GRADIENT_SOURCE_MOVING 
GRADIENT_SOURCE_BOTH 

Definition at line 82 of file itkObjectToObjectMetricBase.h.

Constructor & Destructor Documentation

itk::ObjectToObjectMetricBase::ObjectToObjectMetricBase ( )
protected
virtual itk::ObjectToObjectMetricBase::~ObjectToObjectMetricBase ( )
protectedvirtual
itk::ObjectToObjectMetricBase::ObjectToObjectMetricBase ( const Self )
private

Member Function Documentation

MeasureType itk::ObjectToObjectMetricBase::GetCurrentValue ( ) const

Get the current metric value stored in m_Value. This is only meaningful after a call to GetValue() or GetValueAndDerivative(). Note that this would normally be called GetValue, but that name is used for historical reasons by GetValue() to compute the current metric value and store it in m_Value.

virtual void itk::ObjectToObjectMetricBase::GetDerivative ( DerivativeType ) const
pure virtual
virtual GradientSourceType itk::ObjectToObjectMetricBase::GetGradientSource ( ) const
virtual

Get gradient source. See GetGradientSourceIncludesFixed and GetGradientSourceIncludesMoving for convenience methods.

bool itk::ObjectToObjectMetricBase::GetGradientSourceIncludesFixed ( ) const

Return true of m_GradientSource is either GRADIENT_SOURCE_FIXED or GRADIENT_SOURCE_BOTH. Convenience method.

bool itk::ObjectToObjectMetricBase::GetGradientSourceIncludesMoving ( ) const

Return true of m_GradientSource is either GRADIENT_SOURCE_MOVING or GRADIENT_SOURCE_BOTH. Convenience method.

virtual const char* itk::ObjectToObjectMetricBase::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedCostFunctionv4.

Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >, itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage >, itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage >, itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >, itk::ObjectToObjectMetric< TPointSet::PointDimension, TPointSet::PointDimension >, itk::ObjectToObjectMetric< TFixedPointSet::PointDimension, TMovingPointSet::PointDimension >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::DemonsImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::LabeledPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >, and itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >.

virtual NumberOfParametersType itk::ObjectToObjectMetricBase::GetNumberOfLocalParameters ( ) const
pure virtual
virtual NumberOfParametersType itk::ObjectToObjectMetricBase::GetNumberOfParameters ( ) const
pure virtual
virtual const ParametersType& itk::ObjectToObjectMetricBase::GetParameters ( ) const
pure virtual
virtual MeasureType itk::ObjectToObjectMetricBase::GetValue ( ) const
pure virtual
virtual void itk::ObjectToObjectMetricBase::GetValueAndDerivative ( MeasureType value,
DerivativeType derivative 
) const
pure virtual

This method returns the derivative and value based on the current transformation(s).

virtual bool itk::ObjectToObjectMetricBase::HasLocalSupport ( ) const
pure virtual
virtual void itk::ObjectToObjectMetricBase::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, TMetricTraits >, itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage >, itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >, itk::ObjectToObjectMetric< TPointSet::PointDimension, TPointSet::PointDimension >, itk::ObjectToObjectMetric< TFixedPointSet::PointDimension, TMovingPointSet::PointDimension >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::DemonsImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::LabeledPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >.

void itk::ObjectToObjectMetricBase::operator= ( const Self )
private
void itk::ObjectToObjectMetricBase::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
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::CostFunction.

Reimplemented in itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >, itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >, itk::ObjectToObjectMetric< TPointSet::PointDimension, TPointSet::PointDimension >, itk::ObjectToObjectMetric< TFixedPointSet::PointDimension, TMovingPointSet::PointDimension >, itk::PointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::PointSetToPointSetMetricv4< TPointSet, TPointSet >, itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ObjectToObjectMultiMetricv4< TFixedDimension, TMovingDimension, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::DemonsImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::LabeledPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::ExpectationBasedPointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >, itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >, and itk::EuclideanDistancePointSetToPointSetMetricv4< TFixedPointSet, TMovingPointSet >.

virtual void itk::ObjectToObjectMetricBase::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.

See Also
GradientSourceType
virtual void itk::ObjectToObjectMetricBase::SetParameters ( ParametersType params)
pure virtual
virtual void itk::ObjectToObjectMetricBase::UpdateTransformParameters ( const DerivativeType derivative,
ParametersValueType  factor = NumericTraitsParametersValueType >::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::ObjectToObjectMetric< TFixedDimension, TMovingDimension, TVirtualImage >, itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >, itk::ObjectToObjectMetric< TPointSet::PointDimension, TPointSet::PointDimension >, and itk::ObjectToObjectMetric< TFixedPointSet::PointDimension, TMovingPointSet::PointDimension >.

Member Data Documentation

GradientSourceType itk::ObjectToObjectMetricBase::m_GradientSource
protected

Definition at line 171 of file itkObjectToObjectMetricBase.h.

MeasureType itk::ObjectToObjectMetricBase::m_Value
mutableprotected

Metric value, stored after evaluating

Definition at line 174 of file itkObjectToObjectMetricBase.h.


The documentation for this class was generated from the following file: