18#ifndef itkESMDemonsRegistrationFunction_h
19#define itkESMDemonsRegistrationFunction_h
24#include "ITKPDEDeformableRegistrationExport.h"
49extern ITKPDEDeformableRegistration_EXPORT std::ostream &
83template <
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;
216 virtual const double &
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;
292 double m_Normalizer{};
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"
Calculate the derivative by central differencing.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
A templated class holding a n-Dimensional covariant vector.
Contains all enum classes used by ESMDemonsRegistrationFunction class.
Fast implementation of the symmetric demons registration force.
virtual double GetMetric() const
typename MovingImageGradientCalculatorType::Pointer MovingImageGradientCalculatorPointer
~ESMDemonsRegistrationFunction() override=default
typename MovingImageType::PixelType MovingPixelType
typename InterpolatorType::Pointer InterpolatorPointer
typename FixedImageType::DirectionType DirectionType
TimeStepType ComputeGlobalTimeStep(void *) const override
virtual double GetIntensityDifferenceThreshold() const
virtual void SetUseGradientType(GradientEnum gtype)
virtual GradientEnum GetUseGradientType() const
void ReleaseGlobalDataPointer(void *gd) const override
InterpolatorType * GetMovingImageInterpolator()
void InitializeIteration() override
virtual void SetMaximumUpdateStepLength(double sm)
typename WarperType::Pointer WarperPointer
typename GradientCalculatorType::Pointer GradientCalculatorPointer
typename InterpolatorType::PointType PointType
typename FixedImageType::SizeType SizeType
void SetMovingImageInterpolator(InterpolatorType *ptr)
virtual double GetMaximumUpdateStepLength() const
typename FixedImageType::IndexType IndexType
typename FixedImageType::SpacingType SpacingType
void * GetGlobalDataPointer() const override
virtual const double & GetRMSChange() const
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetIntensityDifferenceThreshold(double)
ESMDemonsRegistrationFunction()
PixelType ComputeUpdate(const NeighborhoodType &it, void *gd, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
typename ImageType::PixelType PixelType
typename ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
Control indentation during Print() invocation.
Base class for all image interpolators.
Light weight base class for most itk classes.
Linearly interpolate an image at specified positions.
A templated class holding a n-Dimensional vector.
Warps an image using an input displacement field.
SmartPointer< Self > Pointer
ImageBaseType::DirectionType DirectionType
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
unsigned long SizeValueType
SizeValueType m_NumberOfPixelsProcessed
double m_SumOfSquaredChange
double m_SumOfSquaredDifference