go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage > Class Template Reference

#include <itkParzenWindowHistogramImageToImageMetric.h>

Detailed Description

template<class TFixedImage, class TMovingImage>
class itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >

A base class for image metrics based on a joint histogram computed using Parzen Windowing.

The calculations are based on the method of Mattes/Thevenaz/Unser [1,2,3] where the probability density distribution are estimated using Parzen histograms.

Once the PDF's have been constructed, the metric value and derivative can be computed. Inheriting classes should make sure to call the function ComputePDFs(AndPDFDerivatives) before using m_JointPDF and m_Alpha (and m_JointPDFDerivatives).

This class does not define the GetValue/GetValueAndDerivative methods. This is the task of inheriting classes.

The code is based on the itk::MattesMutualInformationImageToImageMetric, but largely rewritten. Some important features:

  • It inherits from AdvancedImageToImageMetric, which provides a lot of general functionality.
  • It splits up some functions in subfunctions.
  • The Parzen window order can be chosen.
  • A fixed and moving number of histogram bins can be chosen.
  • More use of iterators instead of raw buffer pointers.
  • An optional FiniteDifference derivative estimation.
Warning
This class is not thread safe due the member data structures used to the store the sampled points and the marginal and joint pdfs.

References:
[1] "Nonrigid multimodality image registration"
D. Mattes, D. R. Haynor, H. Vesselle, T. Lewellen and W. Eubank
Medical Imaging 2001: Image Processing, 2001, pp. 1609-1620.
[2] "PET-CT Image Registration in the Chest Using Free-form Deformations"
D. Mattes, D. R. Haynor, H. Vesselle, T. Lewellen and W. Eubank
IEEE Transactions in Medical Imaging. To Appear.
[3] "Optimization of Mutual Information for MultiResolution Image Registration"
P. Thevenaz and M. Unser
IEEE Transactions in Image Processing, 9(12) December 2000.

Definition at line 75 of file itkParzenWindowHistogramImageToImageMetric.h.

Inheritance diagram for itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >:

Data Structures

struct  ParzenWindowHistogramGetValueAndDerivativePerThreadStruct
 
struct  ParzenWindowHistogramMultiThreaderParameterType
 

Public Types

using ConstPointer = SmartPointer<const Self>
 
using DerivativeValueType
 
using FixedImageLimiterOutputType
 
using FixedImageLimiterType
 
using FixedImageMaskPointer
 
using FixedImageMaskType
 
using FixedImagePixelType
 
using ImageSampleContainerPointer
 
using ImageSampleContainerType
 
using ImageSamplerPointer
 
using ImageSamplerType
 
using MovingImageDerivativeScalesType
 
using MovingImageLimiterOutputType
 
using MovingImageLimiterType
 
using MovingImageMaskPointer
 
using MovingImageMaskType
 
using MovingImageRegionType
 
using Pointer = SmartPointer<Self>
 
using Self = ParzenWindowHistogramImageToImageMetric
 
using Superclass = AdvancedImageToImageMetric<TFixedImage, TMovingImage>
 
using ThreadInfoType
 
- Public Types inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
using AdvancedTransformType = AdvancedTransform<ScalarType, FixedImageDimension, MovingImageDimension>
 
using BSplineOrder1TransformPointer = typename BSplineOrder1TransformType::Pointer
 
using BSplineOrder1TransformType = AdvancedBSplineDeformableTransform<ScalarType, FixedImageDimension, 1>
 
using BSplineOrder2TransformPointer = typename BSplineOrder2TransformType::Pointer
 
using BSplineOrder2TransformType = AdvancedBSplineDeformableTransform<ScalarType, FixedImageDimension, 2>
 
using BSplineOrder3TransformPointer = typename BSplineOrder3TransformType::Pointer
 
using BSplineOrder3TransformType = AdvancedBSplineDeformableTransform<ScalarType, FixedImageDimension, 3>
 
using CombinationTransformType = AdvancedCombinationTransform<ScalarType, FixedImageDimension>
 
using ConstPointer = SmartPointer<const Self>
 
using DerivativeValueType = typename DerivativeType::ValueType
 
using FixedImageLimiterOutputType = typename FixedImageLimiterType::OutputType
 
using FixedImageLimiterPointer = typename FixedImageLimiterType::Pointer
 
using FixedImageLimiterType = LimiterFunctionBase<RealType, FixedImageDimension>
 
using FixedImageMaskConstPointer = SmartPointer<const FixedImageMaskType>
 
using FixedImageMaskPointer = SmartPointer<FixedImageMaskType>
 
using FixedImageMaskType = ImageMaskSpatialObject<Self::FixedImageDimension>
 
using FixedImagePixelType = typename FixedImageType::PixelType
 
using FixedImagePointer = typename FixedImageType::Pointer
 
using ImageSampleContainerPointer = typename ImageSamplerType::OutputVectorContainerPointer
 
using ImageSampleContainerType = typename ImageSamplerType::OutputVectorContainerType
 
using ImageSamplerPointer = typename ImageSamplerType::Pointer
 
using ImageSamplerType = ImageSamplerBase<FixedImageType>
 
using MovingImageDerivativeScalesType = FixedArray<double, Self::MovingImageDimension>
 
using MovingImageLimiterOutputType = typename MovingImageLimiterType::OutputType
 
using MovingImageLimiterPointer = typename MovingImageLimiterType::Pointer
 
using MovingImageLimiterType = LimiterFunctionBase<RealType, MovingImageDimension>
 
using MovingImageMaskConstPointer = SmartPointer<const MovingImageMaskType>
 
using MovingImageMaskPointer = SmartPointer<MovingImageMaskType>
 
using MovingImageMaskType = ImageMaskSpatialObject<Self::MovingImageDimension>
 
using MovingImagePointer = typename MovingImageType::Pointer
 
using MovingImageRegionType = typename MovingImageType::RegionType
 
using NumberOfParametersType = typename AdvancedTransformType::NumberOfParametersType
 
using Pointer = SmartPointer<Self>
 
using ScalarType = typename TransformType::ScalarType
 
using Self = AdvancedImageToImageMetric
 
using Superclass = ImageToImageMetric<TFixedImage, TMovingImage>
 
using ThreadInfoType = MultiThreaderBase::WorkUnitInfo
 

Public Member Functions

virtual const char * GetClassName () const
 
void GetDerivative (const ParametersType &parameters, DerivativeType &Derivative) const override
 
virtual double GetFiniteDifferencePerturbation () const
 
virtual unsigned int GetFixedKernelBSplineOrder () const
 
virtual unsigned int GetMovingKernelBSplineOrder () const
 
virtual unsigned long GetNumberOfFixedHistogramBins () const
 
virtual unsigned long GetNumberOfMovingHistogramBins () const
 
virtual bool GetUseDerivative () const
 
virtual const boolGetUseExplicitPDFDerivatives ()
 
virtual bool GetUseFiniteDifferenceDerivative () const
 
void GetValueAndDerivative (const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
 
void Initialize () override
 
 ITK_DISALLOW_COPY_AND_MOVE (ParzenWindowHistogramImageToImageMetric)
 
 itkStaticConstMacro (FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
 
 itkStaticConstMacro (MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
 
virtual void SetFiniteDifferencePerturbation (double _arg)
 
virtual void SetFixedKernelBSplineOrder (unsigned int _arg)
 
virtual void SetMovingKernelBSplineOrder (unsigned int _arg)
 
virtual void SetNumberOfFixedHistogramBins (unsigned long _arg)
 
virtual void SetNumberOfMovingHistogramBins (unsigned long _arg)
 
virtual void SetUseDerivative (bool _arg)
 
virtual void SetUseExplicitPDFDerivatives (bool _arg)
 
virtual void SetUseFiniteDifferenceDerivative (bool _arg)
 
virtual void UseExplicitPDFDerivativesOff ()
 
virtual void UseExplicitPDFDerivativesOn ()
 
- Public Member Functions inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
virtual void BeforeThreadedGetValueAndDerivative (const TransformParametersType &parameters) const
 
virtual const FixedImageLimiterTypeGetFixedImageLimiter ()
 
const FixedImageMaskTypeGetFixedImageMask () const override
 
virtual double GetFixedLimitRangeRatio () const
 
ImageSamplerTypeGetImageSampler () const
 
virtual const MovingImageDerivativeScalesTypeGetMovingImageDerivativeScales ()
 
virtual const MovingImageLimiterTypeGetMovingImageLimiter ()
 
const MovingImageMaskTypeGetMovingImageMask () const override
 
virtual double GetMovingLimitRangeRatio () const
 
virtual double GetRequiredRatioOfValidSamples () const
 
virtual bool GetScaleGradientWithRespectToMovingImageOrientation () const
 
const AdvancedTransformTypeGetTransform () const override
 
AdvancedTransformTypeGetTransform () override
 
virtual bool GetUseFixedImageLimiter () const
 
virtual bool GetUseImageSampler () const
 
virtual const boolGetUseMetricSingleThreaded ()
 
virtual bool GetUseMovingImageDerivativeScales () const
 
virtual bool GetUseMovingImageLimiter () const
 
virtual const boolGetUseMultiThread ()
 
void Initialize () override
 
 ITK_DISALLOW_COPY_AND_MOVE (AdvancedImageToImageMetric)
 
 itkStaticConstMacro (FixedImageDimension, unsigned int, TFixedImage::ImageDimension)
 
 itkStaticConstMacro (MovingImageDimension, unsigned int, TMovingImage::ImageDimension)
 
virtual void SetFixedImageLimiter (FixedImageLimiterType *_arg)
 
virtual void SetFixedImageMask (const FixedImageMaskType *const arg)
 
virtual void SetFixedLimitRangeRatio (double _arg)
 
virtual void SetImageSampler (ImageSamplerType *_arg)
 
virtual void SetMovingImageDerivativeScales (MovingImageDerivativeScalesType _arg)
 
virtual void SetMovingImageLimiter (MovingImageLimiterType *_arg)
 
virtual void SetMovingImageMask (const MovingImageMaskType *const arg)
 
virtual void SetMovingLimitRangeRatio (double _arg)
 
virtual void SetRequiredRatioOfValidSamples (double _arg)
 
virtual void SetScaleGradientWithRespectToMovingImageOrientation (bool _arg)
 
virtual void SetTransform (AdvancedTransformType *arg)
 
virtual void SetUseMetricSingleThreaded (bool _arg)
 
virtual void SetUseMovingImageDerivativeScales (bool _arg)
 
virtual void SetUseMultiThread (bool _arg)
 
virtual void UseMetricSingleThreadedOff ()
 
virtual void UseMetricSingleThreadedOn ()
 
virtual void UseMultiThreadOff ()
 
virtual void UseMultiThreadOn ()
 

Protected Types

using BSplineInterpolatorType
 
using FixedImageIndexType
 
using FixedImageIndexValueType
 
using FixedImagePointType
 
using IncrementalMarginalPDFIndexType = IncrementalMarginalPDFType::IndexType
 
using IncrementalMarginalPDFPointer = typename IncrementalMarginalPDFType::Pointer
 
using IncrementalMarginalPDFRegionType = IncrementalMarginalPDFType::RegionType
 
using IncrementalMarginalPDFSizeType = IncrementalMarginalPDFType::SizeType
 
using IncrementalMarginalPDFType = Image<PDFValueType, 2>
 
using JointPDFDerivativesIndexType = JointPDFDerivativesType::IndexType
 
using JointPDFDerivativesPointer = typename JointPDFDerivativesType::Pointer
 
using JointPDFDerivativesRegionType = JointPDFDerivativesType::RegionType
 
using JointPDFDerivativesSizeType = JointPDFDerivativesType::SizeType
 
using JointPDFDerivativesType = Image<PDFDerivativeValueType, 3>
 
using JointPDFIndexType = JointPDFType::IndexType
 
using JointPDFPointer = typename JointPDFType::Pointer
 
using JointPDFRegionType = JointPDFType::RegionType
 
using JointPDFSizeType = JointPDFType::SizeType
 
using JointPDFType = Image<PDFValueType, 2>
 
using KernelFunctionPointer = typename KernelFunctionType::Pointer
 
using KernelFunctionType = KernelFunctionBase2<PDFValueType>
 
using MarginalPDFType = Array<PDFValueType>
 
using MovingImageContinuousIndexType
 
using MovingImageDerivativeType
 
using MovingImageIndexType
 
using MovingImagePointType
 
using NonZeroJacobianIndicesType
 
using OffsetValueType = typename FixedImageType::OffsetValueType
 
using ParzenValueContainerType = Array<PDFValueType>
 
using PDFDerivativeValueType = float
 
using PDFValueType = double
 
- Protected Types inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
using BSplineInterpolatorFloatPointer = typename BSplineInterpolatorFloatType::Pointer
 
using BSplineInterpolatorFloatType
 
using BSplineInterpolatorPointer = typename BSplineInterpolatorType::Pointer
 
using BSplineInterpolatorType
 
using FixedImageIndexType = typename FixedImageType::IndexType
 
using FixedImageIndexValueType = typename FixedImageIndexType::IndexValueType
 
using FixedImagePointType = typename TransformType::InputPointType
 
using LinearInterpolatorPointer = typename LinearInterpolatorType::Pointer
 
using LinearInterpolatorType = AdvancedLinearInterpolateImageFunction<MovingImageType, CoordinateRepresentationType>
 
using MovingImageContinuousIndexType = typename InterpolatorType::ContinuousIndexType
 
using MovingImageDerivativeType = typename BSplineInterpolatorType::CovariantVectorType
 
using MovingImageIndexType = typename MovingImageType::IndexType
 
using MovingImagePointType = typename TransformType::OutputPointType
 
using NonZeroJacobianIndicesType = typename AdvancedTransformType::NonZeroJacobianIndicesType
 
using ReducedBSplineInterpolatorPointer = typename ReducedBSplineInterpolatorType::Pointer
 
using ReducedBSplineInterpolatorType
 

Protected Member Functions

void AfterThreadedComputePDFs () const
 
virtual void ComputeIncrementalMarginalPDFs (const JointPDFDerivativesType *incrementalPDF, IncrementalMarginalPDFType *fixedIncrementalMarginalPDF, IncrementalMarginalPDFType *movingIncrementalMarginalPDF) const
 
void ComputeMarginalPDF (const JointPDFType *jointPDF, MarginalPDFType &marginalPDF, const unsigned int direction) const
 
virtual void ComputePDFs (const ParametersType &parameters) const
 
virtual void ComputePDFsAndIncrementalPDFs (const ParametersType &parameters) const
 
virtual void ComputePDFsAndPDFDerivatives (const ParametersType &parameters) const
 
virtual void ComputePDFsSingleThreaded (const ParametersType &parameters) const
 
virtual void GetValueAndAnalyticDerivative (const ParametersType &, MeasureType &, DerivativeType &) const
 
virtual void GetValueAndFiniteDifferenceDerivative (const ParametersType &, MeasureType &, DerivativeType &) const
 
virtual void InitializeHistograms ()
 
virtual void InitializeKernels ()
 
void InitializeThreadingParameters () const override
 
void LaunchComputePDFsThreaderCallback () const
 
void NormalizeJointPDF (JointPDFType *pdf, const double factor) const
 
void NormalizeJointPDFDerivatives (JointPDFDerivativesType *pdf, const double factor) const
 
 ParzenWindowHistogramImageToImageMetric ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void ThreadedComputePDFs (ThreadIdType threadId)
 
virtual void UpdateJointPDFAndDerivatives (const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType *imageJacobian, const NonZeroJacobianIndicesType *nzji, JointPDFType *jointPDF) const
 
virtual void UpdateJointPDFAndIncrementalPDFs (RealType fixedImageValue, RealType movingImageValue, RealType movingMaskValue, const DerivativeType &movingImageValuesRight, const DerivativeType &movingImageValuesLeft, const DerivativeType &movingMaskValuesRight, const DerivativeType &movingMaskValuesLeft, const NonZeroJacobianIndicesType &nzji) const
 
void UpdateJointPDFDerivatives (const JointPDFIndexType &pdfIndex, double factor, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji) const
 
 ~ParzenWindowHistogramImageToImageMetric () override=default
 
- Protected Member Functions inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
 AdvancedImageToImageMetric ()
 
virtual void AfterThreadedGetValue (MeasureType &) const
 
virtual void AfterThreadedGetValueAndDerivative (MeasureType &, DerivativeType &) const
 
void CheckForAdvancedTransform ()
 
void CheckForBSplineInterpolator ()
 
void CheckForBSplineTransform () const
 
void CheckNumberOfSamples (unsigned long wanted, unsigned long found) const
 
virtual bool EvaluateMovingImageValueAndDerivative (const MovingImagePointType &mappedPoint, RealType &movingImageValue, MovingImageDerivativeType *gradient) const
 
bool EvaluateTransformJacobian (const FixedImagePointType &fixedImagePoint, TransformJacobianType &jacobian, NonZeroJacobianIndicesType &nzji) const
 
virtual void EvaluateTransformJacobianInnerProduct (const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const
 
bool FastEvaluateMovingImageValueAndDerivative (const MovingImagePointType &mappedPoint, RealType &movingImageValue, MovingImageDerivativeType *gradient, const ThreadIdType threadId) const
 
virtual void InitializeImageSampler ()
 
void InitializeLimiters ()
 
virtual bool IsInsideMovingMask (const MovingImagePointType &point) const
 
 itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, PaddedGetValueAndDerivativePerThreadStruct, AlignedGetValueAndDerivativePerThreadStruct)
 
 itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, GetValueAndDerivativePerThreadStruct, PaddedGetValueAndDerivativePerThreadStruct)
 
void LaunchGetValueAndDerivativeThreaderCallback () const
 
void LaunchGetValueThreaderCallback () const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void SetFixedImageMask (const typename Superclass::FixedImageMaskType *) final
 
void SetFixedImageMask (typename Superclass::FixedImageMaskType *) final
 
void SetMovingImageMask (const typename Superclass::MovingImageMaskType *) final
 
void SetMovingImageMask (typename Superclass::MovingImageMaskType *) final
 
virtual void SetUseFixedImageLimiter (bool _arg)
 
virtual void SetUseImageSampler (bool _arg)
 
virtual void SetUseMovingImageLimiter (bool _arg)
 
virtual void ThreadedGetValue (ThreadIdType) const
 
virtual void ThreadedGetValueAndDerivative (ThreadIdType) const
 
MovingImagePointType TransformPoint (const FixedImagePointType &fixedImagePoint) const
 
 ~AdvancedImageToImageMetric () override=default
 

Static Protected Member Functions

static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ComputePDFsThreaderCallback (void *arg)
 
static void EvaluateParzenValues (double parzenWindowTerm, OffsetValueType parzenWindowIndex, const KernelFunctionType &kernel, PDFValueType *parzenValues)
 
- Static Protected Member Functions inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION AccumulateDerivativesThreaderCallback (void *arg)
 
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION GetValueAndDerivativeThreaderCallback (void *arg)
 
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION GetValueThreaderCallback (void *arg)
 

Protected Attributes

double m_Alpha { 0.0 }
 
KernelFunctionPointer m_DerivativeMovingKernel { nullptr }
 
double m_FixedImageBinSize { 0.0 }
 
MarginalPDFType m_FixedImageMarginalPDF {}
 
double m_FixedImageNormalizedMin { 0.0 }
 
IncrementalMarginalPDFPointer m_FixedIncrementalMarginalPDFLeft { nullptr }
 
IncrementalMarginalPDFPointer m_FixedIncrementalMarginalPDFRight { nullptr }
 
KernelFunctionPointer m_FixedKernel { nullptr }
 
double m_FixedParzenTermToIndexOffset { 0.5 }
 
JointPDFDerivativesPointer m_IncrementalJointPDFLeft {}
 
JointPDFDerivativesPointer m_IncrementalJointPDFRight {}
 
JointPDFPointer m_JointPDF { nullptr }
 
JointPDFDerivativesPointer m_JointPDFDerivatives { nullptr }
 
JointPDFRegionType m_JointPDFWindow {}
 
double m_MovingImageBinSize { 0.0 }
 
MarginalPDFType m_MovingImageMarginalPDF {}
 
double m_MovingImageNormalizedMin { 0.0 }
 
IncrementalMarginalPDFPointer m_MovingIncrementalMarginalPDFLeft { nullptr }
 
IncrementalMarginalPDFPointer m_MovingIncrementalMarginalPDFRight { nullptr }
 
KernelFunctionPointer m_MovingKernel { nullptr }
 
double m_MovingParzenTermToIndexOffset { -1.0 }
 
DerivativeType m_PerturbedAlphaLeft {}
 
DerivativeType m_PerturbedAlphaRight {}
 
- Protected Attributes inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
AdvancedTransformType::Pointer m_AdvancedTransform { nullptr }
 
FixedImageLimiterOutputType m_FixedImageMaxLimit { 1 }
 
FixedImageLimiterOutputType m_FixedImageMinLimit { 0 }
 
FixedImagePixelType m_FixedImageTrueMax { 1 }
 
FixedImagePixelType m_FixedImageTrueMin { 0 }
 
double m_FixedLimitRangeRatio { 0.01 }
 
std::unique_ptr< AlignedGetValueAndDerivativePerThreadStruct[]> m_GetValueAndDerivativePerThreadVariables
 
ThreadIdType m_GetValueAndDerivativePerThreadVariablesSize { 0 }
 
ImageSamplerPointer m_ImageSampler { nullptr }
 
MovingImageLimiterOutputType m_MovingImageMaxLimit { 1 }
 
MovingImageLimiterOutputType m_MovingImageMinLimit { 0 }
 
MovingImagePixelType m_MovingImageTrueMax { 1 }
 
MovingImagePixelType m_MovingImageTrueMin { 0 }
 
double m_MovingLimitRangeRatio { 0.01 }
 
MultiThreaderParameterType m_ThreaderMetricParameters {}
 
bool m_TransformIsBSpline { false }
 
bool m_UseMetricSingleThreaded { true }
 
bool m_UseMultiThread { false }
 

Private Member Functions

 itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, PaddedParzenWindowHistogramGetValueAndDerivativePerThreadStruct, AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct)
 
 itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, ParzenWindowHistogramGetValueAndDerivativePerThreadStruct, PaddedParzenWindowHistogramGetValueAndDerivativePerThreadStruct)
 

Private Attributes

double m_FiniteDifferencePerturbation { 1.0 }
 
unsigned int m_FixedKernelBSplineOrder { 0 }
 
unsigned int m_MovingKernelBSplineOrder { 3 }
 
unsigned long m_NumberOfFixedHistogramBins { 32 }
 
unsigned long m_NumberOfMovingHistogramBins { 32 }
 
std::vector< AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct > m_ParzenWindowHistogramGetValueAndDerivativePerThreadVariables
 
ParzenWindowHistogramMultiThreaderParameterType m_ParzenWindowHistogramThreaderParameters {}
 
std::vector< JointPDFPointerm_ThreaderJointPDFs {}
 
bool m_UseDerivative { false }
 
bool m_UseExplicitPDFDerivatives { true }
 
bool m_UseFiniteDifferenceDerivative { false }
 

Member Typedef Documentation

◆ BSplineInterpolatorType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::BSplineInterpolatorType
protected

Typedefs used for computing image derivatives.

Definition at line 342 of file itkAdvancedImageToImageMetric.h.

◆ ConstPointer

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ConstPointer = SmartPointer<const Self>

Definition at line 85 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ DerivativeValueType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::DerivativeValueType

Definition at line 133 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageIndexType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexType
protected

Protected Typedefs Typedefs for indices and points.

Definition at line 334 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageIndexValueType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexValueType
protected

Definition at line 335 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageLimiterOutputType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageLimiterOutputType

Definition at line 150 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageLimiterType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageLimiterType

Typedefs for Limiter support.

Definition at line 148 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageMaskPointer

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageMaskPointer

Definition at line 125 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageMaskType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageMaskType

Definition at line 124 of file itkAdvancedImageToImageMetric.h.

◆ FixedImagePixelType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImagePixelType

Some useful extra typedefs.

Definition at line 137 of file itkAdvancedImageToImageMetric.h.

◆ FixedImagePointType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImagePointType
protected

Definition at line 337 of file itkAdvancedImageToImageMetric.h.

◆ ImageSampleContainerPointer

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ImageSampleContainerPointer

Definition at line 145 of file itkAdvancedImageToImageMetric.h.

◆ ImageSampleContainerType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ImageSampleContainerType

Definition at line 144 of file itkAdvancedImageToImageMetric.h.

◆ ImageSamplerPointer

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ImageSamplerPointer

Definition at line 143 of file itkAdvancedImageToImageMetric.h.

◆ ImageSamplerType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ImageSamplerType

Typedefs for the ImageSampler.

Definition at line 142 of file itkAdvancedImageToImageMetric.h.

◆ IncrementalMarginalPDFIndexType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFIndexType = IncrementalMarginalPDFType::IndexType
protected

◆ IncrementalMarginalPDFPointer

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFPointer = typename IncrementalMarginalPDFType::Pointer
protected

◆ IncrementalMarginalPDFRegionType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFRegionType = IncrementalMarginalPDFType::RegionType
protected

◆ IncrementalMarginalPDFSizeType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFSizeType = IncrementalMarginalPDFType::SizeType
protected

◆ IncrementalMarginalPDFType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFType = Image<PDFValueType, 2>
protected

◆ JointPDFDerivativesIndexType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesIndexType = JointPDFDerivativesType::IndexType
protected

◆ JointPDFDerivativesPointer

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesPointer = typename JointPDFDerivativesType::Pointer
protected

◆ JointPDFDerivativesRegionType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesRegionType = JointPDFDerivativesType::RegionType
protected

◆ JointPDFDerivativesSizeType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesSizeType = JointPDFDerivativesType::SizeType
protected

◆ JointPDFDerivativesType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesType = Image<PDFDerivativeValueType, 3>
protected

◆ JointPDFIndexType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFIndexType = JointPDFType::IndexType
protected

◆ JointPDFPointer

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFPointer = typename JointPDFType::Pointer
protected

◆ JointPDFRegionType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFRegionType = JointPDFType::RegionType
protected

◆ JointPDFSizeType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFSizeType = JointPDFType::SizeType
protected

◆ JointPDFType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFType = Image<PDFValueType, 2>
protected

◆ KernelFunctionPointer

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::KernelFunctionPointer = typename KernelFunctionType::Pointer
protected

◆ KernelFunctionType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::KernelFunctionType = KernelFunctionBase2<PDFValueType>
protected

Typedefs for Parzen kernel.

Definition at line 262 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ MarginalPDFType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MarginalPDFType = Array<PDFValueType>
protected

◆ MovingImageContinuousIndexType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageContinuousIndexType
protected

Definition at line 339 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageDerivativeScalesType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageDerivativeScalesType

Definition at line 139 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageDerivativeType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageDerivativeType
protected

Definition at line 353 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageIndexType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageIndexType
protected

Definition at line 336 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageLimiterOutputType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageLimiterOutputType

Definition at line 153 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageLimiterType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageLimiterType

Definition at line 151 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageMaskPointer

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageMaskPointer

Definition at line 128 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageMaskType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageMaskType

Definition at line 127 of file itkAdvancedImageToImageMetric.h.

◆ MovingImagePointType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImagePointType
protected

Definition at line 338 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageRegionType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageRegionType

Definition at line 138 of file itkAdvancedImageToImageMetric.h.

◆ NonZeroJacobianIndicesType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::NonZeroJacobianIndicesType
protected

Typedefs for support of sparse Jacobians and compact support of transformations.

Definition at line 356 of file itkAdvancedImageToImageMetric.h.

◆ OffsetValueType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::OffsetValueType = typename FixedImageType::OffsetValueType
protected

◆ ParzenValueContainerType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ParzenValueContainerType = Array<PDFValueType>
protected

◆ PDFDerivativeValueType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::PDFDerivativeValueType = float
protected

◆ PDFValueType

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::PDFValueType = double
protected

Typedefs for the PDFs and PDF derivatives.

Definition at line 241 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ Pointer

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::Pointer = SmartPointer<Self>

Definition at line 84 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ Self

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::Self = ParzenWindowHistogramImageToImageMetric

Standard class typedefs.

Definition at line 82 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ Superclass

template<class TFixedImage , class TMovingImage >
using itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::Superclass = AdvancedImageToImageMetric<TFixedImage, TMovingImage>

Definition at line 83 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ ThreadInfoType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ThreadInfoType

Typedef for multi-threading.

Definition at line 170 of file itkAdvancedImageToImageMetric.h.

Constructor & Destructor Documentation

◆ ParzenWindowHistogramImageToImageMetric()

template<class TFixedImage , class TMovingImage >
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ParzenWindowHistogramImageToImageMetric ( )
protected

The constructor.

◆ ~ParzenWindowHistogramImageToImageMetric()

template<class TFixedImage , class TMovingImage >
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::~ParzenWindowHistogramImageToImageMetric ( )
overrideprotecteddefault

The destructor.

Member Function Documentation

◆ AfterThreadedComputePDFs()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::AfterThreadedComputePDFs ( ) const
protected

Single-threadedly accumulate results.

◆ ComputeIncrementalMarginalPDFs()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ComputeIncrementalMarginalPDFs ( const JointPDFDerivativesType * incrementalPDF,
IncrementalMarginalPDFType * fixedIncrementalMarginalPDF,
IncrementalMarginalPDFType * movingIncrementalMarginalPDF ) const
protectedvirtual

Compute incremental marginal pdfs. Integrates the incremental PDF to obtain the fixed and moving marginal pdfs at once.

◆ ComputeMarginalPDF()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ComputeMarginalPDF ( const JointPDFType * jointPDF,
MarginalPDFType & marginalPDF,
const unsigned int direction ) const
protected

Compute marginal pdfs by summing over the joint pdf direction = 0: fixed marginal pdf direction = 1: moving marginal pdf

◆ ComputePDFs()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ComputePDFs ( const ParametersType & parameters) const
protectedvirtual

◆ ComputePDFsAndIncrementalPDFs()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ComputePDFsAndIncrementalPDFs ( const ParametersType & parameters) const
protectedvirtual

Compute PDFs and incremental pdfs (which you can use to compute finite difference estimate of the derivative). Loops over the fixed image samples and constructs the m_JointPDF, m_IncrementalJointPDF<Right/Left>, m_Alpha, and m_PerturbedAlpha<Right/Left>.

mu = input parameters vector jh(mu) = m_JointPDF(:,:) = joint histogram ihr(k) = m_IncrementalJointPDFRight(k,:,:) ihl(k) = m_IncrementalJointPDFLeft(k,:,:) a(mu) = m_Alpha par(k) = m_PerturbedAlphaRight(k) pal(k) = m_PerturbedAlphaLeft(k) size(ihr) = = size(ihl) = nrofparams * nrofmovingbins * nroffixedbins

ihr and ihl are determined such that: jh(mu+delta*e_k) = jh(mu) + ihr(k) jh(mu-delta*e_k) = jh(mu) + ihl(k) where e_k is the unit vector.

the pdf can be derived with: p(mu+delta*e_k) = ( par(k) ) * jh(mu+delta*e_k) p(mu-delta*e_k) = ( pal(k) ) * jh(mu-delta*e_k)

◆ ComputePDFsAndPDFDerivatives()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ComputePDFsAndPDFDerivatives ( const ParametersType & parameters) const
protectedvirtual

Compute PDFs and pdf derivatives; Loops over the fixed image samples and constructs the m_JointPDF, m_JointPDFDerivatives, and m_Alpha. The JointPDF and Alpha and its derivatives are related as follows: p = m_Alpha * m_JointPDF dp/dmu = m_Alpha * m_JointPDFDerivatives So, the JointPDF is more like a histogram than a true pdf... The histograms are left unnormalized since it may be faster to not do this explicitly.

◆ ComputePDFsSingleThreaded()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ComputePDFsSingleThreaded ( const ParametersType & parameters) const
protectedvirtual

Compute PDFs; Loops over the fixed image samples and constructs the m_JointPDF and m_Alpha The JointPDF and Alpha are related as follows: p = m_Alpha * m_JointPDF So, the JointPDF is more like a histogram than a true pdf... The histogram is left unnormalised since it may be faster to not do this explicitly.

◆ ComputePDFsThreaderCallback()

template<class TFixedImage , class TMovingImage >
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ComputePDFsThreaderCallback ( void * arg)
staticprotected

Helper function to launch the threads.

◆ EvaluateParzenValues()

template<class TFixedImage , class TMovingImage >
static void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::EvaluateParzenValues ( double parzenWindowTerm,
OffsetValueType parzenWindowIndex,
const KernelFunctionType & kernel,
PDFValueType * parzenValues )
staticprotected

Compute the Parzen values given an image value and a starting histogram index Compute the values at (parzenWindowIndex - parzenWindowTerm + k) for k = 0 ... kernelsize-1 Places the values in a buffer, which is supposed to have the right size already.

◆ GetClassName()

◆ GetDerivative()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetDerivative ( const ParametersType & parameters,
DerivativeType & Derivative ) const
override

Get the derivatives of the match measure. This method simply calls the the GetValueAndDerivative, since this will be mostly almost as fast as just computing the derivative.

◆ GetFiniteDifferencePerturbation()

template<class TFixedImage , class TMovingImage >
virtual double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetFiniteDifferencePerturbation ( ) const
virtual

◆ GetFixedKernelBSplineOrder()

template<class TFixedImage , class TMovingImage >
virtual unsigned int itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetFixedKernelBSplineOrder ( ) const
virtual

◆ GetMovingKernelBSplineOrder()

template<class TFixedImage , class TMovingImage >
virtual unsigned int itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetMovingKernelBSplineOrder ( ) const
virtual

◆ GetNumberOfFixedHistogramBins()

template<class TFixedImage , class TMovingImage >
virtual unsigned long itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfFixedHistogramBins ( ) const
virtual

◆ GetNumberOfMovingHistogramBins()

template<class TFixedImage , class TMovingImage >
virtual unsigned long itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfMovingHistogramBins ( ) const
virtual

◆ GetUseDerivative()

template<class TFixedImage , class TMovingImage >
virtual bool itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetUseDerivative ( ) const
virtual

◆ GetUseExplicitPDFDerivatives()

template<class TFixedImage , class TMovingImage >
virtual const bool & itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetUseExplicitPDFDerivatives ( )
virtual

◆ GetUseFiniteDifferenceDerivative()

template<class TFixedImage , class TMovingImage >
virtual bool itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetUseFiniteDifferenceDerivative ( ) const
virtual

◆ GetValueAndAnalyticDerivative()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndAnalyticDerivative ( const ParametersType & ,
MeasureType & ,
DerivativeType &  ) const
inlineprotectedvirtual

Get the value and analytic derivatives for single valued optimizers. Called by GetValueAndDerivative if UseFiniteDifferenceDerivative == false Implement this method in subclasses.

Reimplemented in itk::ParzenWindowMutualInformationImageToImageMetric< TFixedImage, TMovingImage >, and itk::ParzenWindowMutualInformationImageToImageMetric< MetricBase< TElastix >::FixedImageType, MetricBase< TElastix >::MovingImageType >.

Definition at line 455 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ GetValueAndDerivative()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivative ( const ParametersType & parameters,
MeasureType & value,
DerivativeType & derivative ) const
override

Get the value and derivatives for single valued optimizers. This method calls this->GetValueAndAnalyticDerivative or this->GetValueAndFiniteDifferenceDerivative, depending on the bool m_UseFiniteDifferenceDerivative.

◆ GetValueAndFiniteDifferenceDerivative()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndFiniteDifferenceDerivative ( const ParametersType & ,
MeasureType & ,
DerivativeType &  ) const
inlineprotectedvirtual

Get the value and finite difference derivatives for single valued optimizers. Called by GetValueAndDerivative if UseFiniteDifferenceDerivative == true Implement this method in subclasses.

Reimplemented in itk::ParzenWindowMutualInformationImageToImageMetric< TFixedImage, TMovingImage >, and itk::ParzenWindowMutualInformationImageToImageMetric< MetricBase< TElastix >::FixedImageType, MetricBase< TElastix >::MovingImageType >.

Definition at line 465 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ Initialize()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::Initialize ( )
override

Initialize the Metric by (1) Call the superclass' implementation (2) InitializeHistograms() (3) InitializeKernels() (4) Resize AlphaDerivatives

◆ InitializeHistograms()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::InitializeHistograms ( )
protectedvirtual

◆ InitializeKernels()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::InitializeKernels ( )
protectedvirtual

◆ InitializeThreadingParameters()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::InitializeThreadingParameters ( ) const
overrideprotectedvirtual

Initialize threading related parameters.

Reimplemented from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >.

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<class TFixedImage , class TMovingImage >
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ITK_DISALLOW_COPY_AND_MOVE ( ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage > )

◆ itkAlignedTypedef()

template<class TFixedImage , class TMovingImage >
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::itkAlignedTypedef ( ITK_CACHE_LINE_ALIGNMENT ,
PaddedParzenWindowHistogramGetValueAndDerivativePerThreadStruct ,
AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct  )
private

◆ itkPadStruct()

template<class TFixedImage , class TMovingImage >
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::itkPadStruct ( ITK_CACHE_LINE_ALIGNMENT ,
ParzenWindowHistogramGetValueAndDerivativePerThreadStruct ,
PaddedParzenWindowHistogramGetValueAndDerivativePerThreadStruct  )
private

◆ itkStaticConstMacro() [1/2]

template<class TFixedImage , class TMovingImage >
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::itkStaticConstMacro ( FixedImageDimension ,
unsigned int ,
FixedImageType::ImageDimension  )

The fixed image dimension.

◆ itkStaticConstMacro() [2/2]

template<class TFixedImage , class TMovingImage >
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::itkStaticConstMacro ( MovingImageDimension ,
unsigned int ,
MovingImageType::ImageDimension  )

The moving image dimension.

◆ LaunchComputePDFsThreaderCallback()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::LaunchComputePDFsThreaderCallback ( ) const
protected

Helper function to launch the threads.

◆ NormalizeJointPDF()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::NormalizeJointPDF ( JointPDFType * pdf,
const double factor ) const
protected

Multiply the pdf entries by the given normalization factor.

◆ NormalizeJointPDFDerivatives()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::NormalizeJointPDFDerivatives ( JointPDFDerivativesType * pdf,
const double factor ) const
protected

Multiply the pdf derivatives entries by the given normalization factor.

◆ PrintSelf()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::PrintSelf ( std::ostream & os,
Indent indent ) const
overrideprotected

Print Self.

◆ SetFiniteDifferencePerturbation()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::SetFiniteDifferencePerturbation ( double _arg)
virtual

For computing the finite difference derivative, the perturbation (delta) of the transform parameters; default: 1.0. mu_right= mu + delta*e_k

◆ SetFixedKernelBSplineOrder()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::SetFixedKernelBSplineOrder ( unsigned int _arg)
virtual

The B-spline order of the fixed Parzen window; default: 0

◆ SetMovingKernelBSplineOrder()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::SetMovingKernelBSplineOrder ( unsigned int _arg)
virtual

The B-spline order of the moving B-spline order; default: 3

◆ SetNumberOfFixedHistogramBins()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::SetNumberOfFixedHistogramBins ( unsigned long _arg)
virtual

Number of bins to use for the fixed image in the histogram. Typical value is 32. The minimum value is 4 due to the padding required by the Parzen windowing with a cubic B-spline kernel. Note that even if the metric is used on binary images, the number of bins should at least be equal to four.

◆ SetNumberOfMovingHistogramBins()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::SetNumberOfMovingHistogramBins ( unsigned long _arg)
virtual

Number of bins to use for the moving image in the histogram. Typical value is 32. The minimum value is 4 due to the padding required by the Parzen windowing with a cubic B-spline kernel. Note that even if the metric is used on binary images, the number of bins should at least be equal to four.

◆ SetUseDerivative()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::SetUseDerivative ( bool _arg)
virtual

Whether you plan to call the GetDerivative/GetValueAndDerivative method or not. This option should be set before calling Initialize(); Default: false.

◆ SetUseExplicitPDFDerivatives()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::SetUseExplicitPDFDerivatives ( bool _arg)
virtual

Option to use explicit PDF derivatives, which requires a lot of memory in case of many parameters.

◆ SetUseFiniteDifferenceDerivative()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::SetUseFiniteDifferenceDerivative ( bool _arg)
virtual

Whether you want to use a finite difference implementation of the metric's derivative. This option should be set before calling Initialize(); Default: false.

◆ ThreadedComputePDFs()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ThreadedComputePDFs ( ThreadIdType threadId)
protected

Multi-threaded versions of the ComputePDF function.

◆ UpdateJointPDFAndDerivatives()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::UpdateJointPDFAndDerivatives ( const RealType fixedImageValue,
const RealType movingImageValue,
const DerivativeType * imageJacobian,
const NonZeroJacobianIndicesType * nzji,
JointPDFType * jointPDF ) const
protectedvirtual

Update the joint PDF with a pixel pair; on demand also updates the pdf derivatives (if the Jacobian pointers are nonzero).

◆ UpdateJointPDFAndIncrementalPDFs()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::UpdateJointPDFAndIncrementalPDFs ( RealType fixedImageValue,
RealType movingImageValue,
RealType movingMaskValue,
const DerivativeType & movingImageValuesRight,
const DerivativeType & movingImageValuesLeft,
const DerivativeType & movingMaskValuesRight,
const DerivativeType & movingMaskValuesLeft,
const NonZeroJacobianIndicesType & nzji ) const
protectedvirtual

Update the joint PDF and the incremental pdfs. The input is a pixel pair (fixed, moving, moving mask) and a set of moving image/mask values when using mu+delta*e_k, for each k that has a nonzero Jacobian. And for mu-delta*e_k of course. Also updates the PerturbedAlpha's This function is used when UseFiniteDifferenceDerivative is true.

Todo
The IsInsideMovingMask return bools are converted to doubles (1 or 0) to simplify the computation. But this may not be necessary.

◆ UpdateJointPDFDerivatives()

template<class TFixedImage , class TMovingImage >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::UpdateJointPDFDerivatives ( const JointPDFIndexType & pdfIndex,
double factor,
const DerivativeType & imageJacobian,
const NonZeroJacobianIndicesType & nzji ) const
protected

Update the pdf derivatives adds -image_jac[mu]*factor to the bin with index [ mu, pdfIndex[0], pdfIndex[1] ] for all mu. This function should only be called from UpdateJointPDFAndDerivatives.

◆ UseExplicitPDFDerivativesOff()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::UseExplicitPDFDerivativesOff ( )
virtual

◆ UseExplicitPDFDerivativesOn()

template<class TFixedImage , class TMovingImage >
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::UseExplicitPDFDerivativesOn ( )
virtual

Field Documentation

◆ m_Alpha

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_Alpha { 0.0 }
mutableprotected

Protected variables **************************** Variables for Alpha (the normalization factor of the histogram).

Definition at line 268 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_DerivativeMovingKernel

template<class TFixedImage , class TMovingImage >
KernelFunctionPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_DerivativeMovingKernel { nullptr }
protected

◆ m_FiniteDifferencePerturbation

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FiniteDifferencePerturbation { 1.0 }
private

◆ m_FixedImageBinSize

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageBinSize { 0.0 }
protected

◆ m_FixedImageMarginalPDF

template<class TFixedImage , class TMovingImage >
MarginalPDFType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageMarginalPDF {}
mutableprotected

Variables for the pdfs (actually: histograms).

Definition at line 273 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_FixedImageNormalizedMin

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageNormalizedMin { 0.0 }
protected

◆ m_FixedIncrementalMarginalPDFLeft

template<class TFixedImage , class TMovingImage >
IncrementalMarginalPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedIncrementalMarginalPDFLeft { nullptr }
protected

◆ m_FixedIncrementalMarginalPDFRight

template<class TFixedImage , class TMovingImage >
IncrementalMarginalPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedIncrementalMarginalPDFRight { nullptr }
protected

◆ m_FixedKernel

template<class TFixedImage , class TMovingImage >
KernelFunctionPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedKernel { nullptr }
protected

Kernels for computing Parzen histograms and derivatives.

Definition at line 292 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_FixedKernelBSplineOrder

template<class TFixedImage , class TMovingImage >
unsigned int itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedKernelBSplineOrder { 0 }
private

◆ m_FixedParzenTermToIndexOffset

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedParzenTermToIndexOffset { 0.5 }
protected

◆ m_IncrementalJointPDFLeft

template<class TFixedImage , class TMovingImage >
JointPDFDerivativesPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_IncrementalJointPDFLeft {}
protected

◆ m_IncrementalJointPDFRight

template<class TFixedImage , class TMovingImage >
JointPDFDerivativesPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_IncrementalJointPDFRight {}
protected

◆ m_JointPDF

template<class TFixedImage , class TMovingImage >
JointPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_JointPDF { nullptr }
protected

◆ m_JointPDFDerivatives

template<class TFixedImage , class TMovingImage >
JointPDFDerivativesPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_JointPDFDerivatives { nullptr }
protected

◆ m_JointPDFWindow

template<class TFixedImage , class TMovingImage >
JointPDFRegionType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_JointPDFWindow {}
mutableprotected

◆ m_MovingImageBinSize

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingImageBinSize { 0.0 }
protected

◆ m_MovingImageMarginalPDF

template<class TFixedImage , class TMovingImage >
MarginalPDFType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingImageMarginalPDF {}
mutableprotected

◆ m_MovingImageNormalizedMin

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingImageNormalizedMin { 0.0 }
protected

◆ m_MovingIncrementalMarginalPDFLeft

template<class TFixedImage , class TMovingImage >
IncrementalMarginalPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingIncrementalMarginalPDFLeft { nullptr }
protected

◆ m_MovingIncrementalMarginalPDFRight

template<class TFixedImage , class TMovingImage >
IncrementalMarginalPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingIncrementalMarginalPDFRight { nullptr }
protected

◆ m_MovingKernel

template<class TFixedImage , class TMovingImage >
KernelFunctionPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingKernel { nullptr }
protected

◆ m_MovingKernelBSplineOrder

template<class TFixedImage , class TMovingImage >
unsigned int itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingKernelBSplineOrder { 3 }
private

◆ m_MovingParzenTermToIndexOffset

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingParzenTermToIndexOffset { -1.0 }
protected

◆ m_NumberOfFixedHistogramBins

template<class TFixedImage , class TMovingImage >
unsigned long itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfFixedHistogramBins { 32 }
private

Variables that can/should be accessed by their Set/Get functions.

Definition at line 498 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_NumberOfMovingHistogramBins

template<class TFixedImage , class TMovingImage >
unsigned long itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfMovingHistogramBins { 32 }
private

◆ m_ParzenWindowHistogramGetValueAndDerivativePerThreadVariables

template<class TFixedImage , class TMovingImage >
std::vector<AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct> itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_ParzenWindowHistogramGetValueAndDerivativePerThreadVariables
mutableprivate

◆ m_ParzenWindowHistogramThreaderParameters

template<class TFixedImage , class TMovingImage >
ParzenWindowHistogramMultiThreaderParameterType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_ParzenWindowHistogramThreaderParameters {}
private

◆ m_PerturbedAlphaLeft

template<class TFixedImage , class TMovingImage >
DerivativeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_PerturbedAlphaLeft {}
mutableprotected

◆ m_PerturbedAlphaRight

template<class TFixedImage , class TMovingImage >
DerivativeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_PerturbedAlphaRight {}
mutableprotected

◆ m_ThreaderJointPDFs

template<class TFixedImage , class TMovingImage >
std::vector<JointPDFPointer> itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_ThreaderJointPDFs {}
mutableprivate

Threading related parameters.

Definition at line 472 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_UseDerivative

template<class TFixedImage , class TMovingImage >
bool itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_UseDerivative { false }
private

◆ m_UseExplicitPDFDerivatives

template<class TFixedImage , class TMovingImage >
bool itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_UseExplicitPDFDerivatives { true }
private

◆ m_UseFiniteDifferenceDerivative

template<class TFixedImage , class TMovingImage >
bool itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_UseFiniteDifferenceDerivative { false }
private


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo