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.

One 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 73 of file itkParzenWindowHistogramImageToImageMetric.h.

Inheritance diagram for itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >:
Inheritance graph
[legend]

Data Structures

struct  ParzenWindowHistogramGetValueAndDerivativePerThreadStruct
 
struct  ParzenWindowHistogramMultiThreaderParameterType
 

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::CoordinateRepresentationType CoordinateRepresentationType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::DerivativeValueType DerivativeValueType
 
typedef Superclass::FixedImageConstPointer FixedImageConstPointer
 
typedef Superclass::FixedImageLimiterOutputType FixedImageLimiterOutputType
 
typedef Superclass::FixedImageLimiterType FixedImageLimiterType
 
typedef Superclass::FixedImageMaskPointer FixedImageMaskPointer
 
typedef Superclass::FixedImageMaskType FixedImageMaskType
 
typedef Superclass::FixedImagePixelType FixedImagePixelType
 
typedef Superclass::FixedImageRegionType FixedImageRegionType
 
typedef Superclass::FixedImageType FixedImageType
 
typedef Superclass::GradientImageFilterPointer GradientImageFilterPointer
 
typedef Superclass::GradientImageFilterType GradientImageFilterType
 
typedef Superclass::GradientImagePointer GradientImagePointer
 
typedef Superclass::GradientImageType GradientImageType
 
typedef Superclass::GradientPixelType GradientPixelType
 
typedef Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
 
typedef Superclass::ImageSampleContainerType ImageSampleContainerType
 
typedef Superclass::ImageSamplerPointer ImageSamplerPointer
 
typedef Superclass::ImageSamplerType ImageSamplerType
 
typedef Superclass::InputPointType InputPointType
 
typedef Superclass::InterpolatorPointer InterpolatorPointer
 
typedef Superclass::InterpolatorType InterpolatorType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::MovingImageConstPointer MovingImageConstPointer
 
typedef Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
 
typedef Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
 
typedef Superclass::MovingImageLimiterType MovingImageLimiterType
 
typedef Superclass::MovingImageMaskPointer MovingImageMaskPointer
 
typedef Superclass::MovingImageMaskType MovingImageMaskType
 
typedef Superclass::MovingImagePixelType MovingImagePixelType
 
typedef Superclass::MovingImageRegionType MovingImageRegionType
 
typedef Superclass::MovingImageType MovingImageType
 
typedef Superclass::OutputPointType OutputPointType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RealType RealType
 
typedef ParzenWindowHistogramImageToImageMetric Self
 
typedef AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
 
typedef Superclass::ThreaderType ThreaderType
 
typedef Superclass::ThreadInfoType ThreadInfoType
 
typedef Superclass::TransformJacobianType TransformJacobianType
 
typedef Superclass::TransformParametersType TransformParametersType
 
typedef Superclass::TransformPointer TransformPointer
 
typedef Superclass::TransformType TransformType
 
- Public Types inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
typedef AdvancedTransform< ScalarType, FixedImageDimension, MovingImageDimension > AdvancedTransformType
 
typedef AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 > BSplineOrder1TransformType
 
typedef AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 2 > BSplineOrder2TransformType
 
typedef AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 3 > BSplineOrder3TransformType
 
typedef AdvancedCombinationTransform< ScalarType, FixedImageDimension > CombinationTransformType
 
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::CoordinateRepresentationType CoordinateRepresentationType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef DerivativeType::ValueType DerivativeValueType
 
typedef Superclass::FixedImageConstPointer FixedImageConstPointer
 
typedef FixedImageLimiterType::OutputType FixedImageLimiterOutputType
 
typedef FixedImageLimiterType::Pointer FixedImageLimiterPointer
 
typedef LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
 
typedef Superclass::FixedImageMaskPointer FixedImageMaskPointer
 
typedef Superclass::FixedImageMaskType FixedImageMaskType
 
typedef FixedImageType::PixelType FixedImagePixelType
 
typedef FixedImageType::Pointer FixedImagePointer
 
typedef Superclass::FixedImageRegionType FixedImageRegionType
 
typedef Superclass::FixedImageType FixedImageType
 
typedef Superclass::GradientImageFilterPointer GradientImageFilterPointer
 
typedef Superclass::GradientImageFilterType GradientImageFilterType
 
typedef Superclass::GradientImagePointer GradientImagePointer
 
typedef Superclass::GradientImageType GradientImageType
 
typedef Superclass::GradientPixelType GradientPixelType
 
typedef vnl_sparse_matrix< HessianValueTypeHessianType
 
typedef DerivativeType::ValueType HessianValueType
 
typedef ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
 
typedef ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
 
typedef ImageSamplerType::Pointer ImageSamplerPointer
 
typedef ImageSamplerBase< FixedImageTypeImageSamplerType
 
typedef Superclass::InputPointType InputPointType
 
typedef Superclass::InterpolatorPointer InterpolatorPointer
 
typedef Superclass::InterpolatorType InterpolatorType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::MovingImageConstPointer MovingImageConstPointer
 
typedef FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
 
typedef MovingImageLimiterType::OutputType MovingImageLimiterOutputType
 
typedef MovingImageLimiterType::Pointer MovingImageLimiterPointer
 
typedef LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
 
typedef Superclass::MovingImageMaskPointer MovingImageMaskPointer
 
typedef Superclass::MovingImageMaskType MovingImageMaskType
 
typedef Superclass::MovingImagePixelType MovingImagePixelType
 
typedef MovingImageType::Pointer MovingImagePointer
 
typedef MovingImageType::RegionType MovingImageRegionType
 
typedef Superclass::MovingImageType MovingImageType
 
typedef AdvancedTransformType::NumberOfParametersType NumberOfParametersType
 
typedef Superclass::OutputPointType OutputPointType
 
typedef Superclass::ParametersType ParametersType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RealType RealType
 
typedef TransformType::ScalarType ScalarType
 
typedef AdvancedImageToImageMetric Self
 
typedef ImageToImageMetric< TFixedImage, TMovingImage > Superclass
 
typedef itk::MultiThreader ThreaderType
 
typedef ThreaderType::ThreadInfoStruct ThreadInfoType
 
typedef Superclass::TransformJacobianType TransformJacobianType
 
typedef Superclass::TransformParametersType TransformParametersType
 
typedef Superclass::TransformPointer TransformPointer
 
typedef Superclass::TransformType TransformType
 

Public Member Functions

virtual const char * GetClassName () const
 
void GetDerivative (const ParametersType &parameters, DerivativeType &Derivative) const
 
virtual double GetFiniteDifferencePerturbation () const
 
virtual unsigned int GetFixedKernelBSplineOrder () const
 
virtual unsigned int GetMovingKernelBSplineOrder () const
 
virtual unsigned long GetNumberOfFixedHistogramBins ()
 
virtual unsigned long GetNumberOfMovingHistogramBins ()
 
virtual bool GetUseDerivative () const
 
virtual const boolGetUseExplicitPDFDerivatives ()
 
virtual bool GetUseFiniteDifferenceDerivative () const
 
void GetValueAndDerivative (const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
 
void Initialize (void) throw ( ExceptionObject )
 
 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 ()
 
virtual double GetFixedLimitRangeRatio () const
 
virtual ImageSamplerTypeGetImageSampler (void) 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 (void) const
 
virtual bool GetUseFixedImageLimiter () const
 
virtual bool GetUseImageSampler () const
 
virtual const boolGetUseMetricSingleThreaded ()
 
virtual bool GetUseMovingImageDerivativeScales () const
 
virtual bool GetUseMovingImageLimiter () const
 
virtual const boolGetUseMultiThread ()
 
 itkStaticConstMacro (MovingImageDimension, unsigned int, TMovingImage::ImageDimension)
 
 itkStaticConstMacro (FixedImageDimension, unsigned int, TFixedImage::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 SetNumberOfThreads (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

typedef Superclass::BSplineInterpolatorType BSplineInterpolatorType
 
typedef Superclass::CentralDifferenceGradientFilterType CentralDifferenceGradientFilterType
 
typedef Superclass::FixedImageIndexType FixedImageIndexType
 
typedef Superclass::FixedImageIndexValueType FixedImageIndexValueType
 
typedef Superclass::FixedImagePointType FixedImagePointType
 
typedef IncrementalMarginalPDFType::IndexType IncrementalMarginalPDFIndexType
 
typedef IncrementalMarginalPDFType::Pointer IncrementalMarginalPDFPointer
 
typedef IncrementalMarginalPDFType::RegionType IncrementalMarginalPDFRegionType
 
typedef IncrementalMarginalPDFType::SizeType IncrementalMarginalPDFSizeType
 
typedef Image< PDFValueType, 2 > IncrementalMarginalPDFType
 
typedef JointPDFDerivativesType::IndexType JointPDFDerivativesIndexType
 
typedef JointPDFDerivativesType::Pointer JointPDFDerivativesPointer
 
typedef JointPDFDerivativesType::RegionType JointPDFDerivativesRegionType
 
typedef JointPDFDerivativesType::SizeType JointPDFDerivativesSizeType
 
typedef Image< PDFDerivativeValueType, 3 > JointPDFDerivativesType
 
typedef JointPDFType::IndexType JointPDFIndexType
 
typedef JointPDFType::Pointer JointPDFPointer
 
typedef JointPDFType::RegionType JointPDFRegionType
 
typedef JointPDFType::SizeType JointPDFSizeType
 
typedef Image< PDFValueType, 2 > JointPDFType
 
typedef KernelFunctionType::Pointer KernelFunctionPointer
 
typedef KernelFunctionBase< PDFValueTypeKernelFunctionType
 
typedef Array< PDFValueTypeMarginalPDFType
 
typedef Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
 
typedef Superclass::MovingImageDerivativeType MovingImageDerivativeType
 
typedef Superclass::MovingImageIndexType MovingImageIndexType
 
typedef Superclass::MovingImagePointType MovingImagePointType
 
typedef Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
 
typedef FixedImageType::OffsetValueType OffsetValueType
 
typedef Array< PDFValueTypeParzenValueContainerType
 
typedef float PDFDerivativeValueType
 
typedef double PDFValueType
 
- Protected Types inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
typedef BSplineInterpolatorFloatType::Pointer BSplineInterpolatorFloatPointer
 
typedef BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, floatBSplineInterpolatorFloatType
 
typedef BSplineInterpolatorType::Pointer BSplineInterpolatorPointer
 
typedef BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, doubleBSplineInterpolatorType
 
typedef CentralDifferenceGradientFilterType::Pointer CentralDifferenceGradientFilterPointer
 
typedef GradientImageFilter< MovingImageType, RealType, RealTypeCentralDifferenceGradientFilterType
 
typedef FixedImageType::IndexType FixedImageIndexType
 
typedef FixedImageIndexType::IndexValueType FixedImageIndexValueType
 
typedef TransformType::InputPointType FixedImagePointType
 
typedef LinearInterpolatorType::Pointer LinearInterpolatorPointer
 
typedef AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationTypeLinearInterpolatorType
 
typedef InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
 
typedef BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
 
typedef MovingImageType::IndexType MovingImageIndexType
 
typedef TransformType::OutputPointType MovingImagePointType
 
typedef AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
 
typedef ReducedBSplineInterpolatorType::Pointer ReducedBSplineInterpolatorPointer
 
typedef ReducedDimensionBSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, doubleReducedBSplineInterpolatorType
 

Protected Member Functions

void AfterThreadedComputePDFs (void) const
 
virtual void ComputeIncrementalMarginalPDFs (const JointPDFDerivativesType *incrementalPDF, IncrementalMarginalPDFType *fixedIncrementalMarginalPDF, IncrementalMarginalPDFType *movingIncrementalMarginalPDF) const
 
virtual 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 (void)
 
virtual void InitializeKernels (void)
 
virtual void InitializeThreadingParameters (void) const
 
 itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, PaddedParzenWindowHistogramGetValueAndDerivativePerThreadStruct, AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct)
 
 itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, ParzenWindowHistogramGetValueAndDerivativePerThreadStruct, PaddedParzenWindowHistogramGetValueAndDerivativePerThreadStruct)
 
void LaunchComputePDFsThreaderCallback (void) const
 
virtual void NormalizeJointPDF (JointPDFType *pdf, const double &factor) const
 
virtual void NormalizeJointPDFDerivatives (JointPDFDerivativesType *pdf, const double &factor) const
 
 ParzenWindowHistogramImageToImageMetric ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
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
 
virtual ~ParzenWindowHistogramImageToImageMetric ()
 
- Protected Member Functions inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
 AdvancedImageToImageMetric ()
 
virtual void AfterThreadedGetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const
 
virtual void CheckForAdvancedTransform (void)
 
virtual void CheckForBSplineInterpolator (void)
 
virtual void CheckForBSplineTransform (void)
 
virtual void CheckNumberOfSamples (unsigned long wanted, unsigned long found) const
 
virtual void ComputeFixedImageExtrema (const FixedImageType *image, const FixedImageRegionType &region)
 
virtual void ComputeMovingImageExtrema (const MovingImageType *image, const MovingImageRegionType &region)
 
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
 
virtual void InitializeImageSampler (void) throw ( ExceptionObject )
 
virtual void InitializeLimiters (void)
 
virtual bool IsInsideMovingMask (const MovingImagePointType &point) const
 
 itkAlignedTypedef (ITK_CACHE_LINE_ALIGNMENT, PaddedGetValueAndDerivativePerThreadStruct, AlignedGetValueAndDerivativePerThreadStruct)
 
 itkPadStruct (ITK_CACHE_LINE_ALIGNMENT, GetValueAndDerivativePerThreadStruct, PaddedGetValueAndDerivativePerThreadStruct)
 
void LaunchGetValueAndDerivativeThreaderCallback (void) const
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void SetUseFixedImageLimiter (bool _arg)
 
virtual void SetUseImageSampler (bool _arg)
 
virtual void SetUseMovingImageLimiter (bool _arg)
 
virtual void ThreadedGetValueAndDerivative (ThreadIdType threadID)
 
virtual bool TransformPoint (const FixedImagePointType &fixedImagePoint, MovingImagePointType &mappedPoint) const
 
virtual ~AdvancedImageToImageMetric ()
 

Static Protected Member Functions

static ITK_THREAD_RETURN_TYPE ComputePDFsThreaderCallback (void *arg)
 
- Static Protected Member Functions inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
static ITK_THREAD_RETURN_TYPE AccumulateDerivativesThreaderCallback (void *arg)
 
static ITK_THREAD_RETURN_TYPE GetValueAndDerivativeThreaderCallback (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
 
AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct * m_ParzenWindowHistogramGetValueAndDerivativePerThreadVariables
 
ThreadIdType m_ParzenWindowHistogramGetValueAndDerivativePerThreadVariablesSize
 
ParzenWindowHistogramMultiThreaderParameterType m_ParzenWindowHistogramThreaderParameters
 
DerivativeType m_PerturbedAlphaLeft
 
DerivativeType m_PerturbedAlphaRight
 
std::vector< JointPDFPointerm_ThreaderJointPDFs
 
- Protected Attributes inherited from itk::AdvancedImageToImageMetric< TFixedImage, TMovingImage >
AdvancedTransformType::Pointer m_AdvancedTransform
 
BSplineInterpolatorPointer m_BSplineInterpolator
 
BSplineInterpolatorFloatPointer m_BSplineInterpolatorFloat
 
CentralDifferenceGradientFilterPointer m_CentralDifferenceGradientFilter
 
FixedImageLimiterPointer m_FixedImageLimiter
 
FixedImageLimiterOutputType m_FixedImageMaxLimit
 
FixedImageLimiterOutputType m_FixedImageMinLimit
 
FixedImagePixelType m_FixedImageTrueMax
 
FixedImagePixelType m_FixedImageTrueMin
 
AlignedGetValueAndDerivativePerThreadStruct * m_GetValueAndDerivativePerThreadVariables
 
ThreadIdType m_GetValueAndDerivativePerThreadVariablesSize
 
ImageSamplerPointer m_ImageSampler
 
bool m_InterpolatorIsBSpline
 
bool m_InterpolatorIsBSplineFloat
 
bool m_InterpolatorIsLinear
 
bool m_InterpolatorIsReducedBSpline
 
LinearInterpolatorPointer m_LinearInterpolator
 
MovingImageLimiterPointer m_MovingImageLimiter
 
MovingImageLimiterOutputType m_MovingImageMaxLimit
 
MovingImageLimiterOutputType m_MovingImageMinLimit
 
MovingImagePixelType m_MovingImageTrueMax
 
MovingImagePixelType m_MovingImageTrueMin
 
ReducedBSplineInterpolatorPointer m_ReducedBSplineInterpolator
 
MultiThreaderParameterType m_ThreaderMetricParameters
 
bool m_TransformIsAdvanced
 
bool m_TransformIsBSpline
 
bool m_UseMetricSingleThreaded
 
bool m_UseMultiThread
 
bool m_UseOpenMP
 

Private Member Functions

void operator= (const Self &)
 
 ParzenWindowHistogramImageToImageMetric (const Self &)
 

Private Attributes

double m_FiniteDifferencePerturbation
 
unsigned int m_FixedKernelBSplineOrder
 
unsigned int m_MovingKernelBSplineOrder
 
unsigned long m_NumberOfFixedHistogramBins
 
unsigned long m_NumberOfMovingHistogramBins
 
bool m_UseDerivative
 
bool m_UseExplicitPDFDerivatives
 
bool m_UseFiniteDifferenceDerivative
 

Member Typedef Documentation

template<class TFixedImage, class TMovingImage>
typedef Superclass::BSplineInterpolatorType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::BSplineInterpolatorType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::CentralDifferenceGradientFilterType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::CentralDifferenceGradientFilterType
protected
template<class TFixedImage, class TMovingImage>
typedef SmartPointer< const Self > itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ConstPointer

Definition at line 82 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::CoordinateRepresentationType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::CoordinateRepresentationType

Typedefs from the superclass.

Definition at line 85 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::DerivativeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::DerivativeType
template<class TFixedImage, class TMovingImage>
typedef Superclass::DerivativeValueType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::DerivativeValueType
template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageConstPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageConstPointer

Definition at line 93 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageIndexType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexType
protected

Protected Typedefs Typedefs inherited from superclass.

Definition at line 231 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageIndexValueType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageIndexValueType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageLimiterOutputType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageLimiterOutputType
template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageLimiterType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageLimiterType
template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageMaskPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageMaskPointer
template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageMaskType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageMaskType
template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImagePixelType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImagePixelType
template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImagePointType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImagePointType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageRegionType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageRegionType

Definition at line 94 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::FixedImageType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::FixedImageType

Definition at line 92 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::GradientImageFilterPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GradientImageFilterPointer
template<class TFixedImage, class TMovingImage>
typedef Superclass::GradientImageFilterType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GradientImageFilterType
template<class TFixedImage, class TMovingImage>
typedef Superclass::GradientImagePointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GradientImagePointer
template<class TFixedImage, class TMovingImage>
typedef Superclass::GradientImageType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GradientImageType
template<class TFixedImage, class TMovingImage>
typedef Superclass::GradientPixelType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GradientPixelType
template<class TFixedImage, class TMovingImage>
typedef Superclass::ImageSampleContainerPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ImageSampleContainerPointer
template<class TFixedImage, class TMovingImage>
typedef Superclass::ImageSampleContainerType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ImageSampleContainerType
template<class TFixedImage, class TMovingImage>
typedef Superclass::ImageSamplerPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ImageSamplerPointer
template<class TFixedImage, class TMovingImage>
typedef Superclass::ImageSamplerType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ImageSamplerType
template<class TFixedImage, class TMovingImage>
typedef IncrementalMarginalPDFType::IndexType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFIndexType
protected
template<class TFixedImage, class TMovingImage>
typedef IncrementalMarginalPDFType::Pointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFPointer
protected
template<class TFixedImage, class TMovingImage>
typedef IncrementalMarginalPDFType::RegionType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFRegionType
protected
template<class TFixedImage, class TMovingImage>
typedef IncrementalMarginalPDFType::SizeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFSizeType
protected
template<class TFixedImage, class TMovingImage>
typedef Image< PDFValueType, 2 > itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::IncrementalMarginalPDFType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::InputPointType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::InputPointType

Definition at line 97 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::InterpolatorPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::InterpolatorPointer
template<class TFixedImage, class TMovingImage>
typedef Superclass::InterpolatorType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::InterpolatorType
template<class TFixedImage, class TMovingImage>
typedef JointPDFDerivativesType::IndexType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesIndexType
protected
template<class TFixedImage, class TMovingImage>
typedef JointPDFDerivativesType::Pointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesPointer
protected
template<class TFixedImage, class TMovingImage>
typedef JointPDFDerivativesType::RegionType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesRegionType
protected
template<class TFixedImage, class TMovingImage>
typedef JointPDFDerivativesType::SizeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesSizeType
protected
template<class TFixedImage, class TMovingImage>
typedef Image< PDFDerivativeValueType, 3 > itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFDerivativesType
protected
template<class TFixedImage, class TMovingImage>
typedef JointPDFType::IndexType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFIndexType
protected
template<class TFixedImage, class TMovingImage>
typedef JointPDFType::Pointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFPointer
protected
template<class TFixedImage, class TMovingImage>
typedef JointPDFType::RegionType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFRegionType
protected
template<class TFixedImage, class TMovingImage>
typedef JointPDFType::SizeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFSizeType
protected
template<class TFixedImage, class TMovingImage>
typedef Image< PDFValueType, 2 > itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::JointPDFType
protected
template<class TFixedImage, class TMovingImage>
typedef KernelFunctionType::Pointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::KernelFunctionPointer
protected
template<class TFixedImage, class TMovingImage>
typedef KernelFunctionBase< PDFValueType > itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::KernelFunctionType
protected

Typedefs for Parzen kernel.

Definition at line 265 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Array< PDFValueType > itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MarginalPDFType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::MeasureType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MeasureType
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageConstPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageConstPointer

Definition at line 91 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageContinuousIndexType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageContinuousIndexType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageDerivativeScalesType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageDerivativeScalesType
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageDerivativeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageDerivativeType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageIndexType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageIndexType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageLimiterOutputType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageLimiterOutputType
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageLimiterType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageLimiterType
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageMaskPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageMaskPointer
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageMaskType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageMaskType
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImagePixelType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImagePixelType

Definition at line 90 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImagePointType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImagePointType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageRegionType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageRegionType
template<class TFixedImage, class TMovingImage>
typedef Superclass::MovingImageType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::MovingImageType

Definition at line 89 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::NonZeroJacobianIndicesType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::NonZeroJacobianIndicesType
protected
template<class TFixedImage, class TMovingImage>
typedef FixedImageType::OffsetValueType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::OffsetValueType
protected
template<class TFixedImage, class TMovingImage>
typedef Superclass::OutputPointType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::OutputPointType

Definition at line 98 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::ParametersType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ParametersType
template<class TFixedImage, class TMovingImage>
typedef Array< PDFValueType > itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ParzenValueContainerType
protected
template<class TFixedImage, class TMovingImage>
typedef float itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::PDFDerivativeValueType
protected
template<class TFixedImage, class TMovingImage>
typedef double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::PDFValueType
protected

Typedefs for the PDFs and PDF derivatives.

Definition at line 244 of file itkParzenWindowHistogramImageToImageMetric.h.

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

Definition at line 81 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::RealType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::RealType
template<class TFixedImage, class TMovingImage>
typedef ParzenWindowHistogramImageToImageMetric itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::Self

Standard class typedefs.

Definition at line 79 of file itkParzenWindowHistogramImageToImageMetric.h.

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

Definition at line 80 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::ThreaderType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ThreaderType
template<class TFixedImage, class TMovingImage>
typedef Superclass::ThreadInfoType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ThreadInfoType
template<class TFixedImage, class TMovingImage>
typedef Superclass::TransformJacobianType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::TransformJacobianType
template<class TFixedImage, class TMovingImage>
typedef Superclass::TransformParametersType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::TransformParametersType

Definition at line 99 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::TransformPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::TransformPointer

Definition at line 96 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
typedef Superclass::TransformType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::TransformType

Definition at line 95 of file itkParzenWindowHistogramImageToImageMetric.h.

Constructor & Destructor Documentation

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

The constructor.

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

The destructor.

template<class TFixedImage, class TMovingImage>
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ParzenWindowHistogramImageToImageMetric ( const Self )
private

The private constructor.

Member Function Documentation

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

Single-threadedly accumulate results.

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.

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

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

template<class TFixedImage, class TMovingImage>
virtual void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::ComputePDFs ( const ParametersType parameters) const
protectedvirtual
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)

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.

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.

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

Helper function to launch the threads.

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.

template<class TFixedImage, class TMovingImage>
virtual const char* itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetClassName ( ) const
virtual
template<class TFixedImage, class TMovingImage>
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetDerivative ( const ParametersType parameters,
DerivativeType Derivative 
) const

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.

template<class TFixedImage, class TMovingImage>
virtual double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetFiniteDifferencePerturbation ( ) const
virtual
template<class TFixedImage, class TMovingImage>
virtual unsigned int itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetFixedKernelBSplineOrder ( ) const
virtual
template<class TFixedImage, class TMovingImage>
virtual unsigned int itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetMovingKernelBSplineOrder ( ) const
virtual
template<class TFixedImage, class TMovingImage>
virtual unsigned long itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfFixedHistogramBins ( )
virtual
template<class TFixedImage, class TMovingImage>
virtual unsigned long itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetNumberOfMovingHistogramBins ( )
virtual
template<class TFixedImage, class TMovingImage>
virtual bool itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetUseDerivative ( ) const
virtual
template<class TFixedImage, class TMovingImage>
virtual const bool& itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetUseExplicitPDFDerivatives ( )
virtual
template<class TFixedImage, class TMovingImage>
virtual bool itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::GetUseFiniteDifferenceDerivative ( ) const
virtual
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 469 of file itkParzenWindowHistogramImageToImageMetric.h.

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

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

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 478 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::Initialize ( void  )
throw (ExceptionObject
)
virtual

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

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

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

Initialize threading related parameters.

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

template<class TFixedImage, class TMovingImage>
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::itkAlignedTypedef ( ITK_CACHE_LINE_ALIGNMENT  ,
PaddedParzenWindowHistogramGetValueAndDerivativePerThreadStruct  ,
AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct   
)
protected
template<class TFixedImage, class TMovingImage>
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::itkPadStruct ( ITK_CACHE_LINE_ALIGNMENT  ,
ParzenWindowHistogramGetValueAndDerivativePerThreadStruct  ,
PaddedParzenWindowHistogramGetValueAndDerivativePerThreadStruct   
)
protected
template<class TFixedImage, class TMovingImage>
itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::itkStaticConstMacro ( FixedImageDimension  ,
unsigned  int,
FixedImageType::ImageDimension   
)

The fixed image dimension.

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

The moving image dimension.

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

Helper function to launch the threads.

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

Multiply the pdf entries by the given normalization factor.

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

Multiply the pdf derivatives entries by the given normalization factor.

template<class TFixedImage, class TMovingImage>
void itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::operator= ( const Self )
private

The private copy constructor.

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

Print Self.

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

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

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

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.

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.

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.

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.

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.

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

Multi-threaded versions of the ComputePDF function.

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).

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.
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.

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

Field Documentation

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 271 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
KernelFunctionPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_DerivativeMovingKernel
protected
template<class TFixedImage, class TMovingImage>
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FiniteDifferencePerturbation
private
template<class TFixedImage, class TMovingImage>
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageBinSize
protected
template<class TFixedImage, class TMovingImage>
MarginalPDFType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageMarginalPDF
mutableprotected

Variables for the pdfs (actually: histograms).

Definition at line 276 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedImageNormalizedMin
protected
template<class TFixedImage, class TMovingImage>
IncrementalMarginalPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedIncrementalMarginalPDFLeft
protected
template<class TFixedImage, class TMovingImage>
IncrementalMarginalPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedIncrementalMarginalPDFRight
protected
template<class TFixedImage, class TMovingImage>
KernelFunctionPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedKernel
protected

Kernels for computing Parzen histograms and derivatives.

Definition at line 295 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
unsigned int itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedKernelBSplineOrder
private
template<class TFixedImage, class TMovingImage>
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_FixedParzenTermToIndexOffset
protected
template<class TFixedImage, class TMovingImage>
JointPDFDerivativesPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_IncrementalJointPDFLeft
protected
template<class TFixedImage, class TMovingImage>
JointPDFDerivativesPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_IncrementalJointPDFRight
protected
template<class TFixedImage, class TMovingImage>
JointPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_JointPDF
protected
template<class TFixedImage, class TMovingImage>
JointPDFDerivativesPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_JointPDFDerivatives
protected
template<class TFixedImage, class TMovingImage>
JointPDFRegionType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_JointPDFWindow
mutableprotected
template<class TFixedImage, class TMovingImage>
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingImageBinSize
protected
template<class TFixedImage, class TMovingImage>
MarginalPDFType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingImageMarginalPDF
mutableprotected
template<class TFixedImage, class TMovingImage>
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingImageNormalizedMin
protected
template<class TFixedImage, class TMovingImage>
IncrementalMarginalPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingIncrementalMarginalPDFLeft
protected
template<class TFixedImage, class TMovingImage>
IncrementalMarginalPDFPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingIncrementalMarginalPDFRight
protected
template<class TFixedImage, class TMovingImage>
KernelFunctionPointer itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingKernel
protected
template<class TFixedImage, class TMovingImage>
unsigned int itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingKernelBSplineOrder
private
template<class TFixedImage, class TMovingImage>
double itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_MovingParzenTermToIndexOffset
protected
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 491 of file itkParzenWindowHistogramImageToImageMetric.h.

template<class TFixedImage, class TMovingImage>
unsigned long itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_NumberOfMovingHistogramBins
private
template<class TFixedImage, class TMovingImage>
AlignedParzenWindowHistogramGetValueAndDerivativePerThreadStruct* itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_ParzenWindowHistogramGetValueAndDerivativePerThreadVariables
mutableprotected
template<class TFixedImage, class TMovingImage>
ThreadIdType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_ParzenWindowHistogramGetValueAndDerivativePerThreadVariablesSize
mutableprotected
template<class TFixedImage, class TMovingImage>
ParzenWindowHistogramMultiThreaderParameterType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_ParzenWindowHistogramThreaderParameters
protected
template<class TFixedImage, class TMovingImage>
DerivativeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_PerturbedAlphaLeft
mutableprotected
template<class TFixedImage, class TMovingImage>
DerivativeType itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_PerturbedAlphaRight
mutableprotected
template<class TFixedImage, class TMovingImage>
std::vector< JointPDFPointer > itk::ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >::m_ThreaderJointPDFs
mutableprotected

Threading related parameters.

Definition at line 300 of file itkParzenWindowHistogramImageToImageMetric.h.

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


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo