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

#include <itkImageToImageMetricv4.h>

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

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef
Superclass::CoordinateRepresentationType 
CoordinateRepresentationType
typedef
GradientRecursiveGaussianImageFilter
< FixedImageType,
FixedImageGradientImageType
DefaultFixedImageGradientFilter
typedef
GradientRecursiveGaussianImageFilter
< MovingImageType,
MovingImageGradientImageType
DefaultMovingImageGradientFilter
typedef Superclass::DerivativeType DerivativeType
typedef DerivativeType::ValueType DerivativeValueType
typedef Superclass::DimensionType DimensionType
typedef
FixedImageType::ConstPointer 
FixedImageConstPointer
typedef
FixedImageGradientCalculatorType::Pointer 
FixedImageGradientCalculatorPointer
typedef
FixedImageGradientFilterType::Pointer 
FixedImageGradientFilterPointer
typedef ImageToImageFilter
< FixedImageType,
FixedImageGradientImageType
FixedImageGradientFilterType
typedef FixedImageType::IndexType FixedImageIndexType
typedef
FixedImageMaskType::ConstPointer 
FixedImageMaskConstPointer
typedef FixedImageMaskType::Pointer FixedImageMaskPointer
typedef SpatialObject
< itkGetStaticConstMacro(FixedImageDimension) > 
FixedImageMaskType
typedef FixedImageType::PixelType FixedImagePixelType
typedef FixedImageType::Pointer FixedImagePointer
typedef FixedImageType::PointType FixedImagePointType
typedef TFixedImage FixedImageType
typedef
Superclass::FixedInputPointType 
FixedInputPointType
typedef
FixedInterpolatorType::Pointer 
FixedInterpolatorPointer
typedef
InterpolateImageFunction
< FixedImageType,
CoordinateRepresentationType
FixedInterpolatorType
typedef
Superclass::FixedOutputPointType 
FixedOutputPointType
typedef FixedImagePixelType FixedPixelType
typedef
FixedSampledPointSetType::ConstPointer 
FixedSampledPointSetConstPointer
typedef
FixedSampledPointSetType::Pointer 
FixedSampledPointSetPointer
typedef PointSet< typename
FixedImageType::PixelType,
itkGetStaticConstMacro(FixedImageDimension)> 
FixedSampledPointSetType
typedef
Superclass::FixedTransformJacobianType 
FixedTransformJacobianType
typedef
Superclass::FixedTransformParametersType 
FixedTransformParametersType
typedef
Superclass::FixedTransformPointer 
FixedTransformPointer
typedef
Superclass::FixedTransformType 
FixedTransformType
typedef
Superclass::GradientSourceType 
GradientSourceType
typedef Superclass::DimensionType ImageDimensionType
typedef
Superclass::InternalComputationValueType 
InternalComputationValueType
typedef Superclass::JacobianType JacobianType
typedef Superclass::MeasureType MeasureType
typedef CovariantVector
< MovingRealType,
itkGetStaticConstMacro(MovingImageDimension) > 
MovingGradientPixelType
typedef
MovingImageType::ConstPointer 
MovingImageConstPointer
typedef
MovingImageGradientCalculatorType::Pointer 
MovingImageGradientCalculatorPointer
typedef
MovingImageGradientFilterType::Pointer 
MovingImageGradientFilterPointer
typedef ImageToImageFilter
< MovingImageType,
MovingImageGradientImageType
MovingImageGradientFilterType
typedef
MovingImageGradientImageType::Pointer 
MovingImageGradientImagePointer
typedef Image
< MovingGradientPixelType,
itkGetStaticConstMacro(MovingImageDimension) > 
MovingImageGradientImageType
typedef MovingImageType::IndexType MovingImageIndexType
typedef
MovingImageMaskType::ConstPointer 
MovingImageMaskConstPointer
typedef
MovingImageMaskType::Pointer 
MovingImageMaskPointer
typedef SpatialObject
< itkGetStaticConstMacro(MovingImageDimension) > 
MovingImageMaskType
typedef MovingImageType::PixelType MovingImagePixelType
typedef MovingImageType::Pointer MovingImagePointer
typedef MovingImageType::PointType MovingImagePointType
typedef MovingImageType::RegionType MovingImageRegionType
typedef TMovingImage MovingImageType
typedef
Superclass::MovingInputPointType 
MovingInputPointType
typedef
MovingInterpolatorType::Pointer 
MovingInterpolatorPointer
typedef
InterpolateImageFunction
< MovingImageType,
CoordinateRepresentationType
MovingInterpolatorType
typedef
Superclass::MovingOutputPointType 
MovingOutputPointType
typedef MovingImagePixelType MovingPixelType
typedef NumericTraits
< MovingImagePixelType >
::RealType 
MovingRealType
typedef
Superclass::MovingTransformJacobianType 
MovingTransformJacobianType
typedef
Superclass::MovingTransformParametersType 
MovingTransformParametersType
typedef
Superclass::MovingTransformPointer 
MovingTransformPointer
typedef
Superclass::MovingTransformType 
MovingTransformType
typedef
Superclass::NumberOfParametersType 
NumberOfParametersType
typedef Superclass::ParametersType ParametersType
typedef
Superclass::ParametersValueType 
ParametersValueType
typedef SmartPointer< SelfPointer
typedef ImageToImageMetricv4 Self
typedef ObjectToObjectMetric
< TFixedImage::ImageDimension,
TMovingImage::ImageDimension,
TVirtualImage > 
Superclass
typedef
Superclass::VirtualDirectionType 
VirtualDirectionType
typedef CovariantVector
< CoordinateRepresentationType,
itkGetStaticConstMacro(VirtualImageDimension) > 
VirtualImageGradientType
typedef
Superclass::VirtualImagePointer 
VirtualImagePointer
typedef
Superclass::VirtualImageType 
VirtualImageType
typedef
Superclass::VirtualIndexType 
VirtualIndexType
typedef
Superclass::VirtualPointType 
VirtualOriginType
typedef
Superclass::VirtualPixelType 
VirtualPixelType
typedef
Superclass::VirtualPointSetPointer 
VirtualPointSetPointer
typedef
Superclass::VirtualPointSetType 
VirtualPointSetType
typedef
Superclass::VirtualPointType 
VirtualPointType
typedef Superclass::VirtualSizeType VirtualRadiusType
typedef
Superclass::VirtualRegionType 
VirtualRegionType
typedef Superclass::VirtualSizeType VirtualSizeType
typedef
Superclass::VirtualSpacingType 
VirtualSpacingType
typedef CovariantVector
< CoordinateRepresentationType,
itkGetStaticConstMacro(FixedImageDimension) > 
FixedImageGradientType
typedef CovariantVector
< CoordinateRepresentationType,
itkGetStaticConstMacro(MovingImageDimension) > 
MovingImageGradientType
typedef NumericTraits
< FixedImagePixelType >
::RealType 
FixedRealType
typedef CovariantVector
< FixedRealType,
itkGetStaticConstMacro(FixedImageDimension) > 
FixedGradientPixelType
typedef Image
< FixedGradientPixelType,
itkGetStaticConstMacro(FixedImageDimension) > 
FixedImageGradientImageType
typedef
FixedImageGradientImageType::Pointer 
FixedImageGradientImagePointer
typedef ImageFunction
< FixedImageType,
CovariantVector< double,
itkGetStaticConstMacro(FixedImageDimension)>
, CoordinateRepresentationType
FixedImageGradientCalculatorType
typedef ImageFunction
< MovingImageType,
CovariantVector< double,
itkGetStaticConstMacro(MovingImageDimension)>
, CoordinateRepresentationType
MovingImageGradientCalculatorType
- Public Types inherited from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >
typedef
DisplacementFieldTransform
< CoordinateRepresentationType,
itkGetStaticConstMacro(MovingDimension) > 
MovingDisplacementFieldTransformType
typedef
VirtualImageType::ConstPointer 
VirtualImageConstPointer
- Public Types inherited from itk::ObjectToObjectMetricBase
- Public Types inherited from itk::SingleValuedCostFunctionv4
- Public Types inherited from itk::CostFunction
- Public Types inherited from itk::Object
- Public Types inherited from itk::LightObject

Public Member Functions

virtual void GetDerivative (DerivativeType &) const
virtual const FixedImageTypeGetFixedImage ()
virtual const
FixedImageGradientImageType
GetFixedImageGradientImage ()
virtual const
FixedInterpolatorType
GetFixedInterpolator ()
virtual const MovingImageTypeGetMovingImage ()
virtual const
MovingImageGradientImageType
GetMovingImageGradientImage ()
virtual const
MovingInterpolatorType
GetMovingInterpolator ()
virtual const char * GetNameOfClass () const
SizeValueType GetNumberOfDomainPoints () const
virtual const SizeValueTypeGetNumberOfSkippedFixedSampledPoints ()
virtual ThreadIdType GetNumberOfThreadsUsed () const
virtual SizeValueType GetNumberOfValidPoints () const
virtual MeasureType GetValue () const
virtual void GetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const
virtual const VirtualPointSetTypeGetVirtualSampledPointSet ()
virtual void Initialize (void) throw ( itk::ExceptionObject )
virtual void SetFixedImage (const FixedImageType *_arg)
virtual void SetFixedInterpolator (FixedInterpolatorType *_arg)
virtual void SetMovingImage (const MovingImageType *_arg)
virtual void SetMovingInterpolator (MovingInterpolatorType *_arg)
virtual bool SupportsArbitraryVirtualDomainSamples (void) const
virtual void SetMovingImageMask (MovingImageMaskType *_arg)
virtual void SetMovingImageMask (const MovingImageMaskType *_arg)
virtual const MovingImageMaskTypeGetMovingImageMask ()
virtual void SetFixedImageMask (FixedImageMaskType *_arg)
virtual void SetFixedImageMask (const FixedImageMaskType *_arg)
virtual const FixedImageMaskTypeGetFixedImageMask ()
virtual void SetFixedSampledPointSet (FixedSampledPointSetType *_arg)
virtual void SetFixedSampledPointSet (const FixedSampledPointSetType *_arg)
virtual const
FixedSampledPointSetType
GetFixedSampledPointSet ()
virtual void SetUseFixedSampledPointSet (bool _arg)
virtual const bool & GetUseFixedSampledPointSet ()
virtual void UseFixedSampledPointSetOn ()
virtual void UseFixedSampledPointSetOff ()
virtual void SetFixedImageGradientFilter (FixedImageGradientFilterType *_arg)
virtual
FixedImageGradientFilterType
GetFixedImageGradientFilter ()
virtual void SetMovingImageGradientFilter (MovingImageGradientFilterType *_arg)
virtual
MovingImageGradientFilterType
GetMovingImageGradientFilter ()
virtual void SetFixedImageGradientCalculator (FixedImageGradientCalculatorType *_arg)
virtual
FixedImageGradientCalculatorType
GetFixedImageGradientCalculator ()
virtual void SetMovingImageGradientCalculator (MovingImageGradientCalculatorType *_arg)
virtual
MovingImageGradientCalculatorType
GetMovingImageGradientCalculator ()
virtual void SetUseFixedImageGradientFilter (bool _arg)
virtual const bool & GetUseFixedImageGradientFilter ()
virtual void UseFixedImageGradientFilterOn ()
virtual void UseFixedImageGradientFilterOff ()
virtual void SetUseMovingImageGradientFilter (bool _arg)
virtual const bool & GetUseMovingImageGradientFilter ()
virtual void UseMovingImageGradientFilterOn ()
virtual void UseMovingImageGradientFilterOff ()
virtual void SetMaximumNumberOfThreads (const ThreadIdType threads)
virtual ThreadIdType GetMaximumNumberOfThreads () const
virtual void SetUseFloatingPointCorrection (bool _arg)
virtual const bool & GetUseFloatingPointCorrection ()
virtual void UseFloatingPointCorrectionOn ()
virtual void UseFloatingPointCorrectionOff ()
virtual void SetFloatingPointCorrectionResolution (DerivativeValueType _arg)
virtual DerivativeValueType GetFloatingPointCorrectionResolution () const
- Public Member Functions inherited from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >
OffsetValueType ComputeParameterOffsetFromVirtualIndex (const VirtualIndexType &index, const NumberOfParametersType &numberOfLocalParameters) const
OffsetValueType ComputeParameterOffsetFromVirtualPoint (const VirtualPointType &point, const NumberOfParametersType &numberOfLocalParameters) const
virtual const FixedTransformTypeGetFixedTransform ()
virtual const MovingTransformTypeGetMovingTransform ()
virtual NumberOfParametersType GetNumberOfLocalParameters () const
virtual NumberOfParametersType GetNumberOfParameters () const
virtual const ParametersTypeGetParameters () const
const MovingTransformTypeGetTransform ()
VirtualDirectionType GetVirtualDirection (void) const
virtual const TimeStampGetVirtualDomainTimeStamp (void) const
virtual const VirtualImageTypeGetVirtualImage ()
VirtualOriginType GetVirtualOrigin (void) const
const VirtualRegionTypeGetVirtualRegion (void) const
VirtualSpacingType GetVirtualSpacing (void) const
virtual bool HasLocalSupport () const
virtual void SetFixedTransform (FixedTransformType *_arg)
virtual void SetMovingTransform (MovingTransformType *_arg)
virtual void SetParameters (ParametersType &params)
void SetTransform (MovingTransformType *transform)
void SetVirtualDomain (const VirtualSpacingType &spacing, const VirtualOriginType &origin, const VirtualDirectionType &direction, const VirtualRegionType &region)
virtual void UpdateTransformParameters (const DerivativeType &derivative, ParametersValueType factor)
void SetVirtualDomainFromImage (VirtualImageType *virtualImage)
void SetVirtualDomainFromImage (const VirtualImageType *virtualImage)
bool IsInsideVirtualDomain (const VirtualPointType &point) const
bool IsInsideVirtualDomain (const VirtualIndexType &index) const
- Public Member Functions inherited from itk::ObjectToObjectMetricBase
MeasureType GetCurrentValue () const
virtual GradientSourceType GetGradientSource () const
bool GetGradientSourceIncludesFixed () const
bool GetGradientSourceIncludesMoving () const
virtual void GetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const =0
virtual void SetGradientSource (GradientSourceType _arg)
- Public Member Functions inherited from itk::SingleValuedCostFunctionv4
virtual void GetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const =0

Static Public Attributes

static const DimensionType FixedImageDimension = Superclass::FixedDimension
static const DimensionType MovingImageDimension = Superclass::MovingDimension
static const DimensionType VirtualImageDimension = Superclass::VirtualDimension
- Static Public Attributes inherited from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >
static const DimensionType FixedDimension
static const DimensionType MovingDimension
static const DimensionType VirtualDimension

Protected Types

typedef
LinearInterpolateImageFunction
< FixedImageGradientImageType,
CoordinateRepresentationType
FixedImageGradientInterpolatorType
typedef
LinearInterpolateImageFunction
< MovingImageGradientImageType,
CoordinateRepresentationType
MovingImageGradientInterpolatorType

Protected Member Functions

virtual void ComputeFixedImageGradientAtIndex (const VirtualIndexType &index, FixedImageGradientType &gradient) const
virtual void ComputeFixedImageGradientAtPoint (const FixedImagePointType &mappedPoint, FixedImageGradientType &gradient) const
virtual void ComputeFixedImageGradientFilterImage ()
virtual void ComputeMovingImageGradientAtIndex (const VirtualIndexType &index, MovingImageGradientType &gradient) const
virtual void ComputeMovingImageGradientAtPoint (const MovingImagePointType &mappedPoint, MovingImageGradientType &gradient) const
virtual void ComputeMovingImageGradientFilterImage () const
virtual void GetValueAndDerivativeExecute () const
 ImageToImageMetricv4 ()
virtual void InitializeForIteration () const
void PrintSelf (std::ostream &os, Indent indent) const
bool TransformAndEvaluateFixedPoint (const VirtualIndexType &index, const VirtualPointType &point, const bool computeImageGradient, FixedImagePointType &mappedFixedPoint, FixedImagePixelType &mappedFixedPixelValue, FixedImageGradientType &mappedFixedImageGradient) const
bool TransformAndEvaluateMovingPoint (const VirtualIndexType &index, const VirtualPointType &point, const bool computeImageGradient, MovingImagePointType &mappedMovingPoint, MovingImagePixelType &mappedMovingPixelValue, MovingImageGradientType &mappedMovingImageGradient) const
virtual ~ImageToImageMetricv4 ()
virtual void InitializeDefaultFixedImageGradientFilter (void)
virtual void InitializeDefaultMovingImageGradientFilter (void)
- Protected Member Functions inherited from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >
MovingDisplacementFieldTransformTypeGetMovingDisplacementFieldTransform () const
 ObjectToObjectMetric ()
bool TransformPhysicalPointToVirtualIndex (const VirtualPointType &, VirtualIndexType &) const
void TransformVirtualIndexToPhysicalPoint (const VirtualIndexType &, VirtualPointType &) const
virtual void VerifyDisplacementFieldSizeAndPhysicalSpace ()
bool VerifyNumberOfValidPoints (MeasureType &value, DerivativeType &derivative) const
virtual ~ObjectToObjectMetric ()
- Protected Member Functions inherited from itk::ObjectToObjectMetricBase
 ObjectToObjectMetricBase ()
virtual ~ObjectToObjectMetricBase ()
- Protected Member Functions inherited from itk::SingleValuedCostFunctionv4
 SingleValuedCostFunctionv4 ()
virtual ~SingleValuedCostFunctionv4 ()
- Protected Member Functions inherited from itk::CostFunction
 CostFunction ()
virtual ~CostFunction ()
- Protected Member Functions inherited from itk::Object
 Object ()
bool PrintObservers (std::ostream &os, Indent indent) const
virtual void SetTimeStamp (const TimeStamp &time)
virtual ~Object ()
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 LightObject ()
virtual void PrintHeader (std::ostream &os, Indent indent) const
virtual void PrintTrailer (std::ostream &os, Indent indent) const
virtual ~LightObject ()

Protected Attributes

DefaultFixedImageGradientFilter::Pointer m_DefaultFixedImageGradientFilter
DefaultMovingImageGradientFilter::Pointer m_DefaultMovingImageGradientFilter
ImageToImageMetricv4GetValueAndDerivativeThreader
< ThreadedImageRegionPartitioner
< VirtualImageDimension >
, Self >::Pointer 
m_DenseGetValueAndDerivativeThreader
DerivativeTypem_DerivativeResult
FixedImageConstPointer m_FixedImage
FixedImageGradientCalculatorPointer m_FixedImageGradientCalculator
FixedImageGradientFilterPointer m_FixedImageGradientFilter
FixedImageGradientImagePointer m_FixedImageGradientImage
FixedImageGradientInterpolatorType::Pointer m_FixedImageGradientInterpolator
FixedImageMaskConstPointer m_FixedImageMask
FixedInterpolatorPointer m_FixedInterpolator
FixedSampledPointSetConstPointer m_FixedSampledPointSet
MovingImageConstPointer m_MovingImage
MovingImageGradientCalculatorPointer m_MovingImageGradientCalculator
MovingImageGradientFilterPointer m_MovingImageGradientFilter
MovingImageGradientImagePointer m_MovingImageGradientImage
MovingImageGradientInterpolatorType::Pointer m_MovingImageGradientInterpolator
MovingImageMaskConstPointer m_MovingImageMask
MovingInterpolatorPointer m_MovingInterpolator
ImageToImageMetricv4GetValueAndDerivativeThreader
< ThreadedIndexedContainerPartitioner,
Self >::Pointer 
m_SparseGetValueAndDerivativeThreader
bool m_UseFixedImageGradientFilter
bool m_UseFixedSampledPointSet
bool m_UseMovingImageGradientFilter
VirtualPointSetPointer m_VirtualSampledPointSet
- Protected Attributes inherited from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >
FixedTransformPointer m_FixedTransform
MovingTransformPointer m_MovingTransform
SizeValueType m_NumberOfValidPoints
bool m_UserHasSetVirtualDomain
VirtualImagePointer m_VirtualImage
- Protected Attributes inherited from itk::ObjectToObjectMetricBase
GradientSourceType m_GradientSource
MeasureType m_Value

Private Member Functions

 ImageToImageMetricv4 (const Self &)
void MapFixedSampledPointSetToVirtual (void)
void operator= (const Self &)

Private Attributes

DerivativeValueType m_FloatingPointCorrectionResolution
bool m_HaveMadeGetValueWarning
SizeValueType m_NumberOfSkippedFixedSampledPoints
bool m_UseFloatingPointCorrection

Friends

class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< VirtualImageDimension >, Self >
class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Self >
class ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedImageRegionPartitioner< VirtualImageDimension >, Self >
class ImageToImageMetricv4GetValueAndDerivativeThreaderBase< ThreadedIndexedContainerPartitioner, Self >
typedef PixelTraits
< FixedImagePixelType >
::ValueType 
FixedImagePixelValueType
typedef PixelTraits
< MovingImagePixelType >
::ValueType 
MovingImagePixelValueType
 typedef (itk::Concept::IsFloatingPoint< FixedImagePixelValueType >) OnlyDefinedForFloatingPointTypes0
 typedef (itk::Concept::IsFloatingPoint< MovingImagePixelValueType >) OnlyDefinedForFloatingPointTypes1

Additional Inherited Members


Detailed Description

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

Computes similarity between regions of two images, using two user-supplied transforms, a 'fixed' transform and a 'moving' transform.

Warning:
Integer-type images are not yet supported. See concept-checking in class declaration for details.

Templated over the fixed and moving image types, as well as an optional VirtualImage type to define the virtual domain. The VirtualImage type defaults to TFixedImage.

Note:
If TFixedImage is type VectorImage, then TVirtualImage must be set separately to a non-VectorImage type, e.g. Image<unsigned char, dimension>.

If the user does not set the virtual domain explicitly, then it is created during the call to Initialize from the fixed image by copying its information. See ObjectToObjectMetric for more discussion on the virtual domain.

At a minimum, the user must: 1) Set images using SetFixedImage and SetMovingImage. 2) Call Initialize.

Image gradient calculations

Image gradients can be calculated in one of two ways: 1) Using a gradient image filter, by setting Use[Fixed|Moving]ImageGradientFilter to true. By default this is set as an itkGradientRecursiveGaussianImageFilter, a smoothed gradient filter. A filter uses more memory, because it calculates all gradients at once and stores them in an image. The advantage of pre-calculation is for the fixed image gradients, since they only need be calculated once, and for metrics that need to access image gradients more than once for a particular point. The fixed image gradients are only calculated once when this option is set, during Initialize. 2) Otherwise, an image gradient calculator based on ImageFunction is used. By default the CentralDifferenceImageFunction is used. This calculation is not smoothed and gives different results than GradientRecursiveGaussianImageFilter. The advantage is that less memory is used. However for the fixed image, it means needlessly computing the image gradients at each iteration of a registration instead of just computing once at the beginning. The user can supply a different function by calling SetFixedImageGradientCalculator and/or SetMovingImageGradientCalculator.

Both image gradient calculation methods are threaded. Generally it is not recommended to use different image gradient methods for the fixed and moving images because the methods return different results.

Image Masks

Image masks are supported using SetMovingImageMask or SetFixedImageMask. If the image mask is sparse, see the comments for use of sparse point sets.

Sparse Sampling

Sparse sampling is performed by supplying an arbitrary point list over which to evaluate the metric. It's presumed that the user will be working in terms of the fixed image domain, and thus the point list is expected to be in the fixed domain. Internally, the points are transformed into the virtual domain as needed.

Note:
The attributes/data of each point in the set are not used, but rather the point's geometric coordinates. Point sets are set via SetFixedSampledPointSet, and the point set is enabled for use by calling SetUseFixedSampledPointSet.
If the point set is sparse, the option SetUse[Fixed|Moving]ImageGradientFilter typically should be disabled to avoid excessive computation. However, the gradient values of the fixed image are not cached when using a point set (there are plans for this in the future), so depending on the number of iterations (when used during optimization) and the level of sparsity, it may be more efficient to use a gradient image filter for it because it will only be calculated once.

Threading

This class is threaded. Threading is handled by friend classes ImageToImageMetricv4GetValueAndDerivativeThreaderBase and ImageToImageMetricv4GetValueAndDerivativeThreader. Dense and sparse evaluation are handled by template specialization of the ImageToImageMetricv4GetValueAndDerivativeThreader::ThreadedExecution method, in order to iterate over either all points in the virtual space in the case of dense evaluation, or a list of points in the sparse case.

Methods and members of ImageToImageMetricv4 are accessed by the threading class using its m_Associate member, which points to the containing instance of ImageToImageMetricv4.

Pre- and post-processing for threaded operation is handled in ImageToImageMetricv4GetValueAndDerivativeThreaderBase::BeforeThreadedExecution, and ImageToImageMetricv4GetValueAndDerivativeThreaderBase::AfterThreadedExecution, respectively.

Derived classes:

The GetValue method may be overridden to provide better-optimized or otherwise different behavior as needed.

Derived classes must derive a threader class from ImageToImageMetricv4GetValueAndDerivativeThreader, from which a DenseGetValueAndDerivativeThreader and SparseGetValueAndDerivativeThreader must be defined. Then,

must be called in the constructor.

The ProcessPoint method of the derived threader must be overriden to provide the metric-specific evaluation.

To access methods and members within the derived metric class from the derived threader class, the user must cast m_Associate to the type of the derived metric class.

See ImageToImageMetricv4Test for a clear example of what a derived class must implement and do.

Definition at line 156 of file itkImageToImageMetricv4.h.


Member Typedef Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef SmartPointer<const Self> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ConstPointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::CoordinateRepresentationType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::CoordinateRepresentationType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef GradientRecursiveGaussianImageFilter< FixedImageType, FixedImageGradientImageType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::DefaultFixedImageGradientFilter

Default image gradient filter types

Definition at line 320 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef GradientRecursiveGaussianImageFilter< MovingImageType, MovingImageGradientImageType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::DefaultMovingImageGradientFilter

Definition at line 323 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::DerivativeType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::DerivativeType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef DerivativeType::ValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::DerivativeValueType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::DimensionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::DimensionType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CovariantVector< FixedRealType, itkGetStaticConstMacro(FixedImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedGradientPixelType

Type of the filter used to calculate the gradients. Note that RealType is always double (or long double for long double pixel-type).

Definition at line 289 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageConstPointer

Definition at line 209 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageGradientCalculatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientCalculatorPointer

Definition at line 340 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef ImageFunction<FixedImageType, CovariantVector<double, itkGetStaticConstMacro( FixedImageDimension )>, CoordinateRepresentationType> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientCalculatorType

Image gradient calculator types. The TOutput template parameter is chosen to match that of CentralDiffererenceImageFunction.

Definition at line 331 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageGradientFilterType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientFilterPointer

Definition at line 313 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef ImageToImageFilter< FixedImageType, FixedImageGradientImageType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientFilterType

Definition at line 298 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageGradientImageType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientImagePointer

Type of the filter used to calculate the gradients. Note that RealType is always double (or long double for long double pixel-type).

Definition at line 294 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Image< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientImageType

Type of the filter used to calculate the gradients. Note that RealType is always double (or long double for long double pixel-type).

Definition at line 292 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef LinearInterpolateImageFunction< FixedImageGradientImageType, CoordinateRepresentationType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientInterpolatorType
protected

Definition at line 523 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CovariantVector< CoordinateRepresentationType, itkGetStaticConstMacro(FixedImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageGradientType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageType::IndexType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageIndexType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageMaskType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageMaskConstPointer

Definition at line 245 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageMaskType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageMaskPointer

Definition at line 244 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef SpatialObject< itkGetStaticConstMacro(FixedImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::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 243 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageType::PixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImagePixelType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef PixelTraits<FixedImagePixelType>::ValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImagePixelValueType
private

Only floating-point images are currently supported. To support integer images, several small changes must be made

Definition at line 707 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImagePointer

Definition at line 208 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImageType::PointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImagePointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef TFixedImage itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedInputPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedInputPointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedInterpolatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedInterpolatorPointer

Definition at line 266 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef InterpolateImageFunction< FixedImageType, CoordinateRepresentationType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedInterpolatorType

Type of the Interpolator Base class

Definition at line 262 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedOutputPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedOutputPointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedImagePixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedPixelType

Definition at line 207 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef NumericTraits< FixedImagePixelType >::RealType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedRealType

Type of the filter used to calculate the gradients. Note that RealType is always double (or long double for long double pixel-type).

Definition at line 286 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedSampledPointSetType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedSampledPointSetConstPointer

Definition at line 257 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef FixedSampledPointSetType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedSampledPointSetPointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef PointSet<typename FixedImageType::PixelType, itkGetStaticConstMacro(FixedImageDimension)> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedSampledPointSetType

Type of the point set used for sparse sampling.

Definition at line 255 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedTransformJacobianType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedTransformJacobianType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedTransformParametersType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedTransformParametersType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedTransformPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedTransformPointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::FixedTransformType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedTransformType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::GradientSourceType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GradientSourceType

Graident source type

Reimplemented from itk::ObjectToObjectMetricBase.

Definition at line 181 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::DimensionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ImageDimensionType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::InternalComputationValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::InternalComputationValueType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::JacobianType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::JacobianType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MeasureType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MeasureType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CovariantVector< MovingRealType, itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingGradientPixelType

Definition at line 304 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageConstPointer

Definition at line 216 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageGradientCalculatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientCalculatorPointer

Definition at line 342 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef ImageFunction<MovingImageType, CovariantVector<double, itkGetStaticConstMacro( MovingImageDimension )>, CoordinateRepresentationType> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientCalculatorType

Image gradient calculator types. The TOutput template parameter is chosen to match that of CentralDiffererenceImageFunction.

Definition at line 336 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageGradientFilterType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientFilterPointer

Definition at line 315 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef ImageToImageFilter< MovingImageType, MovingImageGradientImageType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientFilterType

Definition at line 311 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageGradientImageType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientImagePointer

Definition at line 308 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Image< MovingGradientPixelType, itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientImageType

Definition at line 307 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef LinearInterpolateImageFunction< MovingImageGradientImageType, CoordinateRepresentationType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientInterpolatorType
protected

Definition at line 526 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CovariantVector< CoordinateRepresentationType, itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageGradientType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageType::IndexType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageIndexType

Definition at line 219 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageMaskType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageMaskConstPointer

Definition at line 251 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageMaskType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageMaskPointer

Definition at line 250 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef SpatialObject< itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::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 249 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageType::PixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImagePixelType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef PixelTraits<MovingImagePixelType>::ValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImagePixelValueType
private

Only floating-point images are currently supported. To support integer images, several small changes must be made

Definition at line 708 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImagePointer

Definition at line 215 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageType::PointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImagePointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImageType::RegionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageRegionType

Definition at line 218 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef TMovingImage itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingInputPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingInputPointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingInterpolatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingInterpolatorPointer

Definition at line 267 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingInterpolatorType

Definition at line 265 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingOutputPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingOutputPointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef MovingImagePixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingPixelType

Definition at line 214 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef NumericTraits< MovingImagePixelType >::RealType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingRealType

Definition at line 301 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingTransformJacobianType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingTransformJacobianType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingTransformParametersType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingTransformParametersType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingTransformPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingTransformPointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::MovingTransformType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingTransformType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::NumberOfParametersType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::NumberOfParametersType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::ParametersType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ParametersType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::ParametersValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ParametersValueType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef SmartPointer<Self> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::Pointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef ImageToImageMetricv4 itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::Self
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef ObjectToObjectMetric<TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::Superclass
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualDirectionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualDirectionType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef CovariantVector< CoordinateRepresentationType, itkGetStaticConstMacro(VirtualImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualImageGradientType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualImagePointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualImagePointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualImageType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualImageType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualIndexType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualIndexType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualOriginType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualPixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualPixelType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualPointSetPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualPointSetPointer
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualPointSetType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualPointSetType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualPointType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualSizeType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualRadiusType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualRegionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualRegionType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualSizeType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualSizeType
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
typedef Superclass::VirtualSpacingType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualSpacingType

Constructor & Destructor Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ImageToImageMetricv4 ( )
protected
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::~ImageToImageMetricv4 ( )
protectedvirtual
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ImageToImageMetricv4 ( const Self )
private

Member Function Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ComputeFixedImageGradientAtIndex ( const VirtualIndexType index,
FixedImageGradientType gradient 
) const
protectedvirtual

Compute fixed warped image derivatives for an index at virtual domain.

Warning:
This doesn't transform result into virtual space. For that, see TransformAndEvaluateFixedPoint
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ComputeFixedImageGradientAtPoint ( const FixedImagePointType mappedPoint,
FixedImageGradientType gradient 
) const
protectedvirtual

Compute image derivatives for a Fixed point.

Warning:
This doesn't transform result into virtual space. For that, see TransformAndEvaluateFixedPoint
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ComputeFixedImageGradientFilterImage ( )
protectedvirtual

Computes the gradients of the fixed image, using the GradientFilter, assigning the output to to m_FixedImageGradientImage.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ComputeMovingImageGradientAtIndex ( const VirtualIndexType index,
MovingImageGradientType gradient 
) const
protectedvirtual

Compute image derivatives for a moving point.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ComputeMovingImageGradientAtPoint ( const MovingImagePointType mappedPoint,
MovingImageGradientType gradient 
) const
protectedvirtual

Compute image derivatives for a moving point.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::ComputeMovingImageGradientFilterImage ( ) const
protectedvirtual

Computes the gradients of the moving image, using the GradientFilter, assigning the output to to m_MovingImageGradientImage.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetDerivative ( DerivativeType ) const
virtual

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

Implements itk::ObjectToObjectMetricBase.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const FixedImageType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetFixedImage ( )
virtual

Get the Fixed Image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual FixedImageGradientCalculatorType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetFixedImageGradientCalculator ( )
virtual

Set/Get gradient calculators

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual FixedImageGradientFilterType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetFixedImageGradientFilter ( )
virtual

Set/Get the gradient filter

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const FixedImageGradientImageType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetFixedImageGradientImage ( )
virtual

Get Fixed Gradient Image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const FixedImageMaskType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetFixedImageMask ( )
virtual

Set/Get the fixed image mask.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const FixedInterpolatorType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetFixedInterpolator ( )
virtual

Get a pointer to the fixed interpolator.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const FixedSampledPointSetType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetFixedSampledPointSet ( )
virtual

Set/Get the fixed image domain sampling point set See main documentation regarding using fixed vs virtual domain for the point set.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual DerivativeValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetFloatingPointCorrectionResolution ( ) const
virtual

Set/Get the floating point resolution used optionally by the derivatives. If this is set, for example to 1e5, then the derivative will have precision up to 5 points beyond the decimal point. And precision beyond that will be truncated.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual ThreadIdType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetMaximumNumberOfThreads ( ) const
virtual

Set number of threads to use. This the maximum number of threads to use when multithreaded. The actual number of threads used (may be less than this value) can be obtained with GetNumberOfThreadsUsed.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const MovingImageType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetMovingImage ( )
virtual

Get the Moving Image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual MovingImageGradientCalculatorType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetMovingImageGradientCalculator ( )
virtual

Set/Get gradient calculators

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual MovingImageGradientFilterType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetMovingImageGradientFilter ( )
virtual

Set/Get the gradient filter

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const MovingImageGradientImageType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetMovingImageGradientImage ( )
virtual

Get Moving Gradient Image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const MovingImageMaskType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetMovingImageMask ( )
virtual

Set/Get the moving image mask.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const MovingInterpolatorType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetMovingInterpolator ( )
virtual

Get a pointer to the Moving interpolator.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const char* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetNameOfClass ( ) const
virtual
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
SizeValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetNumberOfDomainPoints ( ) const

Get the number of points in the domain used to evaluate the metric. This will differ depending on whether a sampled point set or dense sampling is used, and will be greater than or equal to GetNumberOfValidPoints().

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const SizeValueType& itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetNumberOfSkippedFixedSampledPoints ( )
virtual

Get the number of sampled fixed sampled points that are deemed invalid during conversion to virtual domain in Initialize(). For informational purposes.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual ThreadIdType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetNumberOfThreadsUsed ( ) const
virtual

Get number of threads to used in the the GetValueAndDerivative calculation. Only valid after GetValueAndDerivative has been called.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual SizeValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetNumberOfValidPoints ( ) const
virtual

Get number of valid points from most recent update

Reimplemented from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const bool& itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetUseFixedImageGradientFilter ( )
virtual

Set/Get gradient computation via an image filter, for fixed image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const bool& itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetUseFixedSampledPointSet ( )
virtual

Set/Get flag to use fixed image domain sampling point set

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const bool& itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetUseFloatingPointCorrection ( )
virtual

Set/Get the option for applying floating point resolution truncation to derivative calculations in global support cases. False by default. It is only applied in global support cases (i.e. with global-support transforms) because in these cases, the per-point derivative values are added cumulatively, which can lead to loss of precision when the sum becomes much larger than the values being added. The goal is more consistent results across the number of threads used for an evaluation. The resolution can be changed using SetFloatingPointCorrectionResolution().

Note:
The metric always sums derivative values using a CompensatedSummation object, but empirically this provides only a slight improvement in precision across number of threads during registration.
Warning:
The metric does not perform any normalization so the results of this truncation are highly dependent on the derivative magnitudes.
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const bool& itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetUseMovingImageGradientFilter ( )
virtual

Set/Get gradient computation via an image filter.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual MeasureType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetValue ( ) const
virtual

Calculate and return the value for the metric based on the current transformation(s). The result is both returned, and stored in the m_Value member variable.

Implements itk::ObjectToObjectMetricBase.

Reimplemented in itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetValueAndDerivative ( MeasureType value,
DerivativeType derivative 
) const
virtual

Calculate and return both the value for the metric and its derivative. This calls the SparseGetValueAndDerivativeThreader if UsedFixedSampledPointSet is true, and DenseGetValueAndDerivativeThreader otherwise. The threaders in turn call ProcessPoint on each point in the domain to be examined.

Reimplemented in itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetValueAndDerivativeExecute ( ) const
protectedvirtual

Perform the actual threaded processing, using the appropriate GetValueAndDerivativeThreader. Results get written to member vars. This is available as a separate method so it can be used by dervied classes that implement their own GetValueAndDerivative, and/or need to run the processing loop more than once.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual const VirtualPointSetType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::GetVirtualSampledPointSet ( )
virtual

Get the virtual domain sampling point set

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::Initialize ( void  ) throw ( itk::ExceptionObject )
virtual
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::InitializeDefaultFixedImageGradientFilter ( void  )
protectedvirtual

Initialize the default image gradient filters. This must only be called once the fixed and moving images have been set.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::InitializeDefaultMovingImageGradientFilter ( void  )
protectedvirtual

Initialize the default image gradient filters. This must only be called once the fixed and moving images have been set.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::InitializeForIteration ( ) const
protectedvirtual

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

Reimplemented in itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MapFixedSampledPointSetToVirtual ( void  )
private

Map the fixed point set samples to the virtual domain

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::operator= ( const Self )
private
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFixedImage ( const FixedImageType _arg)
virtual

Connect the Fixed Image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFixedImageGradientCalculator ( FixedImageGradientCalculatorType _arg)
virtual

Set/Get gradient calculators

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFixedImageGradientFilter ( FixedImageGradientFilterType _arg)
virtual

Set/Get the gradient filter

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFixedImageMask ( FixedImageMaskType _arg)
virtual

Set/Get the fixed image mask.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFixedImageMask ( const FixedImageMaskType _arg)
virtual

Set/Get the fixed image mask.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFixedInterpolator ( FixedInterpolatorType _arg)
virtual

Connect the fixed interpolator.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFixedSampledPointSet ( FixedSampledPointSetType _arg)
virtual

Set/Get the fixed image domain sampling point set See main documentation regarding using fixed vs virtual domain for the point set.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFixedSampledPointSet ( const FixedSampledPointSetType _arg)
virtual

Set/Get the fixed image domain sampling point set See main documentation regarding using fixed vs virtual domain for the point set.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetFloatingPointCorrectionResolution ( DerivativeValueType  _arg)
virtual

Set/Get the floating point resolution used optionally by the derivatives. If this is set, for example to 1e5, then the derivative will have precision up to 5 points beyond the decimal point. And precision beyond that will be truncated.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetMaximumNumberOfThreads ( const ThreadIdType  threads)
virtual

Set number of threads to use. This the maximum number of threads to use when multithreaded. The actual number of threads used (may be less than this value) can be obtained with GetNumberOfThreadsUsed.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetMovingImage ( const MovingImageType _arg)
virtual

Connect the Moving Image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetMovingImageGradientCalculator ( MovingImageGradientCalculatorType _arg)
virtual

Set/Get gradient calculators

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetMovingImageGradientFilter ( MovingImageGradientFilterType _arg)
virtual

Set/Get the gradient filter

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetMovingImageMask ( MovingImageMaskType _arg)
virtual

Set/Get the moving image mask.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetMovingImageMask ( const MovingImageMaskType _arg)
virtual

Set/Get the moving image mask.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetMovingInterpolator ( MovingInterpolatorType _arg)
virtual

Connect the Moving interpolator.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetUseFixedImageGradientFilter ( bool  _arg)
virtual

Set/Get gradient computation via an image filter, for fixed image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetUseFixedSampledPointSet ( bool  _arg)
virtual

Set/Get flag to use fixed image domain sampling point set

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetUseFloatingPointCorrection ( bool  _arg)
virtual

Set/Get the option for applying floating point resolution truncation to derivative calculations in global support cases. False by default. It is only applied in global support cases (i.e. with global-support transforms) because in these cases, the per-point derivative values are added cumulatively, which can lead to loss of precision when the sum becomes much larger than the values being added. The goal is more consistent results across the number of threads used for an evaluation. The resolution can be changed using SetFloatingPointCorrectionResolution().

Note:
The metric always sums derivative values using a CompensatedSummation object, but empirically this provides only a slight improvement in precision across number of threads during registration.
Warning:
The metric does not perform any normalization so the results of this truncation are highly dependent on the derivative magnitudes.
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SetUseMovingImageGradientFilter ( bool  _arg)
virtual

Set/Get gradient computation via an image filter.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual bool itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::SupportsArbitraryVirtualDomainSamples ( void  ) const
inlinevirtual

Returns a flag. True if arbitrary virtual domain points will always correspond to data points. False if not. For example, point-set metrics return false because only some virtual domain points will correspond to points within the point sets.

Implements itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >.

Definition at line 514 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
bool itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::TransformAndEvaluateFixedPoint ( const VirtualIndexType index,
const VirtualPointType point,
const bool  computeImageGradient,
FixedImagePointType mappedFixedPoint,
FixedImagePixelType mappedFixedPixelValue,
FixedImageGradientType mappedFixedImageGradient 
) const
protected

Transform a point from VirtualImage domain to FixedImage domain. This function also checks if mapped point is within the mask if one is set, and that is within the fixed image buffer, in which case the return value will be true. mappedFixedPoint and mappedFixedPixelValue are returned, and mappedFixedImageGradient is returned if computeImageGradient is set. All return values are in the virtual domain.

Note:
It would be better for maintenance to have a single method that could work for either fixed or moving domains. However setting that up is complicated because dimensionality and pixel type may be different between the two.
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
bool itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::TransformAndEvaluateMovingPoint ( const VirtualIndexType index,
const VirtualPointType point,
const bool  computeImageGradient,
MovingImagePointType mappedMovingPoint,
MovingImagePixelType mappedMovingPixelValue,
MovingImageGradientType mappedMovingImageGradient 
) const
protected

Transform a point from VirtualImage domain to MovingImage domain.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::typedef ( itk::Concept::IsFloatingPoint< FixedImagePixelValueType )
private

This class requires OnlyDefinedForFloatingPointTypes0 in the form of ( itk::Concept::IsFloatingPoint<FixedImagePixelValueType> )

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::typedef ( itk::Concept::IsFloatingPoint< MovingImagePixelValueType )
private

This class requires OnlyDefinedForFloatingPointTypes1 in the form of ( itk::Concept::IsFloatingPoint<MovingImagePixelValueType> )

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::UseFixedImageGradientFilterOff ( )
virtual

Set/Get gradient computation via an image filter, for fixed image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::UseFixedImageGradientFilterOn ( )
virtual

Set/Get gradient computation via an image filter, for fixed image.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::UseFixedSampledPointSetOff ( )
virtual

Set/Get flag to use fixed image domain sampling point set

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::UseFixedSampledPointSetOn ( )
virtual

Set/Get flag to use fixed image domain sampling point set

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::UseFloatingPointCorrectionOff ( )
virtual

Set/Get the option for applying floating point resolution truncation to derivative calculations in global support cases. False by default. It is only applied in global support cases (i.e. with global-support transforms) because in these cases, the per-point derivative values are added cumulatively, which can lead to loss of precision when the sum becomes much larger than the values being added. The goal is more consistent results across the number of threads used for an evaluation. The resolution can be changed using SetFloatingPointCorrectionResolution().

Note:
The metric always sums derivative values using a CompensatedSummation object, but empirically this provides only a slight improvement in precision across number of threads during registration.
Warning:
The metric does not perform any normalization so the results of this truncation are highly dependent on the derivative magnitudes.
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::UseFloatingPointCorrectionOn ( )
virtual

Set/Get the option for applying floating point resolution truncation to derivative calculations in global support cases. False by default. It is only applied in global support cases (i.e. with global-support transforms) because in these cases, the per-point derivative values are added cumulatively, which can lead to loss of precision when the sum becomes much larger than the values being added. The goal is more consistent results across the number of threads used for an evaluation. The resolution can be changed using SetFloatingPointCorrectionResolution().

Note:
The metric always sums derivative values using a CompensatedSummation object, but empirically this provides only a slight improvement in precision across number of threads during registration.
Warning:
The metric does not perform any normalization so the results of this truncation are highly dependent on the derivative magnitudes.
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::UseMovingImageGradientFilterOff ( )
virtual

Set/Get gradient computation via an image filter.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
virtual void itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::UseMovingImageGradientFilterOn ( )
virtual

Set/Get gradient computation via an image filter.


Friends And Related Function Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
friend class ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< VirtualImageDimension >, Self >
friend

Definition at line 530 of file itkImageToImageMetricv4.h.

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

Definition at line 528 of file itkImageToImageMetricv4.h.

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

Member Data Documentation

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
const DimensionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::FixedImageDimension = Superclass::FixedDimension
static
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
DefaultFixedImageGradientFilter::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_DefaultFixedImageGradientFilter
protected

Pointer to default gradient filter. Used for easier initialization of the default filter.

Definition at line 649 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
DefaultMovingImageGradientFilter::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_DefaultMovingImageGradientFilter
protected

Definition at line 651 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< VirtualImageDimension >, Self >::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_DenseGetValueAndDerivativeThreader
protected

Definition at line 536 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
DerivativeType* itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_DerivativeResult
mutableprotected

Derivative results holder. User a raw pointer so we can point it to a user-provided object. This is used in internal methods so the user-provided variable does not have to be passed around. It also enables safely sharing a derivative object between metrics during multi-variate analsys, for memory efficiency. Will be NULL if not set.

Definition at line 667 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
FixedImageConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FixedImage
protected

Definition at line 628 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
FixedImageGradientCalculatorPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FixedImageGradientCalculator
protected

Image gradient calculators

Definition at line 658 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
FixedImageGradientFilterPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FixedImageGradientFilter
protected

Gradient filters

Definition at line 643 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
FixedImageGradientImagePointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FixedImageGradientImage
mutableprotected

Gradient images to store gradient filter output.

Definition at line 654 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
FixedImageGradientInterpolatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FixedImageGradientInterpolator
protected

Definition at line 634 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
FixedImageMaskConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FixedImageMask
protected

Masks

Definition at line 670 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
FixedInterpolatorPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FixedInterpolator
protected

Pointers to interpolators

Definition at line 632 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
FixedSampledPointSetConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FixedSampledPointSet
protected

Sampled point sets

Definition at line 674 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
DerivativeValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_FloatingPointCorrectionResolution
private

Definition at line 702 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
bool itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_HaveMadeGetValueWarning
mutableprivate

Flag for warning about use of GetValue. Will be removed when GetValue implementation is improved.

Definition at line 691 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MovingImageConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_MovingImage
protected

Definition at line 629 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MovingImageGradientCalculatorPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_MovingImageGradientCalculator
protected

Definition at line 659 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MovingImageGradientFilterPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_MovingImageGradientFilter
protected

Definition at line 644 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MovingImageGradientImagePointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_MovingImageGradientImage
mutableprotected

Definition at line 655 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MovingImageGradientInterpolatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_MovingImageGradientInterpolator
protected

Definition at line 635 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MovingImageMaskConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_MovingImageMask
protected

Definition at line 671 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
MovingInterpolatorPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_MovingInterpolator
protected

Definition at line 633 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
SizeValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_NumberOfSkippedFixedSampledPoints
private

Definition at line 699 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Self >::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_SparseGetValueAndDerivativeThreader
protected

Definition at line 540 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
bool itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_UseFixedImageGradientFilter
protected

Flag to control use of precomputed gradient filter image or gradient calculator for image gradient calculations.

Definition at line 639 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
bool itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_UseFixedSampledPointSet
protected

Flag to use FixedSampledPointSet, i.e. Sparse sampling.

Definition at line 678 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
bool itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_UseFloatingPointCorrection
private

Definition at line 701 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
bool itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_UseMovingImageGradientFilter
protected

Definition at line 640 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
VirtualPointSetPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::m_VirtualSampledPointSet
protected

Definition at line 675 of file itkImageToImageMetricv4.h.

template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
const DimensionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::MovingImageDimension = Superclass::MovingDimension
static
template<class TFixedImage , class TMovingImage , class TVirtualImage = TFixedImage>
const DimensionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >::VirtualImageDimension = Superclass::VirtualDimension
static

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