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;
119 m_MovingImageInterpolator = ptr;
126 return m_MovingImageInterpolator;
143 global->m_SumOfSquaredDifference = 0.0;
144 global->m_NumberOfPixelsProcessed = 0L;
145 global->m_SumOfSquaredChange = 0;
154 ReleaseGlobalDataPointer(
void * gd)
const override;
158 InitializeIteration()
override;
165 ComputeUpdate(
const NeighborhoodType & it,
void * gd,
const FloatOffsetType & offset = FloatOffsetType(0.0))
override;
189 m_UseMovingImageGradient = flag;
194 return m_UseMovingImageGradient;
203 SetIntensityDifferenceThreshold(
double);
206 GetIntensityDifferenceThreshold()
const;
212 PrintSelf(std::ostream & os,
Indent indent)
const override;
231 double m_Normalizer{};
238 bool m_UseMovingImageGradient{};
247 double m_DenominatorThreshold{};
250 double m_IntensityDifferenceThreshold{};
255 mutable double m_Metric{};
256 mutable double m_SumOfSquaredDifference{};
258 mutable double m_RMSChange{};
259 mutable double m_SumOfSquaredChange{};
262 mutable std::mutex m_MetricCalculationMutex{};
266 #ifndef ITK_MANUAL_INSTANTIATION
267 # include "itkDemonsRegistrationFunction.hxx"