ITK  4.13.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject > Class Template Referenceabstract

#include <itkImageToSpatialObjectMetric.h>

+ Inheritance diagram for itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >:
+ Collaboration diagram for itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >:

Detailed Description

template<typename TFixedImage, typename TMovingSpatialObject>
class itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >

Computes similarity between a moving spatial obejct and an Image to be registered.

The ImageToSpatialObjectMetric is different from the rest of the registration framework in ITK regarding the interpretation of the Transform with respect to the Fixed and Moving objects. In most of the ITK registration framework, the Transform computed by the optimizer is the one that maps points from the space of the Fixed object into the space of the Moving object. This direction of the transform is the one that makes easier to resample the Moving object into the space of the Fixed object.

In the particular case of the ImageToSpatialObject registration, the Transform to be computed is the one mapping points from the SpatialObject into the Image, despite the fact that the SpatialObject is called the "Moving" object and the image is called the "Fixed" object. This change of reference system is the consequence of using this type of registration in applications that are based on Visualization. In the context of such visualizations it is simpler to think in terms of the Transform that can be used for displaying the SpatialObject in the appropriate position with respect to the image. Since this process does not involve resampling, but providing a Transform to a visualization routine, it is usually more natural to use the Transform that maps points from the SpatialObject space the image space.

A full discussion of the Transform directions in the ITK registration framework can be found in the ITK Software Guide.

Examples:
Examples/RegistrationITKv3/ModelToImageRegistration1.cxx, and Examples/RegistrationITKv4/ModelToImageRegistration1.cxx.

Definition at line 61 of file itkImageToSpatialObjectMetric.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::ParametersValueType 
CoordinateRepresentationType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef
FixedImageType::ConstPointer 
FixedImageConstPointer
 
typedef FixedImageType::Pointer FixedImagePointer
 
typedef TFixedImage FixedImageType
 
typedef
TransformType::InputPointType 
InputPointType
 
typedef InterpolatorType::Pointer InterpolatorPointer
 
typedef
LinearInterpolateImageFunction
< TFixedImage,
CoordinateRepresentationType
InterpolatorType
 
typedef Superclass::MeasureType MeasureType
 
typedef
MovingSpatialObjectType::ConstPointer 
MovingSpatialObjectConstPointer
 
typedef
MovingSpatialObjectType::Pointer 
MovingSpatialObjectPointer
 
typedef TMovingSpatialObject MovingSpatialObjectType
 
typedef
TransformType::OutputPointType 
OutputPointType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef ImageToSpatialObjectMetric Self
 
typedef SingleValuedCostFunction Superclass
 
typedef TransformType::JacobianType TransformJacobianType
 
typedef
TransformType::ParametersType 
TransformParametersType
 
typedef TransformType::Pointer TransformPointer
 
typedef Transform
< CoordinateRepresentationType,
itkGetStaticConstMacro(ObjectDimension),
itkGetStaticConstMacro(ImageDimension) > 
TransformType
 
typedef vnl_vector_fixed
< double,
itkGetStaticConstMacro(ObjectDimension) > 
VectorType
 
- Public Types inherited from itk::SingleValuedCostFunction
typedef SmartPointer< const SelfConstPointer
 
typedef Array
< ParametersValueType
DerivativeType
 
typedef double MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef
Superclass::ParametersValueType 
ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef SingleValuedCostFunction Self
 
typedef CostFunction Superclass
 
- Public Types inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
typedef SmartPointer< const SelfConstPointer
 
typedef OptimizerParameters
< TInternalComputationValueType > 
ParametersType
 
typedef
TInternalComputationValueType 
ParametersValueType
 
typedef SmartPointer< SelfPointer
 
typedef CostFunctionTemplate 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

virtual const InterpolatorTypeGetInterpolator () const
 
virtual const ParametersTypeGetLastTransformParameters () const
 
virtual InterpolatorTypeGetModifiableInterpolator ()
 
virtual const char * GetNameOfClass () const
 
virtual unsigned int GetNumberOfParameters (void) const override
 
virtual void GetValueAndDerivative (const ParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override=0
 
virtual void Initialize (void)
 
virtual void SetInterpolator (InterpolatorType *_arg)
 
virtual void SetTransform (TransformType *_arg)
 
virtual void SetFixedImage (const FixedImageType *_arg)
 
virtual const FixedImageTypeGetFixedImage () const
 
virtual void SetMovingSpatialObject (const MovingSpatialObjectType *_arg)
 
virtual const
MovingSpatialObjectType
GetMovingSpatialObject () const
 
- Public Member Functions inherited from itk::SingleValuedCostFunction
virtual void GetDerivative (const ParametersType &parameters, DerivativeType &derivative) const =0
 
virtual MeasureType GetValue (const ParametersType &parameters) const =0
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Attributes

static const unsigned int ImageDimension = FixedImageType::ImageDimension
 
static const unsigned int ObjectDimension = MovingSpatialObjectType::ObjectDimension
 

Protected Member Functions

 ImageToSpatialObjectMetric ()
 
 ImageToSpatialObjectMetric (const Self &)
 
void operator= (const Self &)
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual ~ImageToSpatialObjectMetric () override
 
- Protected Member Functions inherited from itk::SingleValuedCostFunction
 SingleValuedCostFunction ()
 
virtual ~SingleValuedCostFunction () override
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
 CostFunctionTemplate ()
 
virtual ~CostFunctionTemplate () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object () override
 
- 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

FixedImageConstPointer m_FixedImage
 
InterpolatorPointer m_Interpolator
 
ParametersType m_LastTransformParameters
 
MeasureType m_MatchMeasure
 
DerivativeType m_MatchMeasureDerivatives
 
MovingSpatialObjectConstPointer m_MovingSpatialObject
 
TransformPointer m_Transform
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

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)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Member Typedef Documentation

template<typename TFixedImage , typename TMovingSpatialObject >
typedef SmartPointer< const Self > itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::ConstPointer
template<typename TFixedImage , typename TMovingSpatialObject >
typedef Superclass::ParametersValueType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::CoordinateRepresentationType

Type used for representing point components

Definition at line 77 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef Superclass::DerivativeType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::DerivativeType
template<typename TFixedImage , typename TMovingSpatialObject >
typedef FixedImageType::ConstPointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::FixedImageConstPointer

Const pointer type for the FixedImage

Definition at line 123 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef FixedImageType::Pointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::FixedImagePointer

Pointer type for the FixedImage

Definition at line 116 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef TFixedImage itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::FixedImageType

Type of the fixed image

Definition at line 71 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef TransformType::InputPointType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::InputPointType

Definition at line 93 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef InterpolatorType::Pointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::InterpolatorPointer

Definition at line 103 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef LinearInterpolateImageFunction< TFixedImage, CoordinateRepresentationType > itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::InterpolatorType

Type of the Interpolator Base class

Definition at line 101 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef Superclass::MeasureType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::MeasureType
template<typename TFixedImage , typename TMovingSpatialObject >
typedef MovingSpatialObjectType::ConstPointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::MovingSpatialObjectConstPointer

Const pointer type for the MovingSpatialObject

Definition at line 126 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef MovingSpatialObjectType::Pointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::MovingSpatialObjectPointer

Pointer type for the MovingSpatialObject

Definition at line 120 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef TMovingSpatialObject itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::MovingSpatialObjectType
template<typename TFixedImage , typename TMovingSpatialObject >
typedef TransformType::OutputPointType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::OutputPointType

Definition at line 94 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef Superclass::ParametersType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::ParametersType

ParametersType typedef. It defines a position in the optimization search space.

Examples:
Examples/RegistrationITKv3/ModelToImageRegistration1.cxx, and Examples/RegistrationITKv4/ModelToImageRegistration1.cxx.

Definition at line 130 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef SmartPointer< Self > itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::Pointer
template<typename TFixedImage , typename TMovingSpatialObject >
typedef ImageToSpatialObjectMetric itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::Self
template<typename TFixedImage , typename TMovingSpatialObject >
typedef SingleValuedCostFunction itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::Superclass
template<typename TFixedImage , typename TMovingSpatialObject >
typedef TransformType::JacobianType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::TransformJacobianType

Definition at line 96 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef TransformType::ParametersType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::TransformParametersType

Definition at line 95 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef TransformType::Pointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::TransformPointer

Definition at line 92 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef Transform< CoordinateRepresentationType, itkGetStaticConstMacro(ObjectDimension), itkGetStaticConstMacro(ImageDimension) > itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::TransformType

Type of the Transform Base class

Definition at line 90 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
typedef vnl_vector_fixed< double, itkGetStaticConstMacro(ObjectDimension) > itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::VectorType

Typede of the vector type to return derivatives

Definition at line 107 of file itkImageToSpatialObjectMetric.h.

Constructor & Destructor Documentation

template<typename TFixedImage , typename TMovingSpatialObject >
itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::ImageToSpatialObjectMetric ( )
protected
template<typename TFixedImage , typename TMovingSpatialObject >
virtual itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::~ImageToSpatialObjectMetric ( )
inlineoverrideprotectedvirtual

Definition at line 172 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::ImageToSpatialObjectMetric ( const Self )
inlineprotected

Definition at line 173 of file itkImageToSpatialObjectMetric.h.

Member Function Documentation

template<typename TFixedImage , typename TMovingSpatialObject >
virtual const FixedImageType* itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::GetFixedImage ( ) const
virtual

Get/Set the FixedImage.

template<typename TFixedImage , typename TMovingSpatialObject >
virtual const InterpolatorType* itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::GetInterpolator ( ) const
virtual
template<typename TFixedImage , typename TMovingSpatialObject >
virtual const ParametersType& itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::GetLastTransformParameters ( ) const
virtual

Get the last transformation parameters visited by the optimizer. This function overload the superclass's one

template<typename TFixedImage , typename TMovingSpatialObject >
virtual InterpolatorType* itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::GetModifiableInterpolator ( )
virtual

Get the Interpolator.

template<typename TFixedImage , typename TMovingSpatialObject >
virtual const MovingSpatialObjectType* itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::GetMovingSpatialObject ( ) const
virtual

Get/Set the MovingSpatialObject

template<typename TFixedImage , typename TMovingSpatialObject >
virtual const char* itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::SingleValuedCostFunction.

template<typename TFixedImage , typename TMovingSpatialObject >
virtual unsigned int itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::GetNumberOfParameters ( void  ) const
overridevirtual

Return the number of parameters required by the Transform

Implements itk::CostFunctionTemplate< TInternalComputationValueType >.

template<typename TFixedImage , typename TMovingSpatialObject >
virtual void itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::GetValueAndDerivative ( const ParametersType parameters,
MeasureType Value,
DerivativeType Derivative 
) const
overridepure virtual

Get Value and Derivatives for MultipleValuedOptimizers

Reimplemented from itk::SingleValuedCostFunction.

Examples:
Examples/RegistrationITKv3/ModelToImageRegistration1.cxx, and Examples/RegistrationITKv4/ModelToImageRegistration1.cxx.
template<typename TFixedImage , typename TMovingSpatialObject >
virtual void itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::Initialize ( void  )
virtual

Initialize the metric

template<typename TFixedImage , typename TMovingSpatialObject >
void itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::operator= ( const Self )
inlineprotected

Definition at line 174 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
virtual void itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
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::CostFunctionTemplate< TInternalComputationValueType >.

template<typename TFixedImage , typename TMovingSpatialObject >
virtual void itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::SetFixedImage ( const FixedImageType _arg)
virtual

Get/Set the FixedImage.

template<typename TFixedImage , typename TMovingSpatialObject >
virtual void itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::SetInterpolator ( InterpolatorType _arg)
virtual

Connect the Interpolator.

template<typename TFixedImage , typename TMovingSpatialObject >
virtual void itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::SetMovingSpatialObject ( const MovingSpatialObjectType _arg)
virtual
template<typename TFixedImage , typename TMovingSpatialObject >
virtual void itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::SetTransform ( TransformType _arg)
virtual

Set/Get the Transform.

Member Data Documentation

template<typename TFixedImage , typename TMovingSpatialObject >
const unsigned int itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::ImageDimension = FixedImageType::ImageDimension
static

Image dimension enumeration.

Definition at line 81 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
FixedImageConstPointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::m_FixedImage
protected

Definition at line 183 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
InterpolatorPointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::m_Interpolator
protected

Definition at line 180 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
ParametersType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::m_LastTransformParameters
protected

Definition at line 184 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
MeasureType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::m_MatchMeasure
protected

Definition at line 177 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
DerivativeType itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::m_MatchMeasureDerivatives
protected

Definition at line 178 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
MovingSpatialObjectConstPointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::m_MovingSpatialObject
protected

Definition at line 182 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
TransformPointer itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::m_Transform
mutableprotected

Definition at line 179 of file itkImageToSpatialObjectMetric.h.

template<typename TFixedImage , typename TMovingSpatialObject >
const unsigned int itk::ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >::ObjectDimension = MovingSpatialObjectType::ObjectDimension
static

Object dimension enumeration.

Definition at line 85 of file itkImageToSpatialObjectMetric.h.


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