18#ifndef itkGPUDemonsRegistrationFunction_h
19#define itkGPUDemonsRegistrationFunction_h
57template <
typename TFixedImage,
typename TMovingImage,
typename TDisplacementField>
83 using IndexType =
typename FixedImageType::IndexType;
84 using SizeType =
typename FixedImageType::SizeType;
103#ifndef ITK_FUTURE_LEGACY_REMOVE
104 using CoordRepType ITK_FUTURE_DEPRECATED(
105 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") =
CoordinateType;
155 auto * global =
new GlobalDataStruct();
157 global->m_SumOfSquaredDifference = 0.0;
158 global->m_NumberOfPixelsProcessed = 0L;
159 global->m_SumOfSquaredChange = 0;
305#ifndef ITK_MANUAL_INSTANTIATION
306# include "itkGPUDemonsRegistrationFunction.hxx"
Calculate the derivative by central differencing.
SmartPointer< Self > Pointer
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
A templated class holding a n-Dimensional covariant vector.
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
static constexpr unsigned int ImageDimension
Vector< float, Self::ImageDimension > FloatOffsetType
typename ImageType::PixelType PixelType
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
SmartPointer< Self > Pointer
GradientCalculatorPointer m_FixedImageGradientCalculator
void PrintSelf(std::ostream &os, Indent indent) const override
typename FixedImageType::IndexType IndexType
MovingImageGradientCalculatorPointer m_MovingImageGradientCalculator
GPUReduction< int >::Pointer m_GPUPixelCounter
void * GetGlobalDataPointer() const override
bool m_UseMovingImageGradient
SmartPointer< const Self > ConstPointer
virtual bool GetUseMovingImageGradient() const
PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
typename FixedImageType::SpacingType SpacingType
SmartPointer< Self > Pointer
typename InterpolatorType::Pointer InterpolatorPointer
GPUReduction< float >::Pointer m_GPUSquaredDifference
double m_SumOfSquaredDifference
void InitializeIteration() override
typename InterpolatorType::PointType PointType
virtual double GetRMSChange() const
SizeValueType m_NumberOfPixelsProcessed
void GPUAllocateMetricData(unsigned int numPixels) override
ConstNeighborhoodIterator< FixedImageType > FixedImageNeighborhoodIteratorType
InterpolatorType * GetMovingImageInterpolator()
typename MovingImageGradientCalculatorType::Pointer MovingImageGradientCalculatorPointer
void ReleaseGlobalDataPointer(void *GlobalData) const override
InterpolateImageFunction< MovingImageType, CoordinateType > InterpolatorType
GPUDataManager::Pointer GPUDataPointer
void GPUReleaseMetricData() override
double m_SumOfSquaredChange
typename FixedImageType::SizeType SizeType
itkGetOpenCLSourceFromKernelMacro(GPUDemonsRegistrationFunctionKernel)
PixelType m_ZeroUpdateReturn
void GPUComputeUpdate(const DisplacementFieldTypePointer output, DisplacementFieldTypePointer update, void *gd) override
CentralDifferenceImageFunction< MovingImageType, CoordinateType > MovingImageGradientCalculatorType
~GPUDemonsRegistrationFunction() override=default
static constexpr unsigned int ImageDimension
typename DisplacementFieldType::Pointer DisplacementFieldTypePointer
virtual double GetMetric() const
TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override
double m_IntensityDifferenceThreshold
GPUDemonsRegistrationFunction()
CovariantVector< double, Self::ImageDimension > CovariantVectorType
virtual void SetIntensityDifferenceThreshold(double)
std::mutex m_MetricCalculationMutex
virtual double GetIntensityDifferenceThreshold() const
GPUReduction< float >::Pointer m_GPUSquaredChange
void SetMovingImageInterpolator(InterpolatorType *ptr)
virtual void SetUseMovingImageGradient(bool flag)
int m_ComputeUpdateGPUKernelHandle
CentralDifferenceImageFunction< FixedImageType > GradientCalculatorType
GPUDemonsRegistrationFunction Self
typename GradientCalculatorType::Pointer GradientCalculatorPointer
InterpolatorPointer m_MovingImageInterpolator
GPUPDEDeformableRegistrationFunction< FixedImageType, MovingImageType, DisplacementFieldType > Superclass
LinearInterpolateImageFunction< MovingImageType, CoordinateType > DefaultInterpolatorType
double m_DenominatorThreshold
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
Vector< float, Self::ImageDimension > FloatOffsetType
typename ImageType::PixelType PixelType
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Base class for all image interpolators.
Point< CoordinateType, Self::ImageDimension > PointType
SmartPointer< Self > Pointer
Linearly interpolate an image at specified positions.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
itkGPUKernelClassMacro(GPUImageOpsKernel)
double m_SumOfSquaredChange
double m_SumOfSquaredDifference
SizeValueType m_NumberOfPixelsProcessed