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;
157 m_MovingImageInterpolator = ptr;
158 m_MovingImageWarper->SetInterpolator(ptr);
166 return m_MovingImageInterpolator;
183 global->m_SumOfSquaredDifference = 0.0;
184 global->m_NumberOfPixelsProcessed = 0L;
185 global->m_SumOfSquaredChange = 0;
191 ReleaseGlobalDataPointer(
void * gd)
const override;
195 InitializeIteration()
override;
200 ComputeUpdate(
const NeighborhoodType & it,
void * gd,
const FloatOffsetType & offset = FloatOffsetType(0.0))
override;
212 virtual const double &
223 SetIntensityDifferenceThreshold(
double);
226 GetIntensityDifferenceThreshold()
const;
234 this->m_MaximumUpdateStepLength = sm;
240 return this->m_MaximumUpdateStepLength;
244 #if !defined(ITK_LEGACY_REMOVE)
246 static constexpr
GradientEnum Symmetric = GradientEnum::Symmetric;
247 static constexpr
GradientEnum Fixed = GradientEnum::Fixed;
248 static constexpr
GradientEnum WarpedMoving = GradientEnum::WarpedMoving;
249 static constexpr
GradientEnum MappedMoving = GradientEnum::MappedMoving;
256 m_UseGradientType = gtype;
261 return m_UseGradientType;
269 PrintSelf(std::ostream & os,
Indent indent)
const override;
288 double m_Normalizer{};
304 MovingImageType * m_MovingImageWarperOutput{};
307 TimeStepType m_TimeStep{};
310 double m_DenominatorThreshold{};
313 double m_IntensityDifferenceThreshold{};
316 double m_MaximumUpdateStepLength{};
321 mutable double m_Metric{};
322 mutable double m_SumOfSquaredDifference{};
324 mutable double m_RMSChange{};
325 mutable double m_SumOfSquaredChange{};
328 mutable std::mutex m_MetricCalculationMutex{};
332 #ifndef ITK_MANUAL_INSTANTIATION
333 # include "itkESMDemonsRegistrationFunction.hxx"