82template <
class TFixedImage,
class TMovingImage>
90 using Superclass = ImageToImageMetric<TFixedImage, TMovingImage>;
98 itkStaticConstMacro(MovingImageDimension,
unsigned int, TMovingImage::ImageDimension);
99 itkStaticConstMacro(FixedImageDimension,
unsigned int, TFixedImage::ImageDimension);
102 using typename Superclass::CoordinateRepresentationType;
103 using typename Superclass::MovingImageType;
104 using typename Superclass::MovingImagePixelType;
106 using typename Superclass::MovingImageConstPointer;
107 using typename Superclass::FixedImageType;
109 using typename Superclass::FixedImageConstPointer;
110 using typename Superclass::FixedImageRegionType;
111 using typename Superclass::TransformType;
112 using typename Superclass::TransformPointer;
113 using typename Superclass::InputPointType;
114 using typename Superclass::OutputPointType;
115 using typename Superclass::TransformParametersType;
116 using typename Superclass::TransformJacobianType;
117 using typename Superclass::InterpolatorType;
118 using typename Superclass::InterpolatorPointer;
119 using typename Superclass::RealType;
120 using typename Superclass::GradientPixelType;
121 using typename Superclass::GradientImageType;
122 using typename Superclass::GradientImagePointer;
123 using typename Superclass::GradientImageFilterType;
124 using typename Superclass::GradientImageFilterPointer;
125 using typename Superclass::FixedImageMaskType;
126 using typename Superclass::FixedImageMaskPointer;
127 using typename Superclass::MovingImageMaskType;
128 using typename Superclass::MovingImageMaskPointer;
129 using typename Superclass::MeasureType;
130 using typename Superclass::DerivativeType;
132 using typename Superclass::ParametersType;
184 this->Superclass::SetTransform(arg);
185 if (this->m_AdvancedTransform != arg)
187 this->m_AdvancedTransform = arg;
197 return this->m_AdvancedTransform.GetPointer();
204 GetImageSampler()
const
206 return this->m_ImageSampler.GetPointer();
212 itkGetConstMacro(UseImageSampler,
bool);
217 itkSetMacro(RequiredRatioOfValidSamples,
double);
218 itkGetConstMacro(RequiredRatioOfValidSamples,
double);
233 itkSetMacro(MovingLimitRangeRatio,
double);
234 itkGetConstMacro(MovingLimitRangeRatio,
double);
235 itkSetMacro(FixedLimitRangeRatio,
double);
236 itkGetConstMacro(FixedLimitRangeRatio,
double);
240 itkGetConstMacro(UseFixedImageLimiter,
bool);
241 itkGetConstMacro(UseMovingImageLimiter,
bool);
250 itkSetMacro(UseMovingImageDerivativeScales,
bool);
251 itkGetConstMacro(UseMovingImageDerivativeScales,
bool);
253 itkSetMacro(ScaleGradientWithRespectToMovingImageOrientation,
bool);
254 itkGetConstMacro(ScaleGradientWithRespectToMovingImageOrientation,
bool);
281 itkSetMacro(UseMetricSingleThreaded,
bool);
282 itkGetConstReferenceMacro(UseMetricSingleThreaded,
bool);
283 itkBooleanMacro(UseMetricSingleThreaded);
287 itkSetMacro(UseMultiThread,
bool);
288 itkGetConstReferenceMacro(UseMultiThread,
bool);
289 itkBooleanMacro(UseMultiThread);
308 PrintSelf(std::ostream & os, Indent indent)
const override;
322 BSplineInterpolateImageFunction<MovingImageType, CoordinateRepresentationType, double>;
325 BSplineInterpolateImageFunction<MovingImageType, CoordinateRepresentationType, float>;
347 bool m_InterpolatorIsLinear{
false };
348 bool m_InterpolatorIsBSpline{
false };
349 bool m_InterpolatorIsBSplineFloat{
false };
350 bool m_InterpolatorIsReducedBSpline{
false };
359 bool m_TransformIsAdvanced{
false };
361 mutable bool m_TransformIsBSpline{
false };
388 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
406 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
414 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
418 bool m_UseMetricSingleThreaded{
true };
419 bool m_UseMultiThread{
false };
451 itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedGetValuePerThreadStruct, AlignedGetValuePerThreadStruct);
452 mutable std::unique_ptr<AlignedGetValuePerThreadStruct[]> m_GetValuePerThreadVariables{
nullptr };
453 mutable ThreadIdType m_GetValuePerThreadVariablesSize{ 0 };
464 PaddedGetValueAndDerivativePerThreadStruct);
466 PaddedGetValueAndDerivativePerThreadStruct,
467 AlignedGetValueAndDerivativePerThreadStruct);
468 mutable std::unique_ptr<AlignedGetValueAndDerivativePerThreadStruct[]> m_GetValueAndDerivativePerThreadVariables{
471 mutable ThreadIdType m_GetValueAndDerivativePerThreadVariablesSize{ 0 };
487 itkSetMacro(UseImageSampler,
bool);
511 RealType & movingImageValue,
514 return EvaluateMovingImageValueAndDerivativeWithOptionalThreadId(mappedPoint, movingImageValue, gradient);
521 RealType & movingImageValue,
523 const ThreadIdType threadId)
const
525 return EvaluateMovingImageValueAndDerivativeWithOptionalThreadId(mappedPoint, movingImageValue, gradient, threadId);
535 DerivativeType & imageJacobian)
const;
562 TransformJacobianType & jacobian,
576 itkSetMacro(UseFixedImageLimiter,
bool);
577 itkSetMacro(UseMovingImageLimiter,
bool);
579 double m_FixedLimitRangeRatio{ 0.01 };
580 double m_MovingLimitRangeRatio{ 0.01 };
583 template <
typename... TOptionalThreadId>
586 RealType & movingImageValue,
588 const TOptionalThreadId... optionalThreadId)
const;
591 bool m_UseImageSampler{
false };
592 bool m_UseFixedImageLimiter{
false };
593 bool m_UseMovingImageLimiter{
false };
594 double m_RequiredRatioOfValidSamples{ 0.25 };
595 bool m_UseMovingImageDerivativeScales{
false };
596 bool m_ScaleGradientWithRespectToMovingImageOrientation{
false };