89 using Superclass = ImageToImageMetric<TFixedImage, TMovingImage>;
97 itkStaticConstMacro(MovingImageDimension,
unsigned int, TMovingImage::ImageDimension);
98 itkStaticConstMacro(FixedImageDimension,
unsigned int, TFixedImage::ImageDimension);
101 using typename Superclass::CoordinateRepresentationType;
102 using typename Superclass::MovingImageType;
103 using typename Superclass::MovingImagePixelType;
105 using typename Superclass::MovingImageConstPointer;
106 using typename Superclass::FixedImageType;
108 using typename Superclass::FixedImageConstPointer;
109 using typename Superclass::FixedImageRegionType;
110 using typename Superclass::TransformType;
111 using typename Superclass::TransformPointer;
112 using typename Superclass::InputPointType;
113 using typename Superclass::OutputPointType;
114 using typename Superclass::TransformParametersType;
115 using typename Superclass::TransformJacobianType;
116 using typename Superclass::InterpolatorType;
117 using typename Superclass::InterpolatorPointer;
118 using typename Superclass::RealType;
119 using typename Superclass::GradientPixelType;
120 using typename Superclass::GradientImageType;
121 using typename Superclass::GradientImagePointer;
131 using typename Superclass::MeasureType;
132 using typename Superclass::DerivativeType;
134 using typename Superclass::ParametersType;
178 Superclass::SetFixedImageMask(arg);
185 Superclass::SetMovingImageMask(arg);
191 const auto *
const mask = Superclass::GetFixedImageMask();
196 const MovingImageMaskType *
199 const auto *
const mask = Superclass::GetMovingImageMask();
208 this->Superclass::SetTransform(arg);
209 if (m_AdvancedTransform != arg)
211 m_AdvancedTransform = arg;
218 AdvancedTransformType *
221 return m_AdvancedTransform.GetPointer();
225 const AdvancedTransformType *
228 return m_AdvancedTransform.GetPointer();
237 return m_ImageSampler.GetPointer();
243 itkGetConstMacro(UseImageSampler,
bool);
248 itkSetMacro(RequiredRatioOfValidSamples,
double);
249 itkGetConstMacro(RequiredRatioOfValidSamples,
double);
264 itkSetMacro(MovingLimitRangeRatio,
double);
265 itkGetConstMacro(MovingLimitRangeRatio,
double);
266 itkSetMacro(FixedLimitRangeRatio,
double);
267 itkGetConstMacro(FixedLimitRangeRatio,
double);
271 itkGetConstMacro(UseFixedImageLimiter,
bool);
272 itkGetConstMacro(UseMovingImageLimiter,
bool);
281 itkSetMacro(UseMovingImageDerivativeScales,
bool);
282 itkGetConstMacro(UseMovingImageDerivativeScales,
bool);
284 itkSetMacro(ScaleGradientWithRespectToMovingImageOrientation,
bool);
285 itkGetConstMacro(ScaleGradientWithRespectToMovingImageOrientation,
bool);
302 itkSetMacro(UseMetricSingleThreaded,
bool);
303 itkGetConstReferenceMacro(UseMetricSingleThreaded,
bool);
304 itkBooleanMacro(UseMetricSingleThreaded);
308 itkSetMacro(UseMultiThread,
bool);
309 itkGetConstReferenceMacro(UseMultiThread,
bool);
310 itkBooleanMacro(UseMultiThread);
329 PrintSelf(std::ostream & os, Indent indent)
const override;
343 BSplineInterpolateImageFunction<MovingImageType, CoordinateRepresentationType, double>;
346 BSplineInterpolateImageFunction<MovingImageType, CoordinateRepresentationType, float>;
369 mutable bool m_TransformIsBSpline{
false };
392 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
408 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
416 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
420 bool m_UseMetricSingleThreaded{
true };
421 bool m_UseMultiThread{
false };
454 PaddedGetValueAndDerivativePerThreadStruct);
456 PaddedGetValueAndDerivativePerThreadStruct,
457 AlignedGetValueAndDerivativePerThreadStruct);
458 mutable std::unique_ptr<AlignedGetValueAndDerivativePerThreadStruct[]> m_GetValueAndDerivativePerThreadVariables{
461 mutable ThreadIdType m_GetValueAndDerivativePerThreadVariablesSize{ 0 };
477 itkSetMacro(UseImageSampler,
bool);
501 RealType & movingImageValue,
504 return EvaluateMovingImageValueAndDerivativeWithOptionalThreadId(mappedPoint, movingImageValue, gradient);
511 RealType & movingImageValue,
513 const ThreadIdType threadId)
const
515 return EvaluateMovingImageValueAndDerivativeWithOptionalThreadId(mappedPoint, movingImageValue, gradient, threadId);
525 DerivativeType & imageJacobian)
const;
552 TransformJacobianType & jacobian,
566 itkSetMacro(UseFixedImageLimiter,
bool);
567 itkSetMacro(UseMovingImageLimiter,
bool);
569 double m_FixedLimitRangeRatio{ 0.01 };
570 double m_MovingLimitRangeRatio{ 0.01 };
576 itkExceptionMacro(
"Intentionally left unimplemented!");
582 itkExceptionMacro(
"Intentionally left unimplemented!");
588 itkExceptionMacro(
"Intentionally left unimplemented!");
594 itkExceptionMacro(
"Intentionally left unimplemented!");
598 using Superclass::SetTransform;
601 template <
typename... TOptionalThreadId>
604 RealType & movingImageValue,
606 const TOptionalThreadId... optionalThreadId)
const;
617 bool m_UseImageSampler{
false };
618 bool m_UseFixedImageLimiter{
false };
619 bool m_UseMovingImageLimiter{
false };
620 double m_RequiredRatioOfValidSamples{ 0.25 };
621 bool m_UseMovingImageDerivativeScales{
false };
622 bool m_ScaleGradientWithRespectToMovingImageOrientation{
false };
627 using Superclass::TransformPoint;