18#ifndef itkGPUDemonsRegistrationFunction_h
19#define itkGPUDemonsRegistrationFunction_h
57template <
typename TFixedImage,
typename TMovingImage,
typename TDisplacementField>
77 using typename Superclass::MovingImageType;
78 using typename Superclass::MovingImagePointer;
81 using typename Superclass::FixedImageType;
82 using typename Superclass::FixedImagePointer;
88 using typename Superclass::DisplacementFieldType;
89 using typename Superclass::DisplacementFieldTypePointer;
92 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
129 m_MovingImageInterpolator = ptr;
136 return m_MovingImageInterpolator;
153 global->m_SumOfSquaredDifference = 0.0;
154 global->m_NumberOfPixelsProcessed = 0L;
155 global->m_SumOfSquaredChange = 0;
216 m_UseMovingImageGradient = flag;
221 return m_UseMovingImageGradient;
255 int m_ComputeUpdateGPUKernelHandle{};
262 double m_Normalizer{};
269 bool m_UseMovingImageGradient{};
278 double m_DenominatorThreshold{};
281 double m_IntensityDifferenceThreshold{};
286 mutable double m_Metric{};
287 mutable double m_SumOfSquaredDifference{};
289 mutable double m_RMSChange{};
290 mutable double m_SumOfSquaredChange{};
297 mutable std::mutex m_MetricCalculationMutex{};
301#ifndef ITK_MANUAL_INSTANTIATION
302# include "itkGPUDemonsRegistrationFunction.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.
typename ImageType::PixelType PixelType
typename ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename FixedImageType::IndexType IndexType
void * GetGlobalDataPointer() const override
virtual bool GetUseMovingImageGradient() const
PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
typename FixedImageType::SpacingType SpacingType
typename InterpolatorType::Pointer InterpolatorPointer
void InitializeIteration() override
typename InterpolatorType::PointType PointType
virtual double GetRMSChange() const
void GPUAllocateMetricData(unsigned int numPixels) override
InterpolatorType * GetMovingImageInterpolator()
typename MovingImageGradientCalculatorType::Pointer MovingImageGradientCalculatorPointer
void ReleaseGlobalDataPointer(void *GlobalData) const override
void GPUReleaseMetricData() override
typename FixedImageType::SizeType SizeType
itkGetOpenCLSourceFromKernelMacro(GPUDemonsRegistrationFunctionKernel)
void GPUComputeUpdate(const DisplacementFieldTypePointer output, DisplacementFieldTypePointer update, void *gd) override
~GPUDemonsRegistrationFunction() override=default
virtual double GetMetric() const
GPUDemonsRegistrationFunction()
virtual void SetIntensityDifferenceThreshold(double)
virtual double GetIntensityDifferenceThreshold() const
void SetMovingImageInterpolator(InterpolatorType *ptr)
virtual void SetUseMovingImageGradient(bool flag)
typename GradientCalculatorType::Pointer GradientCalculatorPointer
TimeStepType ComputeGlobalTimeStep(void *) const override
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....
itkGPUKernelClassMacro(GPUImageOpsKernel)
unsigned long SizeValueType
double m_SumOfSquaredChange
double m_SumOfSquaredDifference
SizeValueType m_NumberOfPixelsProcessed