ITK  4.9.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
itk::ImageToImageMetric< TFixedImage, TMovingImage > Class Template Reference

#include <itkImageToImageMetric.h>

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

Detailed Description

template<typename TFixedImage, typename TMovingImage>
class itk::ImageToImageMetric< TFixedImage, TMovingImage >

Computes similarity between regions of two images.

This Class is templated over the type of the two input images. It expects a Transform and an Interpolator to be plugged in. This particular class is the base class for a hierarchy of similarity metrics.

This class computes a value that measures the similarity between the Fixed image and the transformed Moving image. The Interpolator is used to compute intensity values on non-grid positions resulting from mapping points through the Transform.

Definition at line 51 of file itkImageToImageMetric.h.

Classes

class  FixedImageSamplePoint
 
struct  MultiThreaderParameterType
 

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::ParametersValueType 
CoordinateRepresentationType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef
FixedImageType::ConstPointer 
FixedImageConstPointer
 
typedef std::vector
< FixedImageIndexType
FixedImageIndexContainer
 
typedef FixedImageType::IndexType FixedImageIndexType
 
typedef
FixedImageIndexType::IndexValueType 
FixedImageIndexValueType
 
typedef
FixedImageMaskType::ConstPointer 
FixedImageMaskConstPointer
 
typedef FixedImageMaskType::Pointer FixedImageMaskPointer
 
typedef SpatialObject
< itkGetStaticConstMacro(FixedImageDimension) > 
FixedImageMaskType
 
typedef TFixedImage::PixelType FixedImagePixelType
 
typedef
TransformType::InputPointType 
FixedImagePointType
 
typedef FixedImageType::RegionType FixedImageRegionType
 
typedef TFixedImage FixedImageType
 
typedef
TransformType::InputPointType 
InputPointType
 
typedef InterpolatorType::Pointer InterpolatorPointer
 
typedef
InterpolateImageFunction
< MovingImageType,
CoordinateRepresentationType
InterpolatorType
 
typedef Superclass::MeasureType MeasureType
 
typedef
MovingImageType::ConstPointer 
MovingImageConstPointer
 
typedef MovingImageType::IndexType MovingImageIndexType
 
typedef
MovingImageMaskType::ConstPointer 
MovingImageMaskConstPointer
 
typedef
MovingImageMaskType::Pointer 
MovingImageMaskPointer
 
typedef SpatialObject
< itkGetStaticConstMacro(MovingImageDimension) > 
MovingImageMaskType
 
typedef TMovingImage::PixelType MovingImagePixelType
 
typedef
TransformType::OutputPointType 
MovingImagePointType
 
typedef TMovingImage MovingImageType
 
typedef MultiThreader MultiThreaderType
 
typedef
TransformType::OutputPointType 
OutputPointType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef ImageToImageMetric Self
 
typedef SingleValuedCostFunction Superclass
 
typedef TransformType::JacobianType TransformJacobianType
 
typedef
TransformType::ParametersType 
TransformParametersType
 
typedef TransformType::Pointer TransformPointer
 
typedef Transform
< CoordinateRepresentationType,
itkGetStaticConstMacro(MovingImageDimension),
itkGetStaticConstMacro(FixedImageDimension) > 
TransformType
 
typedef NumericTraits
< MovingImagePixelType >
::RealType 
RealType
 
typedef CovariantVector
< RealType,
itkGetStaticConstMacro(MovingImageDimension) > 
GradientPixelType
 
typedef Image
< GradientPixelType,
itkGetStaticConstMacro(MovingImageDimension) > 
GradientImageType
 
typedef SmartPointer
< GradientImageType
GradientImagePointer
 
typedef
GradientRecursiveGaussianImageFilter
< MovingImageType,
GradientImageType
GradientImageFilterType
 
typedef
GradientImageFilterType::Pointer 
GradientImageFilterPointer
 
- 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 void ComputeGradient ()
 
virtual const
FixedImageRegionType
GetFixedImageRegion () const
 
virtual const FixedImagePixelTypeGetFixedImageSamplesIntensityThreshold () const
 
virtual const GradientImageTypeGetGradientImage () const
 
virtual const InterpolatorTypeGetInterpolator () const
 
virtual GradientImageTypeGetModifiableGradientImage ()
 
virtual InterpolatorTypeGetModifiableInterpolator ()
 
virtual TransformTypeGetModifiableTransform ()
 
virtual const char * GetNameOfClass () const
 
SizeValueType GetNumberOfMovingImageSamples (void)
 
virtual unsigned int GetNumberOfParameters (void) const override
 
virtual const SizeValueTypeGetNumberOfPixelsCounted () const
 
SizeValueType GetNumberOfSpatialSamples (void)
 
virtual const TransformTypeGetTransform () const
 
virtual const bool & GetUseAllPixels () const
 
virtual const bool & GetUseFixedImageIndexes () const
 
virtual const bool & GetUseFixedImageSamplesIntensityThreshold () const
 
virtual const bool & GetUseSequentialSampling () const
 
virtual void Initialize (void) throw ( ExceptionObject )
 
virtual void MultiThreadingInitialize (void) throw ( ExceptionObject )
 
void SetFixedImageIndexes (const FixedImageIndexContainer &indexes)
 
virtual void SetFixedImageRegion (const FixedImageRegionType reg)
 
void SetFixedImageSamplesIntensityThreshold (const FixedImagePixelType &thresh)
 
virtual void SetInterpolator (InterpolatorType *_arg)
 
void SetNumberOfSpatialSamples (SizeValueType num)
 
virtual void SetTransform (TransformType *_arg)
 
void SetTransformParameters (const ParametersType &parameters) const
 
void SetUseAllPixels (bool useAllPixels)
 
void SetUseFixedImageIndexes (bool useIndex)
 
void SetUseFixedImageSamplesIntensityThreshold (bool useThresh)
 
void SetUseSequentialSampling (bool sequentialSampling)
 
void UseAllPixelsOff (void)
 
void UseAllPixelsOn (void)
 
virtual void SetFixedImage (const FixedImageType *_arg)
 
virtual const FixedImageTypeGetFixedImage () const
 
virtual void SetMovingImage (const MovingImageType *_arg)
 
virtual const MovingImageTypeGetMovingImage () const
 
virtual void SetMovingImageMask (MovingImageMaskType *_arg)
 
virtual void SetMovingImageMask (const MovingImageMaskType *_arg)
 
virtual const MovingImageMaskTypeGetMovingImageMask () const
 
virtual void SetFixedImageMask (FixedImageMaskType *_arg)
 
virtual void SetFixedImageMask (const FixedImageMaskType *_arg)
 
virtual const FixedImageMaskTypeGetFixedImageMask () const
 
void SetNumberOfThreads (ThreadIdType numberOfThreads)
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
virtual void SetComputeGradient (bool _arg)
 
virtual const bool & GetComputeGradient () const
 
virtual void ComputeGradientOn ()
 
virtual void ComputeGradientOff ()
 
virtual void SetNumberOfFixedImageSamples (SizeValueType numSamples)
 
virtual const SizeValueTypeGetNumberOfFixedImageSamples () const
 
void ReinitializeSeed ()
 
void ReinitializeSeed (int seed)
 
virtual void SetUseCachingOfBSplineWeights (bool _arg)
 
virtual const bool & GetUseCachingOfBSplineWeights () const
 
virtual void UseCachingOfBSplineWeightsOn ()
 
virtual void UseCachingOfBSplineWeightsOff ()
 
virtual MultiThreaderTypeGetModifiableThreader ()
 
virtual const MultiThreaderTypeGetThreader () const
 
const TransformPointerGetThreaderTransform ()
 
- 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
 
virtual void GetValueAndDerivative (const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
 
- 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 MovingImageDimension = TMovingImage::ImageDimension
 
static const unsigned int FixedImageDimension = TFixedImage::ImageDimension
 

Protected Types

typedef std::vector< bool > BooleanArrayType
 
typedef
BSplineInterpolateImageFunction
< MovingImageType,
CoordinateRepresentationType
BSplineInterpolatorType
 
typedef FixedArray
< SizeValueType,
FixedImageType::ImageDimension > 
BSplineParametersOffsetType
 
typedef
BSplineTransformType::ParameterIndexArrayType 
BSplineTransformIndexArrayType
 
typedef Array2D< IndexValueTypeBSplineTransformIndicesArrayType
 
typedef BSplineBaseTransform
< CoordinateRepresentationType,
FixedImageType::ImageDimension,
itkGetStaticConstMacro(DeformationSplineOrder) > 
BSplineTransformType
 
typedef Array2D< WeightsValueTypeBSplineTransformWeightsArrayType
 
typedef
BSplineTransformType::WeightsType 
BSplineTransformWeightsType
 
typedef
CentralDifferenceImageFunction
< MovingImageType,
CoordinateRepresentationType
DerivativeFunctionType
 
typedef std::vector
< FixedImageSamplePoint
FixedImageSampleContainer
 
typedef CovariantVector
< double,
itkGetStaticConstMacro(MovingImageDimension) > 
ImageDerivativesType
 
typedef
BSplineTransformIndexArrayType::ValueType 
IndexValueType
 
typedef std::vector
< MovingImagePointType
MovingImagePointArrayType
 
typedef
BSplineTransformWeightsType::ValueType 
WeightsValueType
 

Protected Member Functions

virtual void ComputeImageDerivatives (const MovingImagePointType &mappedPoint, ImageDerivativesType &gradient, ThreadIdType threadId) const
 
void GetValueAndDerivativeMultiThreadedInitiate () const
 
void GetValueAndDerivativeMultiThreadedPostProcessInitiate () const
 
void GetValueAndDerivativeMultiThreadedPreProcessInitiate () const
 
virtual void GetValueAndDerivativeThread (ThreadIdType threadId) const
 
virtual void GetValueAndDerivativeThreadPostProcess (ThreadIdType, bool) const
 
virtual void GetValueAndDerivativeThreadPreProcess (ThreadIdType, bool) const
 
virtual bool GetValueAndDerivativeThreadProcessSample (ThreadIdType, SizeValueType, const MovingImagePointType &, double, const ImageDerivativesType &) const
 
void GetValueMultiThreadedInitiate () const
 
void GetValueMultiThreadedPostProcessInitiate () const
 
void GetValueMultiThreadedPreProcessInitiate () const
 
virtual void GetValueThread (ThreadIdType threadId) const
 
virtual void GetValueThreadPostProcess (ThreadIdType, bool) const
 
virtual void GetValueThreadPreProcess (ThreadIdType, bool) const
 
virtual bool GetValueThreadProcessSample (ThreadIdType, SizeValueType, const MovingImagePointType &, double) const
 
 ImageToImageMetric ()
 
virtual void PreComputeTransformValues ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SampleFixedImageIndexes (FixedImageSampleContainer &samples) const
 
virtual void SampleFixedImageRegion (FixedImageSampleContainer &samples) const
 
virtual void SampleFullFixedImageRegion (FixedImageSampleContainer &samples) const
 
virtual void SynchronizeTransforms () const
 
virtual void TransformPoint (unsigned int sampleNumber, MovingImagePointType &mappedPoint, bool &sampleWithinSupportRegion, double &movingImageValue, ThreadIdType threadId) const
 
virtual void TransformPointWithDerivatives (unsigned int sampleNumber, MovingImagePointType &mappedPoint, bool &sampleWithinSupportRegion, double &movingImageValue, ImageDerivativesType &gradient, ThreadIdType threadId) const
 
virtual ~ImageToImageMetric ()
 
- Protected Member Functions inherited from itk::SingleValuedCostFunction
 SingleValuedCostFunction ()
 
virtual ~SingleValuedCostFunction ()
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
 CostFunctionTemplate ()
 
virtual ~CostFunctionTemplate ()
 
- 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 ()
 

Static Protected Member Functions

static ITK_THREAD_RETURN_TYPE GetValueAndDerivativeMultiThreaded (void *arg)
 
static ITK_THREAD_RETURN_TYPE GetValueAndDerivativeMultiThreadedPostProcess (void *arg)
 
static ITK_THREAD_RETURN_TYPE GetValueAndDerivativeMultiThreadedPreProcess (void *arg)
 
static ITK_THREAD_RETURN_TYPE GetValueMultiThreaded (void *arg)
 
static ITK_THREAD_RETURN_TYPE GetValueMultiThreadedPostProcess (void *arg)
 
static ITK_THREAD_RETURN_TYPE GetValueMultiThreadedPreProcess (void *arg)
 

Protected Attributes

BSplineInterpolatorType::Pointer m_BSplineInterpolator
 
BSplineParametersOffsetType m_BSplineParametersOffset
 
MovingImagePointArrayType m_BSplinePreTransformPointsArray
 
BSplineTransformType::Pointer m_BSplineTransform
 
BSplineTransformIndexArrayType m_BSplineTransformIndices
 
BSplineTransformIndicesArrayType m_BSplineTransformIndicesArray
 
BSplineTransformWeightsType m_BSplineTransformWeights
 
BSplineTransformWeightsArrayType m_BSplineTransformWeightsArray
 
bool m_ComputeGradient
 
DerivativeFunctionType::Pointer m_DerivativeCalculator
 
FixedImageConstPointer m_FixedImage
 
FixedImageIndexContainer m_FixedImageIndexes
 
FixedImageMaskConstPointer m_FixedImageMask
 
FixedImageSampleContainer m_FixedImageSamples
 
FixedImagePixelType m_FixedImageSamplesIntensityThreshold
 
GradientImagePointer m_GradientImage
 
InterpolatorPointer m_Interpolator
 
bool m_InterpolatorIsBSpline
 
MovingImageConstPointer m_MovingImage
 
MovingImageMaskConstPointer m_MovingImageMask
 
SizeValueType m_NumberOfFixedImageSamples
 
SizeValueType m_NumberOfParameters
 
SizeValueType m_NumberOfPixelsCounted
 
ThreadIdType m_NumberOfThreads
 
SizeValueType m_NumBSplineWeights
 
int m_RandomSeed
 
bool m_ReseedIterator
 
MultiThreaderType::Pointer m_Threader
 
BSplineTransformIndexArrayTypem_ThreaderBSplineTransformIndices
 
BSplineTransformWeightsTypem_ThreaderBSplineTransformWeights
 
unsigned int * m_ThreaderNumberOfMovingImageSamples
 
MultiThreaderParameterType m_ThreaderParameter
 
TransformPointerm_ThreaderTransform
 
TransformPointer m_Transform
 
bool m_TransformIsBSpline
 
bool m_UseAllPixels
 
bool m_UseCachingOfBSplineWeights
 
bool m_UseFixedImageIndexes
 
bool m_UseFixedImageSamplesIntensityThreshold
 
bool m_UseSequentialSampling
 
BooleanArrayType m_WithinBSplineSupportRegionArray
 
bool m_WithinThreadPostProcess
 
bool m_WithinThreadPreProcess
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Static Protected Attributes

static const unsigned int DeformationSplineOrder = 3
 

Private Member Functions

 ImageToImageMetric (const Self &) ITK_DELETE_FUNCTION
 
void operator= (const Self &) ITK_DELETE_FUNCTION
 

Private Attributes

FixedImageRegionType m_FixedImageRegion
 

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 TMovingImage >
typedef std::vector< bool > itk::ImageToImageMetric< TFixedImage, TMovingImage >::BooleanArrayType
protected

Definition at line 442 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineInterpolatorType
protected

If a BSplineInterpolationFunction is used, this class obtain image derivatives from the BSpline interpolator. Otherwise, image derivatives are computed using central differencing.

Definition at line 451 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef FixedArray< SizeValueType, FixedImageType ::ImageDimension > itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineParametersOffsetType
protected

Definition at line 443 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef BSplineTransformType::ParameterIndexArrayType itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineTransformIndexArrayType
protected

Definition at line 437 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef Array2D< IndexValueType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineTransformIndicesArrayType
protected

Definition at line 439 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef BSplineBaseTransform< CoordinateRepresentationType, FixedImageType ::ImageDimension, itkGetStaticConstMacro(DeformationSplineOrder) > itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineTransformType
protected

Definition at line 431 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef Array2D< WeightsValueType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineTransformWeightsArrayType
protected

Definition at line 435 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef BSplineTransformType::WeightsType itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineTransformWeightsType
protected

Definition at line 433 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef SmartPointer< const Self > itk::ImageToImageMetric< TFixedImage, TMovingImage >::ConstPointer

Definition at line 59 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef Superclass::ParametersValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::CoordinateRepresentationType

Type used for representing point components

Definition at line 62 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef CentralDifferenceImageFunction< MovingImageType, CoordinateRepresentationType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::DerivativeFunctionType
protected

Typedefs for using central difference calculator.

Definition at line 456 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef Superclass::DerivativeType itk::ImageToImageMetric< TFixedImage, TMovingImage >::DerivativeType

Type of the derivative.

Definition at line 138 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef FixedImageType::ConstPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageConstPointer

Definition at line 75 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef std::vector< FixedImageIndexType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexContainer

Definition at line 106 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef FixedImageType::IndexType itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexType

Index and Point typedef support.

Definition at line 100 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef FixedImageIndexType::IndexValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexValueType

Definition at line 101 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef FixedImageMaskType::ConstPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageMaskConstPointer

Definition at line 126 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef FixedImageMaskType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageMaskPointer

Definition at line 125 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef SpatialObject< itkGetStaticConstMacro(FixedImageDimension) > itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageMaskType

Type for the mask of the fixed image. Only pixels that are "inside" this mask will be considered for the computation of the metric

Definition at line 124 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TFixedImage::PixelType itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImagePixelType

Definition at line 74 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TransformType::InputPointType itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImagePointType

Definition at line 103 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef FixedImageType::RegionType itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageRegionType

Definition at line 76 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef std::vector< FixedImageSamplePoint > itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageSampleContainer
protected

FixedImageSamplePoint typedef support.

Definition at line 365 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TFixedImage itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageType

Type of the fixed Image.

Definition at line 73 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef GradientImageFilterType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientImageFilterPointer

Gaussian filter to compute the gradient of the Moving Image

Definition at line 117 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef GradientRecursiveGaussianImageFilter< MovingImageType, GradientImageType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientImageFilterType

Gaussian filter to compute the gradient of the Moving Image

Definition at line 116 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef SmartPointer< GradientImageType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientImagePointer

Gaussian filter to compute the gradient of the Moving Image

Definition at line 115 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef Image< GradientPixelType, itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientImageType

Gaussian filter to compute the gradient of the Moving Image

Definition at line 114 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef CovariantVector< RealType, itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientPixelType

Gaussian filter to compute the gradient of the Moving Image

Definition at line 113 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef CovariantVector< double, itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetric< TFixedImage, TMovingImage >::ImageDerivativesType
protected

Definition at line 458 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef BSplineTransformIndexArrayType::ValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::IndexValueType
protected

Definition at line 438 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TransformType::InputPointType itk::ImageToImageMetric< TFixedImage, TMovingImage >::InputPointType

Definition at line 94 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef InterpolatorType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::InterpolatorPointer

Definition at line 120 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::InterpolatorType

Type of the Interpolator Base class

Definition at line 109 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef Superclass::MeasureType itk::ImageToImageMetric< TFixedImage, TMovingImage >::MeasureType

Type of the measure.

Definition at line 135 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef MovingImageType::ConstPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageConstPointer

Definition at line 70 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef MovingImageType::IndexType itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageIndexType

Definition at line 102 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef MovingImageMaskType::ConstPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageMaskConstPointer

Definition at line 132 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef MovingImageMaskType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageMaskPointer

Definition at line 131 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef SpatialObject< itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageMaskType

Type for the mask of the moving image. Only pixels that are "inside" this mask will be considered for the computation of the metric

Definition at line 130 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TMovingImage::PixelType itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImagePixelType

Definition at line 69 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef std::vector< MovingImagePointType > itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImagePointArrayType
protected

Definition at line 441 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TransformType::OutputPointType itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImagePointType

Definition at line 104 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TMovingImage itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageType

Type of the moving Image.

Definition at line 65 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef MultiThreader itk::ImageToImageMetric< TFixedImage, TMovingImage >::MultiThreaderType

Definition at line 317 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TransformType::OutputPointType itk::ImageToImageMetric< TFixedImage, TMovingImage >::OutputPointType

Definition at line 95 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef Superclass::ParametersType itk::ImageToImageMetric< TFixedImage, TMovingImage >::ParametersType

Type of the parameters.

Definition at line 141 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef SmartPointer< Self > itk::ImageToImageMetric< TFixedImage, TMovingImage >::Pointer

Definition at line 58 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef NumericTraits< MovingImagePixelType >::RealType itk::ImageToImageMetric< TFixedImage, TMovingImage >::RealType

Gaussian filter to compute the gradient of the Moving Image

Definition at line 112 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef ImageToImageMetric itk::ImageToImageMetric< TFixedImage, TMovingImage >::Self

Standard class typedefs.

Definition at line 56 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef SingleValuedCostFunction itk::ImageToImageMetric< TFixedImage, TMovingImage >::Superclass

Definition at line 57 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TransformType::JacobianType itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformJacobianType

Definition at line 97 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TransformType::ParametersType itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformParametersType

Definition at line 96 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef TransformType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformPointer

Definition at line 93 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef Transform< CoordinateRepresentationType, itkGetStaticConstMacro(MovingImageDimension), itkGetStaticConstMacro(FixedImageDimension) > itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformType

Type of the Transform Base class

Definition at line 91 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
typedef BSplineTransformWeightsType::ValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::WeightsValueType
protected

Definition at line 434 of file itkImageToImageMetric.h.

Constructor & Destructor Documentation

template<typename TFixedImage , typename TMovingImage >
itk::ImageToImageMetric< TFixedImage, TMovingImage >::ImageToImageMetric ( )
protected
template<typename TFixedImage , typename TMovingImage >
virtual itk::ImageToImageMetric< TFixedImage, TMovingImage >::~ImageToImageMetric ( )
protectedvirtual
template<typename TFixedImage , typename TMovingImage >
itk::ImageToImageMetric< TFixedImage, TMovingImage >::ImageToImageMetric ( const Self )
private

Member Function Documentation

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::ComputeGradient ( )
virtual

Computes the gradient image and assigns it to m_GradientImage

Reimplemented in itk::KappaStatisticImageToImageMetric< TFixedImage, TMovingImage >.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::ComputeGradientOff ( )
virtual

Set/Get gradient computation.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::ComputeGradientOn ( )
virtual

Set/Get gradient computation.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::ComputeImageDerivatives ( const MovingImagePointType mappedPoint,
ImageDerivativesType gradient,
ThreadIdType  threadId 
) const
protectedvirtual

Compute image derivatives at a point.

template<typename TFixedImage , typename TMovingImage >
virtual const bool& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetComputeGradient ( ) const
virtual

Set/Get gradient computation.

template<typename TFixedImage , typename TMovingImage >
virtual const FixedImageType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetFixedImage ( ) const
virtual

Get/Set the Fixed Image.

template<typename TFixedImage , typename TMovingImage >
virtual const FixedImageMaskType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetFixedImageMask ( ) const
virtual

Set/Get the fixed image mask.

template<typename TFixedImage , typename TMovingImage >
virtual const FixedImageRegionType& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetFixedImageRegion ( ) const
virtual

Get the region over which the metric will be computed

template<typename TFixedImage , typename TMovingImage >
virtual const FixedImagePixelType& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetFixedImageSamplesIntensityThreshold ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
virtual const GradientImageType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetGradientImage ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
virtual const InterpolatorType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetInterpolator ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
virtual GradientImageType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetModifiableGradientImage ( )
virtual

Get Gradient Image.

template<typename TFixedImage , typename TMovingImage >
virtual InterpolatorType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetModifiableInterpolator ( )
virtual

Get a pointer to the Interpolator.

template<typename TFixedImage , typename TMovingImage >
virtual MultiThreaderType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetModifiableThreader ( )
virtual

Get the Threader.

template<typename TFixedImage , typename TMovingImage >
virtual TransformType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetModifiableTransform ( )
virtual

Get a pointer to the Transform.

template<typename TFixedImage , typename TMovingImage >
virtual const MovingImageType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetMovingImage ( ) const
virtual

Get/Set the Moving Image.

template<typename TFixedImage , typename TMovingImage >
virtual const MovingImageMaskType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetMovingImageMask ( ) const
virtual

Set/Get the moving image mask.

template<typename TFixedImage , typename TMovingImage >
virtual const char* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNameOfClass ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
virtual const SizeValueType& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfFixedImageSamples ( ) const
virtual

Number of spatial samples to used to compute metric This sets the number of samples.

Referenced by itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfSpatialSamples().

template<typename TFixedImage , typename TMovingImage >
SizeValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfMovingImageSamples ( void  )
inline

Get the number of pixels considered in the computation.

Definition at line 166 of file itkImageToImageMetric.h.

References itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfPixelsCounted().

template<typename TFixedImage , typename TMovingImage >
virtual unsigned int itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfParameters ( void  ) const
inlineoverridevirtual
template<typename TFixedImage , typename TMovingImage >
virtual const SizeValueType& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfPixelsCounted ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
SizeValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfSpatialSamples ( void  )
inline
template<typename TFixedImage , typename TMovingImage >
virtual const ThreadIdType& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfThreads ( ) const
virtual

Set/Get number of threads to use for computations.

template<typename TFixedImage , typename TMovingImage >
virtual const MultiThreaderType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetThreader ( ) const
virtual

Get the Threader.

template<typename TFixedImage , typename TMovingImage >
const TransformPointer* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetThreaderTransform ( )
inline
template<typename TFixedImage , typename TMovingImage >
virtual const TransformType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetTransform ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
virtual const bool& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetUseAllPixels ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
virtual const bool& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetUseCachingOfBSplineWeights ( ) const
virtual

This boolean flag is only relevant when this metric is used along with a BSplineBaseTransform. The flag enables/disables the caching of values computed when a physical point is mapped through the BSplineBaseTransform. In particular it will cache the values of the BSpline weights for that points, and the indexes indicating what BSpline-grid nodes are relevant for that specific point. This caching is made optional due to the fact that the memory arrays used for the caching can reach large sizes even for moderate image size problems. For example, for a 3D image of 256^3, using 20% of pixels, these arrays will take about 1 Gigabyte of RAM for storage. The ratio of computing time between using the cache or not using the cache can reach 1:5, meaning that using the caching can provide a five times speed up. It is therefore, interesting to enable the caching, if enough memory is available for it. The caching is enabled by default, in order to preserve backward compatibility with previous versions of ITK.

template<typename TFixedImage , typename TMovingImage >
virtual const bool& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetUseFixedImageIndexes ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
virtual const bool& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetUseFixedImageSamplesIntensityThreshold ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
virtual const bool& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetUseSequentialSampling ( ) const
virtual
template<typename TFixedImage , typename TMovingImage >
static ITK_THREAD_RETURN_TYPE itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeMultiThreaded ( void *  arg)
staticprotected
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeMultiThreadedInitiate ( ) const
protected
template<typename TFixedImage , typename TMovingImage >
static ITK_THREAD_RETURN_TYPE itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeMultiThreadedPostProcess ( void *  arg)
staticprotected
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeMultiThreadedPostProcessInitiate ( ) const
protected
template<typename TFixedImage , typename TMovingImage >
static ITK_THREAD_RETURN_TYPE itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeMultiThreadedPreProcess ( void *  arg)
staticprotected
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeMultiThreadedPreProcessInitiate ( ) const
protected
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeThread ( ThreadIdType  threadId) const
inlineprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeThreadPostProcess ( ThreadIdType  ,
bool   
) const
inlineprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeThreadPreProcess ( ThreadIdType  ,
bool   
) const
inlineprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivativeThreadProcessSample ( ThreadIdType  ,
SizeValueType  ,
const MovingImagePointType ,
double  ,
const ImageDerivativesType  
) const
inlineprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
static ITK_THREAD_RETURN_TYPE itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueMultiThreaded ( void *  arg)
staticprotected
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueMultiThreadedInitiate ( ) const
protected
template<typename TFixedImage , typename TMovingImage >
static ITK_THREAD_RETURN_TYPE itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueMultiThreadedPostProcess ( void *  arg)
staticprotected
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueMultiThreadedPostProcessInitiate ( ) const
protected
template<typename TFixedImage , typename TMovingImage >
static ITK_THREAD_RETURN_TYPE itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueMultiThreadedPreProcess ( void *  arg)
staticprotected
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueMultiThreadedPreProcessInitiate ( ) const
protected
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueThread ( ThreadIdType  threadId) const
inlineprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueThreadPostProcess ( ThreadIdType  ,
bool   
) const
inlineprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueThreadPreProcess ( ThreadIdType  ,
bool   
) const
inlineprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetValueThreadProcessSample ( ThreadIdType  ,
SizeValueType  ,
const MovingImagePointType ,
double   
) const
inlineprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::Initialize ( void  )
throw (ExceptionObject
)
virtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::MultiThreadingInitialize ( void  )
throw (ExceptionObject
)
virtual

Initialize the components related to supporting multiple threads

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::operator= ( const Self )
private
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::PreComputeTransformValues ( )
protectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::ReinitializeSeed ( )

Reinitialize the seed of the random number generator that selects the sample of pixels used for estimating the image histograms and the joint histogram. By nature, this metric is not deterministic, since at each run it may select a different set of pixels. By initializing the random number generator seed to the same value you can restore determinism. On the other hand, calling the method ReinitializeSeed() without arguments will use the clock from your machine in order to have a very random initialization of the seed. This will indeed increase the non-deterministic behavior of the metric.

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::ReinitializeSeed ( int  seed)

Reinitialize the seed of the random number generator that selects the sample of pixels used for estimating the image histograms and the joint histogram. By nature, this metric is not deterministic, since at each run it may select a different set of pixels. By initializing the random number generator seed to the same value you can restore determinism. On the other hand, calling the method ReinitializeSeed() without arguments will use the clock from your machine in order to have a very random initialization of the seed. This will indeed increase the non-deterministic behavior of the metric.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SampleFixedImageIndexes ( FixedImageSampleContainer samples) const
protectedvirtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SampleFixedImageRegion ( FixedImageSampleContainer samples) const
protectedvirtual

Uniformly select a sample set from the fixed image domain.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SampleFullFixedImageRegion ( FixedImageSampleContainer samples) const
protectedvirtual

Gather all the pixels from the fixed image domain.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetComputeGradient ( bool  _arg)
virtual

Set/Get gradient computation.

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

Get/Set the Fixed Image.

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetFixedImageIndexes ( const FixedImageIndexContainer indexes)

Set the fixed image indexes to be used as the samples when computing the match metric

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetFixedImageMask ( FixedImageMaskType _arg)
virtual

Set/Get the fixed image mask.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetFixedImageMask ( const FixedImageMaskType _arg)
virtual

Set/Get the fixed image mask.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetFixedImageRegion ( const FixedImageRegionType  reg)
virtual

Set the region over which the metric will be computed

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetFixedImageSamplesIntensityThreshold ( const FixedImagePixelType thresh)

Minimum fixed-image intensity needed for a sample to be used in the metric computation

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetInterpolator ( InterpolatorType _arg)
virtual

Connect the Interpolator.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetMovingImage ( const MovingImageType _arg)
virtual

Get/Set the Moving Image.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetMovingImageMask ( MovingImageMaskType _arg)
virtual

Set/Get the moving image mask.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetMovingImageMask ( const MovingImageMaskType _arg)
virtual

Set/Get the moving image mask.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetNumberOfFixedImageSamples ( SizeValueType  numSamples)
virtual

Number of spatial samples to used to compute metric This sets the number of samples.

Referenced by itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetNumberOfSpatialSamples().

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetNumberOfSpatialSamples ( SizeValueType  num)
inline

Number of spatial samples to used to compute metric This sets the number of samples.

Definition at line 241 of file itkImageToImageMetric.h.

References itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetNumberOfFixedImageSamples().

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetNumberOfThreads ( ThreadIdType  numberOfThreads)

Set/Get number of threads to use for computations.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetTransform ( TransformType _arg)
virtual

Connect the Transform.

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetTransformParameters ( const ParametersType parameters) const

Set the parameters defining the Transform.

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetUseAllPixels ( bool  useAllPixels)

Select whether the metric will be computed using all the pixels on the fixed image region, or only using a set of randomly selected pixels. This value override IntensityThreshold, Masks, and SequentialSampling.

Referenced by itk::ImageToImageMetric< TFixedImage, TMovingImage >::UseAllPixelsOff(), and itk::ImageToImageMetric< TFixedImage, TMovingImage >::UseAllPixelsOn().

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetUseCachingOfBSplineWeights ( bool  _arg)
virtual

This boolean flag is only relevant when this metric is used along with a BSplineBaseTransform. The flag enables/disables the caching of values computed when a physical point is mapped through the BSplineBaseTransform. In particular it will cache the values of the BSpline weights for that points, and the indexes indicating what BSpline-grid nodes are relevant for that specific point. This caching is made optional due to the fact that the memory arrays used for the caching can reach large sizes even for moderate image size problems. For example, for a 3D image of 256^3, using 20% of pixels, these arrays will take about 1 Gigabyte of RAM for storage. The ratio of computing time between using the cache or not using the cache can reach 1:5, meaning that using the caching can provide a five times speed up. It is therefore, interesting to enable the caching, if enough memory is available for it. The caching is enabled by default, in order to preserve backward compatibility with previous versions of ITK.

template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetUseFixedImageIndexes ( bool  useIndex)
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetUseFixedImageSamplesIntensityThreshold ( bool  useThresh)
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SetUseSequentialSampling ( bool  sequentialSampling)

If set to true, then every pixel in the fixed image will be scanned to determine if it should be used in registration metric computation. A pixel will be chosen if it meets any mask or threshold limits set. If set to false, then UseAllPixels will be set to false.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::SynchronizeTransforms ( ) const
protectedvirtual

Synchronizes the threader transforms with the transform member variable.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformPoint ( unsigned int  sampleNumber,
MovingImagePointType mappedPoint,
bool &  sampleWithinSupportRegion,
double &  movingImageValue,
ThreadIdType  threadId 
) const
protectedvirtual

Transform a point from FixedImage domain to MovingImage domain. This function also checks if mapped point is within support region.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformPointWithDerivatives ( unsigned int  sampleNumber,
MovingImagePointType mappedPoint,
bool &  sampleWithinSupportRegion,
double &  movingImageValue,
ImageDerivativesType gradient,
ThreadIdType  threadId 
) const
protectedvirtual
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::UseAllPixelsOff ( void  )
inline
template<typename TFixedImage , typename TMovingImage >
void itk::ImageToImageMetric< TFixedImage, TMovingImage >::UseAllPixelsOn ( void  )
inline
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::UseCachingOfBSplineWeightsOff ( )
virtual

This boolean flag is only relevant when this metric is used along with a BSplineBaseTransform. The flag enables/disables the caching of values computed when a physical point is mapped through the BSplineBaseTransform. In particular it will cache the values of the BSpline weights for that points, and the indexes indicating what BSpline-grid nodes are relevant for that specific point. This caching is made optional due to the fact that the memory arrays used for the caching can reach large sizes even for moderate image size problems. For example, for a 3D image of 256^3, using 20% of pixels, these arrays will take about 1 Gigabyte of RAM for storage. The ratio of computing time between using the cache or not using the cache can reach 1:5, meaning that using the caching can provide a five times speed up. It is therefore, interesting to enable the caching, if enough memory is available for it. The caching is enabled by default, in order to preserve backward compatibility with previous versions of ITK.

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::UseCachingOfBSplineWeightsOn ( )
virtual

This boolean flag is only relevant when this metric is used along with a BSplineBaseTransform. The flag enables/disables the caching of values computed when a physical point is mapped through the BSplineBaseTransform. In particular it will cache the values of the BSpline weights for that points, and the indexes indicating what BSpline-grid nodes are relevant for that specific point. This caching is made optional due to the fact that the memory arrays used for the caching can reach large sizes even for moderate image size problems. For example, for a 3D image of 256^3, using 20% of pixels, these arrays will take about 1 Gigabyte of RAM for storage. The ratio of computing time between using the cache or not using the cache can reach 1:5, meaning that using the caching can provide a five times speed up. It is therefore, interesting to enable the caching, if enough memory is available for it. The caching is enabled by default, in order to preserve backward compatibility with previous versions of ITK.

Member Data Documentation

template<typename TFixedImage , typename TMovingImage >
const unsigned int itk::ImageToImageMetric< TFixedImage, TMovingImage >::DeformationSplineOrder = 3
staticprotected

Definition at line 427 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
const unsigned int itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageDimension = TFixedImage::ImageDimension
static

Constants for the image dimensions

Definition at line 84 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineInterpolatorType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_BSplineInterpolator
protected

Pointer to BSplineInterpolator.

Definition at line 499 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineParametersOffsetType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_BSplineParametersOffset
protected

Definition at line 467 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
MovingImagePointArrayType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_BSplinePreTransformPointsArray
protected

Definition at line 464 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineTransformType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_BSplineTransform
protected

Definition at line 460 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineTransformIndexArrayType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_BSplineTransformIndices
mutableprotected

Definition at line 473 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineTransformIndicesArrayType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_BSplineTransformIndicesArray
protected

Definition at line 463 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineTransformWeightsType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_BSplineTransformWeights
mutableprotected

Definition at line 472 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineTransformWeightsArrayType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_BSplineTransformWeightsArray
protected

Definition at line 462 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_ComputeGradient
protected

Definition at line 399 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
DerivativeFunctionType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_DerivativeCalculator
protected

Pointer to central difference calculator.

Definition at line 502 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
FixedImageConstPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImage
protected

Definition at line 387 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
FixedImageIndexContainer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageIndexes
protected

Definition at line 359 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
FixedImageMaskConstPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageMask
protected

Definition at line 402 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
FixedImageRegionType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageRegion
private

Definition at line 591 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
FixedImageSampleContainer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageSamples
protected

Container to store a set of points and fixed image values.

Definition at line 377 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
FixedImagePixelType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageSamplesIntensityThreshold
protected

Definition at line 362 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
GradientImagePointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_GradientImage
protected

Definition at line 400 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
InterpolatorPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_Interpolator
protected

Definition at line 397 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_InterpolatorIsBSpline
protected

Boolean to indicate if the interpolator BSpline.

Definition at line 496 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
MovingImageConstPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_MovingImage
protected

Definition at line 388 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
MovingImageMaskConstPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_MovingImageMask
protected

Definition at line 403 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
SizeValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfFixedImageSamples
protected

Definition at line 381 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
SizeValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfParameters
protected

Definition at line 379 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
SizeValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfPixelsCounted
mutableprotected

Definition at line 385 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
ThreadIdType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfThreads
protected

Definition at line 405 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
SizeValueType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_NumBSplineWeights
protected

The number of BSpline transform weights is the number of of parameter in the support region (per dimension ).

Definition at line 425 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
int itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_RandomSeed
protected

Definition at line 412 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_ReseedIterator
protected

Definition at line 410 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
MultiThreaderType::Pointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_Threader
protected

Definition at line 517 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineTransformIndexArrayType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_ThreaderBSplineTransformIndices
mutableprotected

Definition at line 476 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BSplineTransformWeightsType* itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_ThreaderBSplineTransformWeights
mutableprotected

Definition at line 475 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
unsigned int* itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_ThreaderNumberOfMovingImageSamples
mutableprotected

Definition at line 519 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
MultiThreaderParameterType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_ThreaderParameter
protected

Definition at line 518 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
TransformPointer* itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_ThreaderTransform
protected

Copies of Transform helpers per thread (N-1 of them, since m_Transform will do the work for thread=0.

Definition at line 395 of file itkImageToImageMetric.h.

Referenced by itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetThreaderTransform().

template<typename TFixedImage , typename TMovingImage >
TransformPointer itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_Transform
protected

Main transform to be used in thread = 0

Definition at line 391 of file itkImageToImageMetric.h.

Referenced by itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfParameters().

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_TransformIsBSpline
protected

Types and variables related to BSpline deformable transforms. If the transform is of type third order BSplineBaseTransform, then we can speed up the metric derivative calculation by only inspecting the parameters within the support region of a mapped point. Boolean to indicate if the transform is BSpline deformable.

Definition at line 421 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_UseAllPixels
protected

Definition at line 407 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_UseCachingOfBSplineWeights
protected

Definition at line 471 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_UseFixedImageIndexes
protected

Definition at line 358 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_UseFixedImageSamplesIntensityThreshold
protected

Definition at line 361 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_UseSequentialSampling
protected

Definition at line 408 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
BooleanArrayType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_WithinBSplineSupportRegionArray
protected

Definition at line 465 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_WithinThreadPostProcess
protected

Definition at line 521 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_WithinThreadPreProcess
protected

Definition at line 520 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
const unsigned int itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageDimension = TMovingImage::ImageDimension
static

Constants for the image dimensions

Definition at line 81 of file itkImageToImageMetric.h.


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