ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage > Class Template Reference

#include <itkCorrelationImageToImageMetricv4.h>

+ Inheritance diagram for itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >:
+ Collaboration diagram for itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >:

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef Superclass::DerivativeType DerivativeType
typedef
Superclass::FixedImageGradientType 
FixedImageGradientType
typedef
Superclass::FixedImagePixelType 
FixedImagePixelType
typedef
Superclass::FixedImagePointType 
FixedImagePointType
typedef Superclass::JacobianType JacobianType
typedef Superclass::MeasureType MeasureType
typedef
Superclass::MovingImageGradientType 
MovingImageGradientType
typedef
Superclass::MovingImagePixelType 
MovingImagePixelType
typedef
Superclass::MovingImagePointType 
MovingImagePointType
typedef
Superclass::MovingTransformType 
MovingTransformType
typedef SmartPointer< SelfPointer
typedef
CorrelationImageToImageMetricv4 
Self
typedef ImageToImageMetricv4
< TFixedImage, TMovingImage,
TVirtualImage > 
Superclass
typedef
Superclass::VirtualImageType 
VirtualImageType
typedef
Superclass::VirtualIndexType 
VirtualIndexType
typedef
Superclass::VirtualPointType 
VirtualPointType
typedef
Superclass::VirtualSampledPointSetType 
VirtualSampledPointSetType

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual const char * GetNameOfClass () const

Static Public Member Functions

static Pointer New ()

Static Public Attributes

static const ImageDimensionType FixedImageDimension = ::itk::GetImageDimension<TFixedImage>::ImageDimension
static const ImageDimensionType MovingImageDimension = ::itk::GetImageDimension<TMovingImage>::ImageDimension
static const ImageDimensionType VirtualImageDimension = ::itk::GetImageDimension<TVirtualImage>::ImageDimension

Protected Types

typedef
CorrelationImageToImageMetricv4GetValueAndDerivativeThreader
< ThreadedImageRegionPartitioner
< Superclass::VirtualImageDimension >
, Superclass, Self
CorrelationDenseGetValueAndDerivativeThreaderType
typedef
CorrelationImageToImageMetricv4HelperThreader
< ThreadedImageRegionPartitioner
< Superclass::VirtualImageDimension >
, Superclass, Self
CorrelationHelperDenseThreaderType
typedef
CorrelationImageToImageMetricv4HelperThreader
< ThreadedIndexedContainerPartitioner,
Superclass, Self
CorrelationHelperSparseThreaderType
typedef
CorrelationImageToImageMetricv4GetValueAndDerivativeThreader
< ThreadedIndexedContainerPartitioner,
Superclass, Self
CorrelationSparseGetValueAndDerivativeThreaderType

Protected Member Functions

 CorrelationImageToImageMetricv4 ()
virtual void InitializeForIteration () const
void PrintSelf (std::ostream &os, Indent indent) const
virtual ~CorrelationImageToImageMetricv4 ()

Protected Attributes

MeasureType m_AverageFix
MeasureType m_AverageMov
CorrelationHelperDenseThreaderType::Pointer m_HelperDenseThreader
CorrelationHelperSparseThreaderType::Pointer m_HelperSparseThreader

Private Member Functions

 CorrelationImageToImageMetricv4 (const Self &)
void operator= (const Self &)

Friends

class CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >
class CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >
class CorrelationImageToImageMetricv4HelperThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self >
class CorrelationImageToImageMetricv4HelperThreader< ThreadedIndexedContainerPartitioner, Superclass, Self >
class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Self >
class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Self >
class ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Self >
class ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, Self >

Detailed Description

template<class TFixedImage, class TMovingImage, class TVirtualImage = TFixedImage>
class itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >

Class implementing normalized cross correlation image metric.

Definition of the normalized cross correlation metric used here:

negative square of normalized cross correlation

\[ C(f, m) = -\frac{<f-\bar{f}, m-\bar{m} >^2}{|f-\bar{f}}|^2 |m-\bar{m}|^2} \]

in which, f, m are the vectors of image pixel intensities, $\bar{f}$ and $\bar{m}$ are the mean values of f and m. <,> denotes inner product, $|\cdot|$ denotes the 2-norm of the vector. The minus sign makes the metric to optimize towards its minimal value. Note that this uses the *square* of the mathematical notion of normalized cross correlation to avoid the square root computation in practice.

Moving image (m) is a function of the parameters (p) of the moving transforms. So $ C(f, m) = C(f, m(p)) $ GetValueAndDerivative will return the value as $ C(f,m) $ and the derivative as

\[ \frac{d}{dp} C = 2 \frac{<f1, m1>}{|f1|^2 |m1|^2} * ( <f1, \frac{dm}{dp}> - \frac{<f1, m1>}{|m1|^2} < m1, \frac{dm}{dp} > ) \]

in which, $ f1 = f - \bar{f} $, $ m1 = m - \bar{m} $ (Note: there should be a minus sign of $ \frac{d}{dp} $ mathematically, which is not in the implementation to match the requirement of the metricv4 optimization framework.

See CorrelationImageToImageMetricv4GetValueAndDerivativeThreader::ProcessPoint for algorithm implementation.

This metric only works with the global transform. It throws an exception if the transform has local support.

Definition at line 73 of file itkCorrelationImageToImageMetricv4.h.


Member Typedef Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef SmartPointer<const Self> itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ConstPointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self > itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::CorrelationDenseGetValueAndDerivativeThreaderType [protected]

Definition at line 135 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CorrelationImageToImageMetricv4HelperThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self > itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::CorrelationHelperDenseThreaderType [protected]

Definition at line 143 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CorrelationImageToImageMetricv4HelperThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::CorrelationHelperSparseThreaderType [protected]

Definition at line 145 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::CorrelationSparseGetValueAndDerivativeThreaderType [protected]

Definition at line 137 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::DerivativeType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::DerivativeType

Type of the metric derivative.

Reimplemented from itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

Definition at line 91 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedImageGradientType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedImagePixelType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImagePixelType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedImagePointType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImagePointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::JacobianType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::JacobianType

Jacobian type. This is the same for all transforms

Reimplemented from itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

Definition at line 102 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MeasureType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MeasureType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingImageGradientType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingImagePixelType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImagePixelType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingImagePointType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImagePointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingTransformType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingTransformType

Type of the Transform Base classes

Reimplemented from itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

Definition at line 101 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef SmartPointer<Self> itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::Pointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CorrelationImageToImageMetricv4 itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::Self

Standard class typedefs.

Reimplemented from itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

Definition at line 78 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage> itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::Superclass
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualImageType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualImageType

Types for the virtual domain

Reimplemented from itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

Definition at line 103 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualIndexType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualIndexType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualPointType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualPointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualSampledPointSetType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualSampledPointSetType

Constructor & Destructor Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::CorrelationImageToImageMetricv4 ( ) [protected]
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::~CorrelationImageToImageMetricv4 ( ) [protected, virtual]
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::CorrelationImageToImageMetricv4 ( const Self ) [private]

Member Function Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual::itk::LightObject::Pointer itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::CreateAnother ( void  ) const [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.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const char* itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetNameOfClass ( ) const [virtual]

Run-time type information (and related methods).

Reimplemented from itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::InitializeForIteration ( ) const [protected, virtual]

Perform any initialization required before each evaluation of GetValueAndDerivative. This is distinct from Initialize, which is called only once before a number of iterations, e.g. before a registration loop.

Reimplemented from itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
static Pointer itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::New ( ) [static]

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
void itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::operator= ( const Self ) [private]

Mutex lock to protect modification to the reference count

Reimplemented from itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
void itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::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::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.


Friends And Related Function Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self > [friend]

Definition at line 132 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > [friend]

Definition at line 133 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class CorrelationImageToImageMetricv4HelperThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Superclass, Self > [friend]

Definition at line 139 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class CorrelationImageToImageMetricv4HelperThreader< ThreadedIndexedContainerPartitioner, Superclass, Self > [friend]

Definition at line 140 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Self > [friend]

Definition at line 129 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Self > [friend]
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< Superclass::VirtualImageDimension >, Self > [friend]

Definition at line 127 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, Self > [friend]

Member Data Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
const ImageDimensionType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageDimension = ::itk::GetImageDimension<TFixedImage>::ImageDimension [static]
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MeasureType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_AverageFix [mutable, protected]

Definition at line 153 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MeasureType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_AverageMov [mutable, protected]

Definition at line 154 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
CorrelationHelperDenseThreaderType::Pointer itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_HelperDenseThreader [protected]

Definition at line 147 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
CorrelationHelperSparseThreaderType::Pointer itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_HelperSparseThreader [protected]

Definition at line 148 of file itkCorrelationImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
const ImageDimensionType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageDimension = ::itk::GetImageDimension<TMovingImage>::ImageDimension [static]
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
const ImageDimensionType itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualImageDimension = ::itk::GetImageDimension<TVirtualImage>::ImageDimension [static]

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