go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Data Structures | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
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:

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 >:
Inheritance graph
[legend]

Data Structures

struct  ParzenWindowHistogramGetValueAndDerivativePerThreadStruct
 
struct  ParzenWindowHistogramMultiThreaderParameterType
 

Public Types

using ConstPointer = SmartPointer< const Self >
 
using DerivativeValueType = typename DerivativeType::ValueType
 
using FixedImageLimiterOutputType = typename FixedImageLimiterType::OutputType
 
using FixedImageLimiterType = LimiterFunctionBase< RealType, FixedImageDimension >
 
using FixedImagePixelType = typename FixedImageType::PixelType
 
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 MovingImageLimiterType = LimiterFunctionBase< RealType, MovingImageDimension >
 
using MovingImageRegionType = typename MovingImageType::RegionType
 
using Pointer = SmartPointer< Self >
 
using Self = ParzenWindowHistogramImageToImageMetric
 
using Superclass = AdvancedImageToImageMetric< TFixedImage, TMovingImage >
 
using ThreaderType = itk::PlatformMultiThreader
 
using ThreadInfoType = typename ThreaderType::WorkUnitInfo
 
- 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 FixedImageMaskSpatialObject2Type = ImageMaskSpatialObject< Self::FixedImageDimension >
 
using FixedImagePixelType = typename FixedImageType::PixelType
 
using FixedImagePointer = typename FixedImageType::Pointer
 
using HessianType = vnl_sparse_matrix< HessianValueType >
 
using HessianValueType = typename DerivativeType::ValueType
 
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 MovingImageMaskSpatialObject2Type = 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 ThreaderType = itk::PlatformMultiThreader
 
using ThreadInfoType = typename ThreaderType::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 char * GetClassName () const
 
virtual const FixedImageLimiterTypeGetFixedImageLimiter ()
 
virtual double GetFixedLimitRangeRatio () const
 
virtual ImageSamplerTypeGetImageSampler () const
 
virtual const MovingImageDerivativeScalesTypeGetMovingImageDerivativeScales ()
 
virtual const MovingImageLimiterTypeGetMovingImageLimiter ()
 
virtual double GetMovingLimitRangeRatio () const
 
virtual double GetRequiredRatioOfValidSamples () const
 
virtual bool GetScaleGradientWithRespectToMovingImageOrientation () const
 
virtual void GetSelfHessian (const TransformParametersType &parameters, HessianType &H) const
 
const AdvancedTransformTypeGetTransform () const 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 SetFixedLimitRangeRatio (double _arg)
 
virtual void SetImageSampler (ImageSamplerType *_arg)
 
virtual void SetMovingImageDerivativeScales (MovingImageDerivativeScalesType _arg)
 
virtual void SetMovingImageLimiter (MovingImageLimiterType *_arg)
 
virtual void SetMovingLimitRangeRatio (double _arg)
 
virtual void SetNumberOfWorkUnits (ThreadIdType numberOfThreads)
 
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 = BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double >
 
using CentralDifferenceGradientFilterType = GradientImageFilter< MovingImageType, RealType, RealType >
 
using FixedImageIndexType = typename FixedImageType::IndexType
 
using FixedImageIndexValueType = typename FixedImageIndexType::IndexValueType
 
using FixedImagePointType = typename TransformType::InputPointType
 
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 = typename InterpolatorType::ContinuousIndexType
 
using MovingImageDerivativeType = typename BSplineInterpolatorType::CovariantVectorType
 
using MovingImageIndexType = typename MovingImageType::IndexType
 
using MovingImagePointType = typename TransformType::OutputPointType
 
using NonZeroJacobianIndicesType = typename AdvancedTransformType::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 = BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, float >
 
using BSplineInterpolatorPointer = typename BSplineInterpolatorType::Pointer
 
using BSplineInterpolatorType = BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double >
 
using CentralDifferenceGradientFilterPointer = typename CentralDifferenceGradientFilterType::Pointer
 
using CentralDifferenceGradientFilterType = GradientImageFilter< MovingImageType, RealType, RealType >
 
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 = ReducedDimensionBSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double >
 

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
 
void EvaluateParzenValues (double parzenWindowTerm, OffsetValueType parzenWindowIndex, const KernelFunctionType *kernel, ParzenValueContainerType &parzenValues) 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 &value) const
 
virtual void AfterThreadedGetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const
 
virtual void CheckForAdvancedTransform ()
 
virtual void CheckForBSplineInterpolator ()
 
virtual void CheckForBSplineTransform () const
 
virtual void CheckNumberOfSamples (unsigned long wanted, unsigned long found) const
 
virtual bool EvaluateMovingImageValueAndDerivative (const MovingImagePointType &mappedPoint, RealType &movingImageValue, MovingImageDerivativeType *gradient) const
 
virtual 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 ()
 
virtual void InitializeLimiters ()
 
virtual void InitializeThreadingParameters () const
 
virtual bool IsInsideMovingMask (const MovingImagePointType &point) const
 
 itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, PaddedGetValueAndDerivativePerThreadStruct, AlignedGetValueAndDerivativePerThreadStruct)
 
 itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, PaddedGetValuePerThreadStruct, AlignedGetValuePerThreadStruct)
 
 itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, GetValueAndDerivativePerThreadStruct, PaddedGetValueAndDerivativePerThreadStruct)
 
 itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, GetValuePerThreadStruct, PaddedGetValuePerThreadStruct)
 
void LaunchGetValueAndDerivativeThreaderCallback () const
 
void LaunchGetValueThreaderCallback () const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetUseFixedImageLimiter (bool _arg)
 
virtual void SetUseImageSampler (bool _arg)
 
virtual void SetUseMovingImageLimiter (bool _arg)
 
virtual void ThreadedGetValue (ThreadIdType threadID)
 
virtual void ThreadedGetValueAndDerivative (ThreadIdType threadID)
 
MovingImagePointType TransformPoint (const FixedImagePointType &fixedImagePoint) const
 
 ~AdvancedImageToImageMetric () override=default
 

Static Protected Member Functions

static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ComputePDFsThreaderCallback (void *arg)
 
- 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
 
KernelFunctionPointer m_DerivativeMovingKernel
 
double m_FixedImageBinSize
 
MarginalPDFType m_FixedImageMarginalPDF
 
double m_FixedImageNormalizedMin
 
IncrementalMarginalPDFPointer m_FixedIncrementalMarginalPDFLeft
 
IncrementalMarginalPDFPointer m_FixedIncrementalMarginalPDFRight
 
KernelFunctionPointer m_FixedKernel
 
double m_FixedParzenTermToIndexOffset
 
JointPDFDerivativesPointer m_IncrementalJointPDFLeft
 
JointPDFDerivativesPointer m_IncrementalJointPDFRight
 
JointPDFPointer m_JointPDF
 
JointPDFDerivativesPointer m_JointPDFDerivatives
 
JointPDFRegionType m_JointPDFWindow
 
double m_MovingImageBinSize
 
MarginalPDFType m_MovingImageMarginalPDF
 
double m_MovingImageNormalizedMin
 
IncrementalMarginalPDFPointer m_MovingIncrementalMarginalPDFLeft
 
IncrementalMarginalPDFPointer m_MovingIncrementalMarginalPDFRight
 
KernelFunctionPointer m_MovingKernel
 
double m_MovingParzenTermToIndexOffset
 
DerivativeType m_PerturbedAlphaLeft
 
DerivativeType m_PerturbedAlphaRight
 
- Protected Attributes inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
AdvancedTransformType::Pointer m_AdvancedTransform { nullptr }
 
BSplineInterpolatorPointer m_BSplineInterpolator { nullptr }
 
BSplineInterpolatorFloatPointer m_BSplineInterpolatorFloat { nullptr }
 
CentralDifferenceGradientFilterPointer m_CentralDifferenceGradientFilter { nullptr }
 
FixedImageLimiterPointer m_FixedImageLimiter { 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 }
 
std::unique_ptr< AlignedGetValuePerThreadStruct[]> m_GetValuePerThreadVariables { nullptr }
 
ThreadIdType m_GetValuePerThreadVariablesSize { 0 }
 
ImageSamplerPointer m_ImageSampler { nullptr }
 
bool m_InterpolatorIsBSpline { false }
 
bool m_InterpolatorIsBSplineFloat { false }
 
bool m_InterpolatorIsLinear { false }
 
bool m_InterpolatorIsReducedBSpline { false }
 
LinearInterpolatorPointer m_LinearInterpolator { nullptr }
 
MovingImageLimiterPointer m_MovingImageLimiter { nullptr }
 
MovingImageLimiterOutputType m_MovingImageMaxLimit { 1 }
 
MovingImageLimiterOutputType m_MovingImageMinLimit { 0 }
 
MovingImagePixelType m_MovingImageTrueMax { 1 }
 
MovingImagePixelType m_MovingImageTrueMin { 0 }
 
double m_MovingLimitRangeRatio { 0.01 }
 
ReducedBSplineInterpolatorPointer m_ReducedBSplineInterpolator { nullptr }
 
MultiThreaderParameterType m_ThreaderMetricParameters
 
bool m_TransformIsAdvanced { false }
 
bool m_TransformIsBSpline { false }
 
bool m_UseMetricSingleThreaded { true }
 
bool m_UseMultiThread { false }
 
bool m_UseOpenMP
 

Private Member Functions

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

Private Attributes

double m_FiniteDifferencePerturbation
 
unsigned int m_FixedKernelBSplineOrder
 
unsigned int m_MovingKernelBSplineOrder
 
unsigned long m_NumberOfFixedHistogramBins
 
unsigned long m_NumberOfMovingHistogramBins
 
std::vector< AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct > m_ParzenWindowHistogramGetValueAndDerivativePerThreadVariables
 
ParzenWindowHistogramMultiThreaderParameterType m_ParzenWindowHistogramThreaderParameters
 
std::vector< JointPDFPointerm_ThreaderJointPDFs
 
bool m_UseDerivative
 
bool m_UseExplicitPDFDerivatives
 
bool m_UseFiniteDifferenceDerivative
 

Member Typedef Documentation

◆ BSplineInterpolatorType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::BSplineInterpolatorType = BSplineInterpolateImageFunction<MovingImageType, CoordinateRepresentationType, double>
protected

Typedefs used for computing image derivatives.

Definition at line 321 of file itkAdvancedImageToImageMetric.h.

◆ CentralDifferenceGradientFilterType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::CentralDifferenceGradientFilterType = GradientImageFilter<MovingImageType, RealType, RealType>
protected

Definition at line 333 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 = typename DerivativeType::ValueType

Definition at line 131 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageIndexType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexType = typename FixedImageType::IndexType
protected

Protected Typedefs Typedefs for indices and points.

Definition at line 313 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageIndexValueType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexValueType = typename FixedImageIndexType::IndexValueType
protected

Definition at line 314 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageLimiterOutputType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageLimiterOutputType = typename FixedImageLimiterType::OutputType

Definition at line 151 of file itkAdvancedImageToImageMetric.h.

◆ FixedImageLimiterType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImageLimiterType = LimiterFunctionBase<RealType, FixedImageDimension>

Typedefs for Limiter support.

Definition at line 149 of file itkAdvancedImageToImageMetric.h.

◆ FixedImagePixelType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImagePixelType = typename FixedImageType::PixelType

Some useful extra typedefs.

Definition at line 138 of file itkAdvancedImageToImageMetric.h.

◆ FixedImagePointType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::FixedImagePointType = typename TransformType::InputPointType
protected

Definition at line 316 of file itkAdvancedImageToImageMetric.h.

◆ ImageSampleContainerPointer

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ImageSampleContainerPointer = typename ImageSamplerType::OutputVectorContainerPointer

Definition at line 146 of file itkAdvancedImageToImageMetric.h.

◆ ImageSampleContainerType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ImageSampleContainerType = typename ImageSamplerType::OutputVectorContainerType

Definition at line 145 of file itkAdvancedImageToImageMetric.h.

◆ ImageSamplerPointer

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ImageSamplerPointer = typename ImageSamplerType::Pointer

Definition at line 144 of file itkAdvancedImageToImageMetric.h.

◆ ImageSamplerType

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

Typedefs for the ImageSampler.

Definition at line 143 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 266 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 = typename InterpolatorType::ContinuousIndexType
protected

Definition at line 318 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageDerivativeScalesType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageDerivativeScalesType = FixedArray<double, Self::MovingImageDimension>

Definition at line 140 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageDerivativeType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageDerivativeType = typename BSplineInterpolatorType::CovariantVectorType
protected

Definition at line 332 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageIndexType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageIndexType = typename MovingImageType::IndexType
protected

Definition at line 315 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageLimiterOutputType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageLimiterOutputType = typename MovingImageLimiterType::OutputType

Definition at line 154 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageLimiterType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageLimiterType = LimiterFunctionBase<RealType, MovingImageDimension>

Definition at line 152 of file itkAdvancedImageToImageMetric.h.

◆ MovingImagePointType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImagePointType = typename TransformType::OutputPointType
protected

Definition at line 317 of file itkAdvancedImageToImageMetric.h.

◆ MovingImageRegionType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::MovingImageRegionType = typename MovingImageType::RegionType

Definition at line 139 of file itkAdvancedImageToImageMetric.h.

◆ NonZeroJacobianIndicesType

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

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

Definition at line 337 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 245 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.

◆ ThreaderType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ThreaderType = itk::PlatformMultiThreader

Typedefs for multi-threading.

Definition at line 175 of file itkAdvancedImageToImageMetric.h.

◆ ThreadInfoType

template<class TFixedImage , class TMovingImage >
using itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >::ThreadInfoType = typename ThreaderType::WorkUnitInfo

Definition at line 176 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 >
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::EvaluateParzenValues ( double  parzenWindowTerm,
OffsetValueType  parzenWindowIndex,
const KernelFunctionType kernel,
ParzenValueContainerType parzenValues 
) const
protected

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 Returns the values in a ParzenValueContainer, which is supposed to have the right size already.

◆ GetClassName()

template<class TFixedImage , class TMovingImage >
virtual const char * itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetClassName ( ) const
virtual

◆ 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 460 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 470 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
mutableprotected

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

Definition at line 272 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_DerivativeMovingKernel

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

◆ m_FiniteDifferencePerturbation

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

◆ m_FixedImageBinSize

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageBinSize
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 277 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_FixedImageNormalizedMin

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

◆ m_FixedIncrementalMarginalPDFLeft

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

◆ m_FixedIncrementalMarginalPDFRight

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

◆ m_FixedKernel

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

Kernels for computing Parzen histograms and derivatives.

Definition at line 296 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_FixedKernelBSplineOrder

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

◆ m_FixedParzenTermToIndexOffset

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedParzenTermToIndexOffset
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
protected

◆ m_JointPDFDerivatives

template<class TFixedImage , class TMovingImage >
JointPDFDerivativesPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_JointPDFDerivatives
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
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
protected

◆ m_MovingIncrementalMarginalPDFLeft

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

◆ m_MovingIncrementalMarginalPDFRight

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

◆ m_MovingKernel

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

◆ m_MovingKernelBSplineOrder

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

◆ m_MovingParzenTermToIndexOffset

template<class TFixedImage , class TMovingImage >
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingParzenTermToIndexOffset
protected

◆ m_NumberOfFixedHistogramBins

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

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

Definition at line 503 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_NumberOfMovingHistogramBins

template<class TFixedImage , class TMovingImage >
unsigned long itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfMovingHistogramBins
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 477 of file itkParzenWindowHistogramImageToImageMetric.h.

◆ m_UseDerivative

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

◆ m_UseExplicitPDFDerivatives

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

◆ m_UseFiniteDifferenceDerivative

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


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo