18#ifndef itkDemonsRegistrationFunction_h
19#define itkDemonsRegistrationFunction_h
53template <
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;
193 m_UseMovingImageGradient = flag;
198 return m_UseMovingImageGradient;
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"
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.
void * GetGlobalDataPointer() const override
typename GradientCalculatorType::Pointer GradientCalculatorPointer
~DemonsRegistrationFunction() override=default
typename MovingImageGradientCalculatorType::Pointer MovingImageGradientCalculatorPointer
DemonsRegistrationFunction()
void ReleaseGlobalDataPointer(void *gd) const override
void InitializeIteration() override
typename FixedImageType::SizeType SizeType
PixelType ComputeUpdate(const NeighborhoodType &it, void *gd, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
typename InterpolatorType::PointType PointType
typename InterpolatorType::Pointer InterpolatorPointer
virtual bool GetUseMovingImageGradient() const
virtual double GetMetric() const
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetUseMovingImageGradient(bool flag)
TimeStepType ComputeGlobalTimeStep(void *) const override
typename FixedImageType::SpacingType SpacingType
void SetMovingImageInterpolator(InterpolatorType *ptr)
InterpolatorType * GetMovingImageInterpolator()
virtual double GetRMSChange() const
virtual double GetIntensityDifferenceThreshold() const
typename FixedImageType::IndexType IndexType
virtual void SetIntensityDifferenceThreshold(double)
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.
SmartPointer< Self > Pointer
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
double m_SumOfSquaredDifference
SizeValueType m_NumberOfPixelsProcessed
double m_SumOfSquaredChange