19#ifndef itkGPUSmoothingRecursiveYvvGaussianImageFilter_h
20#define itkGPUSmoothingRecursiveYvvGaussianImageFilter_h
29# include "itkOpenCLUtil.h"
30# include "itkGPUImageToImageFilter.h"
49itkGPUKernelClassMacro(GPUSmoothingRecursiveYvvGaussianImageFilterKernel);
51template <
typename TInputImage,
typename TOutputImage = TInputImage>
52class ITK_EXPORT GPUSmoothingRecursiveYvvGaussianImageFilter
53 :
public GPUImageToImageFilter<TInputImage,
55 SmoothingRecursiveYvvGaussianImageFilter<TInputImage, TOutputImage>>
58 ITK_DISALLOW_COPY_AND_MOVE(GPUSmoothingRecursiveYvvGaussianImageFilter);
61 using Self = GPUSmoothingRecursiveYvvGaussianImageFilter;
64 using Superclass = GPUImageToImageFilter<TInputImage,
66 SmoothingRecursiveYvvGaussianImageFilter<TInputImage, TOutputImage>>;
67 using GPUSuperclass = GPUImageToImageFilter<TInputImage,
69 SmoothingRecursiveYvvGaussianImageFilter<TInputImage, TOutputImage>>;
70 using Pointer = SmartPointer<Self>;
71 using ConstPointer = SmartPointer<const Self>;
74 using InputImageType = TInputImage;
75 using OutputImageType = TOutputImage;
76 using PixelType =
typename TInputImage::PixelType;
78 using RealType =
typename NumericTraits<PixelType>::RealType;
79 using ScalarRealType =
typename NumericTraits<PixelType>::ScalarRealType;
81 using RealType =
typename NumericTraits<PixelType>::FloatType;
82 using ScalarRealType =
typename NumericTraits<PixelType>::FloatType;
85 using GPUInputImage =
typename itk::GPUTraits<TInputImage>::Type;
86 using GPUOutputImage =
typename itk::GPUTraits<TOutputImage>::Type;
89 itkOverrideGetNameOfClassMacro(GPUSmoothingRecursiveYvvGaussianImageFilter);
92 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
95 using SigmaArrayType = FixedArray<ScalarRealType, Self::ImageDimension>;
101 using InternalRealType =
typename NumericTraits<PixelType>::FloatType;
102 using RealImageType = GPUImage<InternalRealType, Self::ImageDimension>;
105 using OutputImagePointer =
typename OutputImageType::Pointer;
115 SetSigmaArray(
const SigmaArrayType & sigmas);
118 SetSigma(ScalarRealType sigma);
121 GetSigmaArray()
const;
128 SetNormalizeAcrossScale(
bool normalizeInScaleSpace);
131 GetNormalizeAcrossScale()
const override
133 return m_NormalizeAcrossScale;
137 SetUp(ScalarRealType spacing);
139 itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<PixelType>));
141 itkGetOpenCLSourceFromKernelMacro(GPUSmoothingRecursiveYvvGaussianImageFilterKernel);
143 SetInput(
const TInputImage * input)
override;
144 using Superclass::SetInput;
147 GPUSmoothingRecursiveYvvGaussianImageFilter();
148 ~GPUSmoothingRecursiveYvvGaussianImageFilter()
override =
default;
150 PrintSelf(std::ostream & os, Indent indent)
const override;
154 GPUGenerateData()
override;
162 GenerateInputRequestedRegion() noexcept override;
166 EnlargeOutputRequestedRegion(DataObject * output) override;
169 AllocateGPUCoefficients();
171 std::ostringstream defines;
177 ScalarRealType * m_Bvalues;
180 ScalarRealType * m_CPUMatrix;
182 using GPUDataPointer = GPUDataManager::Pointer;
184 GPUDataPointer m_GPUMMatrixDataManager;
185 GPUDataPointer m_GPUBCoefficientsDataManager;
186 GPUDataPointer m_GPULocalDataManager;
193 bool m_NormalizeAcrossScale;
195 int m_FilterGPUKernelHandle;
196 typename GPUInputImage::Pointer inPtr;
197 typename GPUOutputImage::Pointer otPtr;
198 typename GPUOutputImage::SizeType m_requestedSize;
200 SigmaArrayType m_Sigma;
204# ifndef ITK_MANUAL_INSTANTIATION
205# include "itkGPUSmoothingRecursiveYvvGaussianImageFilter.hxx"
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....