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;
119 m_MovingImageInterpolator = ptr;
126 return m_MovingImageInterpolator;
143 global->m_SumOfSquaredDifference = 0.0;
144 global->m_NumberOfPixelsProcessed = 0L;
145 global->m_SumOfSquaredChange = 0;
189 m_UseMovingImageGradient = flag;
194 return m_UseMovingImageGradient;
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"
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