15 #ifndef __itkParzenWindowHistogramImageToImageMetric_H__
16 #define __itkParzenWindowHistogramImageToImageMetric_H__
19 #include "itkBSplineKernelFunction.h"
71 template <
class TFixedImage,
class TMovingImage >
135 FixedImageType::ImageDimension );
139 MovingImageType::ImageDimension );
147 void Initialize(
void) throw ( ExceptionObject );
171 itkSetClampMacro( NumberOfFixedHistogramBins,
unsigned long,
172 4, NumericTraits<
unsigned long>::
max() );
173 itkGetMacro( NumberOfFixedHistogramBins,
unsigned long);
181 itkSetClampMacro( NumberOfMovingHistogramBins,
unsigned long,
182 4, NumericTraits<
unsigned long>::max() );
183 itkGetMacro( NumberOfMovingHistogramBins,
unsigned long);
186 itkSetClampMacro( FixedKernelBSplineOrder,
unsigned int, 0, 3 );
187 itkGetConstMacro( FixedKernelBSplineOrder,
unsigned int );
190 itkSetClampMacro( MovingKernelBSplineOrder,
unsigned int, 0, 3 );
191 itkGetConstMacro( MovingKernelBSplineOrder,
unsigned int );
196 itkSetMacro( UseExplicitPDFDerivatives,
bool );
197 itkGetConstReferenceMacro( UseExplicitPDFDerivatives,
bool );
198 itkBooleanMacro( UseExplicitPDFDerivatives );
203 itkSetMacro( UseDerivative,
bool );
204 itkGetConstMacro( UseDerivative,
bool );
209 itkSetMacro( UseFiniteDifferenceDerivative,
bool );
210 itkGetConstMacro( UseFiniteDifferenceDerivative,
bool );
216 itkSetMacro( FiniteDifferencePerturbation,
double );
217 itkGetConstMacro( FiniteDifferencePerturbation,
double );
225 virtual ~ParzenWindowHistogramImageToImageMetric() {};
228 void PrintSelf( std::ostream& os, Indent indent )
const;
365 unsigned int direction )
const;
465 #ifndef ITK_MANUAL_INSTANTIATION
466 #include "itkParzenWindowHistogramImageToImageMetric.hxx"
469 #endif // end #ifndef __itkParzenWindowHistogramImageToImageMetric_H__
Superclass::MeasureType MeasureType
Array< PDFValueType > MarginalPDFType
FixedImageType::OffsetValueType OffsetValueType
double m_MovingImageNormalizedMin
SmartPointer< const Self > ConstPointer
Superclass::FixedImageLimiterType FixedImageLimiterType
JointPDFDerivativesType::IndexType JointPDFDerivativesIndexType
JointPDFDerivativesType::SizeType JointPDFDerivativesSizeType
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
virtual void InitializeKernels(void)
IncrementalMarginalPDFType::Pointer m_MovingIncrementalMarginalPDFRight
virtual void GetValueAndFiniteDifferenceDerivative(const ParametersType &, MeasureType &, DerivativeType &) const
Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
ParzenWindowHistogramImageToImageMetric Self
virtual void ComputeIncrementalMarginalPDFs(const JointPDFDerivativesType *incrementalPDF, IncrementalMarginalPDFType *fixedIncrementalMarginalPDF, IncrementalMarginalPDFType *movingIncrementalMarginalPDF) const
bool m_UseExplicitPDFDerivatives
Superclass::InputPointType InputPointType
double m_MovingParzenTermToIndexOffset
Superclass::FixedImageType FixedImageType
JointPDFDerivativesType::Pointer m_IncrementalJointPDFRight
KernelFunctionType::Pointer m_FixedKernel
Superclass::CoordinateRepresentationType CoordinateRepresentationType
void EvaluateParzenValues(double parzenWindowTerm, OffsetValueType parzenWindowIndex, const KernelFunctionType *kernel, ParzenValueContainerType &parzenValues) const
Superclass::InterpolatorType InterpolatorType
Superclass::TransformParametersType TransformParametersType
Superclass::GradientImageType GradientImageType
Superclass::MovingImageType MovingImageType
virtual void UpdateJointPDFAndDerivatives(RealType fixedImageValue, RealType movingImageValue, const DerivativeType *imageJacobian, const NonZeroJacobianIndicesType *nzji) const
Superclass::FixedImageRegionType FixedImageRegionType
Superclass::FixedImageMaskPointer FixedImageMaskPointer
Superclass::OutputPointType OutputPointType
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics...
JointPDFType::Pointer m_JointPDF
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
Superclass::MovingImageMaskType MovingImageMaskType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::GradientPixelType GradientPixelType
Superclass::GradientPixelType GradientPixelType
Superclass::FixedImageIndexValueType FixedImageIndexValueType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
Superclass::TransformType TransformType
double m_FixedParzenTermToIndexOffset
Superclass::MovingImageConstPointer MovingImageConstPointer
JointPDFType::RegionType JointPDFRegionType
Superclass::FixedImageRegionType FixedImageRegionType
void operator=(const Self &)
Array< double > ParzenValueContainerType
JointPDFDerivativesType::RegionType JointPDFDerivativesRegionType
ParzenWindowHistogramImageToImageMetric()
Superclass::InputPointType InputPointType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
double m_FixedImageBinSize
MovingImageType::IndexType MovingImageIndexType
Superclass::OutputPointType OutputPointType
Superclass::FixedImageMaskPointer FixedImageMaskPointer
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
TransformType::InputPointType FixedImagePointType
Superclass::TransformJacobianType TransformJacobianType
JointPDFDerivativesType::Pointer m_JointPDFDerivatives
bool m_UseFiniteDifferenceDerivative
KernelFunctionType::Pointer m_DerivativeMovingKernel
virtual void NormalizeJointPDF(JointPDFType *pdf, double factor) const
Superclass::ParametersType ParametersType
Superclass::RealType RealType
Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
ImageSamplerBase< FixedImageType > ImageSamplerType
Superclass::FixedImagePointType FixedImagePointType
virtual void ComputeMarginalPDF(const JointPDFType *jointPDF, MarginalPDFType &marginalPDF, unsigned int direction) const
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
virtual void ComputePDFsAndIncrementalPDFs(const ParametersType ¶meters) const
Superclass::MovingImageDerivativeType MovingImageDerivativeType
Superclass::ParametersType ParametersType
Superclass::ImageSamplerType ImageSamplerType
Superclass::FixedImageLimiterOutputType FixedImageLimiterOutputType
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Superclass::MovingImagePointType MovingImagePointType
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
Superclass::InterpolatorPointer InterpolatorPointer
Superclass::InterpolatorPointer InterpolatorPointer
FixedImageType::IndexType FixedImageIndexType
Image< PDFValueType, 3 > JointPDFDerivativesType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Superclass::DerivativeValueType DerivativeValueType
SmartPointer< Self > Pointer
Superclass::FixedImageConstPointer FixedImageConstPointer
DerivativeType m_PerturbedAlphaRight
virtual void GetValueAndAnalyticDerivative(const ParametersType &, MeasureType &, DerivativeType &) const
unsigned long m_NumberOfMovingHistogramBins
FixedArray< double, itkGetStaticConstMacro(MovingImageDimension) > MovingImageDerivativeScalesType
Superclass::MovingImageMaskPointer MovingImageMaskPointer
double m_FiniteDifferencePerturbation
JointPDFDerivativesType::Pointer m_IncrementalJointPDFLeft
FixedImageIndexType::IndexValueType FixedImageIndexValueType
TransformType::OutputPointType MovingImagePointType
Superclass::FixedImageType FixedImageType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
IncrementalMarginalPDFType::Pointer m_MovingIncrementalMarginalPDFLeft
Superclass::ImageSamplerPointer ImageSamplerPointer
Superclass::MovingImageMaskType MovingImageMaskType
JointPDFType::IndexType JointPDFIndexType
unsigned int m_MovingKernelBSplineOrder
Superclass::GradientImageType GradientImageType
virtual void ComputePDFs(const ParametersType ¶meters) const
Superclass::TransformPointer TransformPointer
A base class for image metrics based on a joint histogram computed using Parzen Windowing.
void PrintSelf(std::ostream &os, Indent indent) const
void UpdateJointPDFDerivatives(const JointPDFIndexType &pdfIndex, double factor, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji) const
DerivativeType m_PerturbedAlphaLeft
Superclass::FixedImageIndexType FixedImageIndexType
double m_MovingImageBinSize
Superclass::GradientImagePointer GradientImagePointer
Image< PDFValueType, 2 > JointPDFType
IncrementalMarginalPDFType::Pointer m_FixedIncrementalMarginalPDFRight
void GetValueAndDerivative(const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const
void GetDerivative(const ParametersType ¶meters, DerivativeType &Derivative) const
Superclass::GradientImageFilterType GradientImageFilterType
ImageSamplerType::Pointer ImageSamplerPointer
MovingImageType::RegionType MovingImageRegionType
Superclass::MeasureType MeasureType
Superclass::InterpolatorType InterpolatorType
Superclass::FixedImagePixelType FixedImagePixelType
Superclass::TransformJacobianType TransformJacobianType
Superclass::MovingImageIndexType MovingImageIndexType
IncrementalMarginalPDFType::RegionType IncrementalMarginalPDFRegionType
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
unsigned int m_FixedKernelBSplineOrder
Superclass::MovingImageType MovingImageType
KernelFunctionType::Pointer m_MovingKernel
Superclass::TransformParametersType TransformParametersType
Superclass::MovingImageRegionType MovingImageRegionType
Superclass::MovingImagePixelType MovingImagePixelType
Superclass::MovingImageLimiterType MovingImageLimiterType
Superclass::RealType RealType
virtual void NormalizeJointPDFDerivatives(JointPDFDerivativesType *pdf, double factor) const
JointPDFType::SizeType JointPDFSizeType
DerivativeType::ValueType DerivativeValueType
IncrementalMarginalPDFType::IndexType IncrementalMarginalPDFIndexType
Superclass::MovingImageMaskPointer MovingImageMaskPointer
Superclass::MovingImagePixelType MovingImagePixelType
Superclass::DerivativeType DerivativeType
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
double m_FixedImageNormalizedMin
IncrementalMarginalPDFType::Pointer m_FixedIncrementalMarginalPDFLeft
FixedImageType::PixelType FixedImagePixelType
virtual void ComputePDFsAndPDFDerivatives(const ParametersType ¶meters) const
Superclass::TransformType TransformType
Superclass::ImageSampleContainerType ImageSampleContainerType
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const
MarginalPDFType m_FixedImageMarginalPDF
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Superclass::FixedImageMaskType FixedImageMaskType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass::GradientImageFilterType GradientImageFilterType
Superclass::TransformPointer TransformPointer
Image< PDFValueType, 2 > IncrementalMarginalPDFType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Superclass::CentralDifferenceGradientFilterType CentralDifferenceGradientFilterType
IncrementalMarginalPDFType::SizeType IncrementalMarginalPDFSizeType
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::MovingImageConstPointer MovingImageConstPointer
Superclass::FixedImageMaskType FixedImageMaskType
Superclass::DerivativeType DerivativeType
MarginalPDFType m_MovingImageMarginalPDF
unsigned long m_NumberOfFixedHistogramBins
AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
Superclass::BSplineInterpolatorType BSplineInterpolatorType
virtual void InitializeHistograms(void)
KernelFunctionBase< double > KernelFunctionType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
JointPDFRegionType m_JointPDFWindow
Superclass::GradientImagePointer GradientImagePointer