ITK  5.0.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | 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  ConstantPointerWrapper
 
class  FixedImageSamplePoint
 
class  MultiThreaderWorkUnitInfoImageToImageMetricWrapper
 

Public Types

using ConstPointer = SmartPointer< const Self >
 
using CoordinateRepresentationType = typename Superclass::ParametersValueType
 
using DerivativeType = typename Superclass::DerivativeType
 
using FixedImageConstPointer = typename FixedImageType::ConstPointer
 
using FixedImageIndexContainer = std::vector< FixedImageIndexType >
 
using FixedImageIndexType = typename FixedImageType::IndexType
 
using FixedImageIndexValueType = typename FixedImageIndexType::IndexValueType
 
using FixedImageMaskConstPointer = typename FixedImageMaskType::ConstPointer
 
using FixedImageMaskPointer = typename FixedImageMaskType::Pointer
 
using FixedImageMaskType = SpatialObject< Self::FixedImageDimension >
 
using FixedImagePixelType = typename TFixedImage::PixelType
 
using FixedImagePointType = typename TransformType::InputPointType
 
using FixedImageRegionType = typename FixedImageType::RegionType
 
using FixedImageType = TFixedImage
 
using GradientImageFilterPointer = typename GradientImageFilterType::Pointer
 
using GradientImageFilterType = GradientRecursiveGaussianImageFilter< MovingImageType, GradientImageType >
 
using GradientImagePointer = SmartPointer< GradientImageType >
 
using GradientImageType = Image< GradientPixelType, Self::MovingImageDimension >
 
using GradientPixelType = CovariantVector< RealType, Self::MovingImageDimension >
 
using InputPointType = typename TransformType::InputPointType
 
using InterpolatorPointer = typename InterpolatorType::Pointer
 
using InterpolatorType = InterpolateImageFunction< MovingImageType, CoordinateRepresentationType >
 
using MeasureType = typename Superclass::MeasureType
 
using MovingImageConstPointer = typename MovingImageType::ConstPointer
 
using MovingImageIndexType = typename MovingImageType::IndexType
 
using MovingImageMaskConstPointer = typename MovingImageMaskType::ConstPointer
 
using MovingImageMaskPointer = typename MovingImageMaskType::Pointer
 
using MovingImageMaskType = SpatialObject< Self::MovingImageDimension >
 
using MovingImagePixelType = typename TMovingImage::PixelType
 
using MovingImagePointType = typename TransformType::OutputPointType
 
using MovingImageType = TMovingImage
 
using MultiThreaderType = MultiThreaderBase
 
using OutputPointType = typename TransformType::OutputPointType
 
using ParametersType = typename Superclass::ParametersType
 
using Pointer = SmartPointer< Self >
 
using RealType = typename NumericTraits< MovingImagePixelType >::RealType
 
using Self = ImageToImageMetric
 
using Superclass = SingleValuedCostFunction
 
using TransformJacobianType = typename TransformType::JacobianType
 
using TransformParametersType = typename TransformType::ParametersType
 
using TransformPointer = typename TransformType::Pointer
 
using TransformType = Transform< CoordinateRepresentationType, Self::MovingImageDimension, Self::FixedImageDimension >
 
- Public Types inherited from itk::SingleValuedCostFunction
using ConstPointer = SmartPointer< const Self >
 
using DerivativeType = Array< ParametersValueType >
 
using MeasureType = double
 
using ParametersType = Superclass::ParametersType
 
using ParametersValueType = Superclass::ParametersValueType
 
using Pointer = SmartPointer< Self >
 
using Self = SingleValuedCostFunction
 
using Superclass = CostFunction
 
- Public Types inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
using ConstPointer = SmartPointer< const Self >
 
using ParametersType = OptimizerParameters< TInternalComputationValueType >
 
using ParametersValueType = TInternalComputationValueType
 
using Pointer = SmartPointer< Self >
 
using Self = CostFunctionTemplate
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

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 ()
 
unsigned int GetNumberOfParameters () const override
 
virtual const SizeValueTypeGetNumberOfPixelsCounted () const
 
SizeValueType GetNumberOfSpatialSamples ()
 
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 ()
 
virtual void MultiThreadingInitialize ()
 
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 UseAllPixelsOn ()
 
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 SetNumberOfWorkUnits (ThreadIdType numberOfThreads)
 
virtual const ThreadIdTypeGetNumberOfWorkUnits () 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
 
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
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexceptoverride
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
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 constexpr unsigned int FixedImageDimension = TFixedImage::ImageDimension
 
static constexpr unsigned int MovingImageDimension = TMovingImage::ImageDimension
 

Protected Types

using BooleanArrayType = std::vector< bool >
 
using BSplineInterpolatorType = BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >
 
using BSplineParametersOffsetType = FixedArray< SizeValueType, FixedImageType::ImageDimension >
 
using BSplineTransformIndexArrayType = typename BSplineTransformType::ParameterIndexArrayType
 
using BSplineTransformIndicesArrayType = Array2D< IndexValueType >
 
using BSplineTransformType = BSplineBaseTransform< CoordinateRepresentationType, FixedImageType::ImageDimension, Self::DeformationSplineOrder >
 
using BSplineTransformWeightsArrayType = Array2D< WeightsValueType >
 
using BSplineTransformWeightsType = typename BSplineTransformType::WeightsType
 
using DerivativeFunctionType = CentralDifferenceImageFunction< MovingImageType, CoordinateRepresentationType >
 
using FixedImageSampleContainer = std::vector< FixedImageSamplePoint >
 
using ImageDerivativesType = CovariantVector< double, Self::MovingImageDimension >
 
using IndexValueType = typename BSplineTransformIndexArrayType::ValueType
 
using MovingImagePointArrayType = std::vector< MovingImagePointType >
 
using WeightsValueType = typename BSplineTransformWeightsType::ValueType
 

Protected Member Functions

virtual void ComputeImageDerivatives (const MovingImagePointType &mappedPoint, ImageDerivativesType &gradient, ThreadIdType threadId) const
 
void GetValueAndDerivativeMultiThreadedInitiate () const
 
void GetValueAndDerivativeMultiThreadedPostProcessInitiate () 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
 
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 ()
 
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
 
 ~ImageToImageMetric () override
 
- Protected Member Functions inherited from itk::SingleValuedCostFunction
 SingleValuedCostFunction ()=default
 
 ~SingleValuedCostFunction () override
 
- Protected Member Functions inherited from itk::CostFunctionTemplate< TInternalComputationValueType >
 CostFunctionTemplate ()=default
 
 ~CostFunctionTemplate () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
 ~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 ()
 

Static Protected Member Functions

static
ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION 
GetValueAndDerivativeMultiThreaded (void *arg)
 
static
ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION 
GetValueAndDerivativeMultiThreadedPostProcess (void *arg)
 
static
ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION 
GetValueMultiThreaded (void *arg)
 
static
ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION 
GetValueMultiThreadedPostProcess (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 {true}
 
ConstantPointerWrapperm_ConstSelfWrapper
 
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 {false}
 
MovingImageConstPointer m_MovingImage
 
MovingImageMaskConstPointer m_MovingImageMask
 
SizeValueType m_NumberOfFixedImageSamples {50000}
 
SizeValueType m_NumberOfParameters {0}
 
SizeValueType m_NumberOfPixelsCounted {0}
 
ThreadIdType m_NumberOfWorkUnits {1}
 
SizeValueType m_NumBSplineWeights {0}
 
int m_RandomSeed
 
bool m_ReseedIterator {false}
 
MultiThreaderType::Pointer m_Threader
 
BSplineTransformIndexArrayTypem_ThreaderBSplineTransformIndices
 
BSplineTransformWeightsTypem_ThreaderBSplineTransformWeights
 
unsigned int * m_ThreaderNumberOfMovingImageSamples {nullptr}
 
TransformPointerm_ThreaderTransform
 
TransformPointer m_Transform
 
bool m_TransformIsBSpline {false}
 
bool m_UseAllPixels {false}
 
bool m_UseCachingOfBSplineWeights {true}
 
bool m_UseFixedImageIndexes {false}
 
bool m_UseFixedImageSamplesIntensityThreshold {false}
 
bool m_UseSequentialSampling {false}
 
BooleanArrayType m_WithinBSplineSupportRegionArray
 
bool m_WithinThreadPostProcess {false}
 
bool m_WithinThreadPreProcess {false}
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Static Protected Attributes

static constexpr unsigned int DeformationSplineOrder = 3
 

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

Definition at line 436 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineInterpolatorType = BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >
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 444 of file itkImageToImageMetric.h.

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

Definition at line 437 of file itkImageToImageMetric.h.

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

Definition at line 431 of file itkImageToImageMetric.h.

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

Definition at line 433 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::BSplineTransformType = BSplineBaseTransform< CoordinateRepresentationType, FixedImageType ::ImageDimension, Self::DeformationSplineOrder >
protected

Definition at line 425 of file itkImageToImageMetric.h.

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

Definition at line 429 of file itkImageToImageMetric.h.

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

Definition at line 427 of file itkImageToImageMetric.h.

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

Definition at line 61 of file itkImageToImageMetric.h.

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

Type used for representing point components

Definition at line 64 of file itkImageToImageMetric.h.

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

Typedefs for using central difference calculator.

Definition at line 448 of file itkImageToImageMetric.h.

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

Type of the derivative.

Definition at line 133 of file itkImageToImageMetric.h.

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

Definition at line 77 of file itkImageToImageMetric.h.

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

Definition at line 102 of file itkImageToImageMetric.h.

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

Index and Point type alias support

Definition at line 96 of file itkImageToImageMetric.h.

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

Definition at line 97 of file itkImageToImageMetric.h.

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

Definition at line 121 of file itkImageToImageMetric.h.

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

Definition at line 120 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageMaskType = SpatialObject< Self::FixedImageDimension >

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 119 of file itkImageToImageMetric.h.

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

Definition at line 76 of file itkImageToImageMetric.h.

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

Definition at line 99 of file itkImageToImageMetric.h.

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

Definition at line 78 of file itkImageToImageMetric.h.

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

FixedImageSamplePoint type alias support

Definition at line 359 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::FixedImageType = TFixedImage

Type of the fixed Image.

Definition at line 75 of file itkImageToImageMetric.h.

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

Definition at line 113 of file itkImageToImageMetric.h.

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

Definition at line 112 of file itkImageToImageMetric.h.

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

Definition at line 111 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientImageType = Image< GradientPixelType, Self::MovingImageDimension >

Definition at line 110 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::GradientPixelType = CovariantVector< RealType, Self::MovingImageDimension >

Definition at line 109 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::ImageDerivativesType = CovariantVector< double, Self::MovingImageDimension >
protected

Definition at line 450 of file itkImageToImageMetric.h.

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

Definition at line 432 of file itkImageToImageMetric.h.

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

Definition at line 90 of file itkImageToImageMetric.h.

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

Definition at line 115 of file itkImageToImageMetric.h.

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

Type of the Interpolator Base class

Definition at line 105 of file itkImageToImageMetric.h.

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

Type of the measure.

Definition at line 130 of file itkImageToImageMetric.h.

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

Definition at line 72 of file itkImageToImageMetric.h.

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

Definition at line 98 of file itkImageToImageMetric.h.

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

Definition at line 127 of file itkImageToImageMetric.h.

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

Definition at line 126 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageMaskType = SpatialObject< Self::MovingImageDimension >

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 125 of file itkImageToImageMetric.h.

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

Definition at line 71 of file itkImageToImageMetric.h.

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

Definition at line 435 of file itkImageToImageMetric.h.

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

Definition at line 100 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::MovingImageType = TMovingImage

Type of the moving Image.

Definition at line 70 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::MultiThreaderType = MultiThreaderBase

Definition at line 314 of file itkImageToImageMetric.h.

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

Definition at line 91 of file itkImageToImageMetric.h.

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

Type of the parameters.

Definition at line 136 of file itkImageToImageMetric.h.

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

Definition at line 60 of file itkImageToImageMetric.h.

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

Gaussian filter to compute the gradient of the Moving Image

Definition at line 108 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::Self = ImageToImageMetric

Standard class type aliases.

Definition at line 58 of file itkImageToImageMetric.h.

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

Definition at line 59 of file itkImageToImageMetric.h.

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

Definition at line 93 of file itkImageToImageMetric.h.

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

Definition at line 92 of file itkImageToImageMetric.h.

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

Definition at line 89 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
using itk::ImageToImageMetric< TFixedImage, TMovingImage >::TransformType = Transform< CoordinateRepresentationType, Self::MovingImageDimension, Self::FixedImageDimension >

Type of the Transform Base class

Definition at line 87 of file itkImageToImageMetric.h.

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

Definition at line 428 of file itkImageToImageMetric.h.

Constructor & Destructor Documentation

template<typename TFixedImage , typename TMovingImage >
itk::ImageToImageMetric< TFixedImage, TMovingImage >::ImageToImageMetric ( )
protected
template<typename TFixedImage , typename TMovingImage >
itk::ImageToImageMetric< TFixedImage, TMovingImage >::~ImageToImageMetric ( )
overrideprotected

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.

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

Get the number of pixels considered in the computation.

Definition at line 161 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
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 ( )
inline

Definition at line 240 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
virtual const ThreadIdType& itk::ImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfWorkUnits ( ) const
virtual

Set/Get number of work units 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

Get the Threader.

Definition at line 317 of file itkImageToImageMetric.h.

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_FUNCTION_CALL_CONVENTION 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_FUNCTION_CALL_CONVENTION 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 >
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_FUNCTION_CALL_CONVENTION 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_FUNCTION_CALL_CONVENTION 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 >
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 ( )
virtual
template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::MultiThreadingInitialize ( )
virtual

Initialize the components related to supporting multiple threads

template<typename TFixedImage , typename TMovingImage >
virtual void itk::ImageToImageMetric< TFixedImage, TMovingImage >::PreComputeTransformValues ( )
protectedvirtual
template<typename TFixedImage , typename TMovingImage >
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.

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 235 of file itkImageToImageMetric.h.

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

Set/Get number of work units 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.

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 ( )
inline

Definition at line 265 of file itkImageToImageMetric.h.

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

Definition at line 260 of file itkImageToImageMetric.h.

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 >
constexpr unsigned int itk::ImageToImageMetric< TFixedImage, TMovingImage >::DeformationSplineOrder = 3
staticprotected

Definition at line 421 of file itkImageToImageMetric.h.

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

Definition at line 82 of file itkImageToImageMetric.h.

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

Pointer to BSplineInterpolator.

Definition at line 491 of file itkImageToImageMetric.h.

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

Definition at line 459 of file itkImageToImageMetric.h.

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

Definition at line 456 of file itkImageToImageMetric.h.

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

Definition at line 452 of file itkImageToImageMetric.h.

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

Definition at line 465 of file itkImageToImageMetric.h.

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

Definition at line 455 of file itkImageToImageMetric.h.

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

Definition at line 464 of file itkImageToImageMetric.h.

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

Definition at line 454 of file itkImageToImageMetric.h.

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

Definition at line 393 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
ConstantPointerWrapper* itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_ConstSelfWrapper
protected

Definition at line 549 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 494 of file itkImageToImageMetric.h.

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

Definition at line 381 of file itkImageToImageMetric.h.

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

Definition at line 353 of file itkImageToImageMetric.h.

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

Definition at line 396 of file itkImageToImageMetric.h.

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

Definition at line 611 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 371 of file itkImageToImageMetric.h.

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

Definition at line 356 of file itkImageToImageMetric.h.

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

Definition at line 394 of file itkImageToImageMetric.h.

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

Definition at line 391 of file itkImageToImageMetric.h.

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

Boolean to indicate if the interpolator BSpline.

Definition at line 488 of file itkImageToImageMetric.h.

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

Definition at line 382 of file itkImageToImageMetric.h.

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

Definition at line 397 of file itkImageToImageMetric.h.

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

Definition at line 375 of file itkImageToImageMetric.h.

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

Definition at line 373 of file itkImageToImageMetric.h.

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

Definition at line 379 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
ThreadIdType itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfWorkUnits {1}
protected

Definition at line 399 of file itkImageToImageMetric.h.

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

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

Definition at line 419 of file itkImageToImageMetric.h.

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

Definition at line 406 of file itkImageToImageMetric.h.

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

Definition at line 404 of file itkImageToImageMetric.h.

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

Definition at line 548 of file itkImageToImageMetric.h.

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

Definition at line 468 of file itkImageToImageMetric.h.

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

Definition at line 467 of file itkImageToImageMetric.h.

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

Definition at line 550 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 389 of file itkImageToImageMetric.h.

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

Main transform to be used in thread = 0

Definition at line 385 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
bool itk::ImageToImageMetric< TFixedImage, TMovingImage >::m_TransformIsBSpline {false}
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 415 of file itkImageToImageMetric.h.

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

Definition at line 401 of file itkImageToImageMetric.h.

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

Definition at line 463 of file itkImageToImageMetric.h.

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

Definition at line 352 of file itkImageToImageMetric.h.

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

Definition at line 355 of file itkImageToImageMetric.h.

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

Definition at line 402 of file itkImageToImageMetric.h.

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

Definition at line 457 of file itkImageToImageMetric.h.

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

Definition at line 552 of file itkImageToImageMetric.h.

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

Definition at line 551 of file itkImageToImageMetric.h.

template<typename TFixedImage , typename TMovingImage >
constexpr 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: