18 #ifndef itkMattesMutualInformationImageToImageMetric_h
19 #define itkMattesMutualInformationImageToImageMetric_h
116 template <
typename TFixedImage,
typename TMovingImage>
136 using typename Superclass::TransformType;
137 using typename Superclass::TransformPointer;
138 using typename Superclass::TransformJacobianType;
139 using typename Superclass::InterpolatorType;
140 using typename Superclass::MeasureType;
141 using typename Superclass::DerivativeType;
142 using typename Superclass::ParametersType;
143 using typename Superclass::FixedImageType;
144 using typename Superclass::MovingImageType;
145 using typename Superclass::MovingImagePointType;
146 using typename Superclass::FixedImageConstPointer;
147 using typename Superclass::MovingImageConstPointer;
148 using typename Superclass::BSplineTransformWeightsType;
149 using typename Superclass::BSplineTransformIndexArrayType;
151 using typename Superclass::CoordinateRepresentationType;
152 using typename Superclass::FixedImageSampleContainer;
153 using typename Superclass::ImageDerivativesType;
154 using typename Superclass::WeightsValueType;
160 static constexpr
unsigned int MovingImageDimension = MovingImageType::ImageDimension;
170 Initialize()
override;
193 itkGetConstReferenceMacro(NumberOfHistogramBins,
SizeValueType);
220 itkSetMacro(UseExplicitPDFDerivatives,
bool);
221 itkGetConstReferenceMacro(UseExplicitPDFDerivatives,
bool);
222 itkBooleanMacro(UseExplicitPDFDerivatives);
240 if (this->m_MMIMetricPerThreadVariables ==
nullptr)
244 return this->m_MMIMetricPerThreadVariables[0].JointPDF;
257 if (this->m_MMIMetricPerThreadVariables ==
nullptr)
261 return this->m_MMIMetricPerThreadVariables[0].JointPDFDerivatives;
269 PrintSelf(std::ostream & os,
Indent indent)
const override;
287 CommonGetValueProcessing()
const;
296 unsigned int sampleNumber,
302 GetValueThreadPreProcess(
ThreadIdType threadId,
bool withinSampleThread)
const override;
304 GetValueThreadPostProcess(
ThreadIdType threadId,
bool withinSampleThread)
const override;
310 double movingImageValue)
const override;
313 GetValueAndDerivativeThreadPreProcess(
ThreadIdType threadId,
bool withinSampleThread)
const override;
315 GetValueAndDerivativeThreadPostProcess(
ThreadIdType threadId,
bool withinSampleThread)
const override;
318 GetValueAndDerivativeThreadProcessSample(
ThreadIdType threadId,
321 double movingImageValue,
364 #if !defined(ITK_WRAPPING_PARSER)
366 itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedMMIMetricPerThreadStruct, AlignedMMIMetricPerThreadStruct);
375 bool m_UseExplicitPDFDerivatives{
true };
376 mutable bool m_ImplicitDerivativesSecondPass{
false };
380 #ifndef ITK_MANUAL_INSTANTIATION
381 # include "itkMattesMutualInformationImageToImageMetric.hxx"