18 #ifndef itkESMDemonsRegistrationFunction_h
19 #define itkESMDemonsRegistrationFunction_h
24 #include "ITKPDEDeformableRegistrationExport.h"
49 extern ITKPDEDeformableRegistration_EXPORT std::ostream &
83 template <
typename TFixedImage,
typename TMovingImage,
typename TDisplacementField>
104 using typename Superclass::MovingImageType;
105 using typename Superclass::MovingImagePointer;
109 using typename Superclass::FixedImageType;
110 using typename Superclass::FixedImagePointer;
117 using typename Superclass::DisplacementFieldType;
118 using typename Superclass::DisplacementFieldTypePointer;
121 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
132 #ifndef ITK_FUTURE_LEGACY_REMOVE
133 using CoordRepType ITK_FUTURE_DEPRECATED(
134 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") =
CoordinateType;
161 m_MovingImageInterpolator = ptr;
162 m_MovingImageWarper->SetInterpolator(ptr);
170 return m_MovingImageInterpolator;
187 global->m_SumOfSquaredDifference = 0.0;
188 global->m_NumberOfPixelsProcessed = 0L;
189 global->m_SumOfSquaredChange = 0;
195 ReleaseGlobalDataPointer(
void * gd)
const override;
199 InitializeIteration()
override;
204 ComputeUpdate(
const NeighborhoodType & it,
void * gd,
const FloatOffsetType & offset = FloatOffsetType(0.0))
override;
216 virtual const double &
227 SetIntensityDifferenceThreshold(
double);
230 GetIntensityDifferenceThreshold()
const;
238 this->m_MaximumUpdateStepLength = sm;
244 return this->m_MaximumUpdateStepLength;
248 #if !defined(ITK_LEGACY_REMOVE)
250 static constexpr
GradientEnum Symmetric = GradientEnum::Symmetric;
251 static constexpr
GradientEnum Fixed = GradientEnum::Fixed;
252 static constexpr
GradientEnum WarpedMoving = GradientEnum::WarpedMoving;
253 static constexpr
GradientEnum MappedMoving = GradientEnum::MappedMoving;
260 m_UseGradientType = gtype;
265 return m_UseGradientType;
273 PrintSelf(std::ostream & os,
Indent indent)
const override;
292 double m_Normalizer{};
308 MovingImageType * m_MovingImageWarperOutput{};
311 TimeStepType m_TimeStep{};
314 double m_DenominatorThreshold{};
317 double m_IntensityDifferenceThreshold{};
320 double m_MaximumUpdateStepLength{};
325 mutable double m_Metric{};
326 mutable double m_SumOfSquaredDifference{};
328 mutable double m_RMSChange{};
329 mutable double m_SumOfSquaredChange{};
332 mutable std::mutex m_MetricCalculationMutex{};
336 #ifndef ITK_MANUAL_INSTANTIATION
337 # include "itkESMDemonsRegistrationFunction.hxx"