18 #ifndef itkDemonsRegistrationFunction_h
19 #define itkDemonsRegistrationFunction_h
53 template <
typename TFixedImage,
typename TMovingImage,
typename TDisplacementField>
73 using typename Superclass::MovingImageType;
74 using typename Superclass::MovingImagePointer;
77 using typename Superclass::FixedImageType;
78 using typename Superclass::FixedImagePointer;
84 using typename Superclass::DisplacementFieldType;
85 using typename Superclass::DisplacementFieldTypePointer;
88 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
99 #ifndef ITK_FUTURE_LEGACY_REMOVE
100 using CoordRepType ITK_FUTURE_DEPRECATED(
101 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") =
CoordinateType;
123 m_MovingImageInterpolator = ptr;
130 return m_MovingImageInterpolator;
147 global->m_SumOfSquaredDifference = 0.0;
148 global->m_NumberOfPixelsProcessed = 0L;
149 global->m_SumOfSquaredChange = 0;
158 ReleaseGlobalDataPointer(
void * gd)
const override;
162 InitializeIteration()
override;
169 ComputeUpdate(
const NeighborhoodType & it,
void * gd,
const FloatOffsetType & offset = FloatOffsetType(0.0))
override;
193 m_UseMovingImageGradient = flag;
198 return m_UseMovingImageGradient;
207 SetIntensityDifferenceThreshold(
double);
210 GetIntensityDifferenceThreshold()
const;
216 PrintSelf(std::ostream & os,
Indent indent)
const override;
235 double m_Normalizer{};
242 bool m_UseMovingImageGradient{};
251 double m_DenominatorThreshold{};
254 double m_IntensityDifferenceThreshold{};
259 mutable double m_Metric{};
260 mutable double m_SumOfSquaredDifference{};
262 mutable double m_RMSChange{};
263 mutable double m_SumOfSquaredChange{};
266 mutable std::mutex m_MetricCalculationMutex{};
270 #ifndef ITK_MANUAL_INSTANTIATION
271 # include "itkDemonsRegistrationFunction.hxx"