18#ifndef itkGPUResampleImageFilter_h
19#define itkGPUResampleImageFilter_h
21#include "itkResampleImageFilter.h"
46template <
typename TInputImage,
47 typename TOutputImage,
48 typename TInterpolatorPrecisionType =
float,
49 typename TTransformPrecisionType = TInterpolatorPrecisionType>
54 ResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType>>
62 ResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType>;
90 using SizeType =
typename CPUSuperclass::SizeType;
91 using IndexType =
typename CPUSuperclass::IndexType;
123 itkSetMacro(RequestedNumberOfSplits,
unsigned int);
124 itkGetConstMacro(RequestedNumberOfSplits,
unsigned int);
130 PrintSelf(std::ostream & os, Indent indent)
const override;
152 const typename GPUOutputImage::Pointer & output);
161 const typename GPUOutputImage::Pointer & output);
195 unsigned int m_RequestedNumberOfSplits{};
201 class TransformKernelHelper
204 std::string m_TransformTypeAsString;
205 std::: size_t m_TransformKernelHandle;
207 TransformKernelHelper()
209 m_TransformType = GPUResampleImageFilter::Else;
210 m_TransformTypeAsString =
"Else";
211 m_TransformKernelHandle = 0;
218 std::vector< TransformKernelHelper > m_SupportedTransformKernels{};
221 std::vector<std::string> m_Sources{};
222 std::size_t m_SourceIndex{};
224 std::size_t m_InterpolatorSourceLoadedIndex{};
225 std::size_t m_TransformSourceLoadedIndex{};
227 bool m_InterpolatorIsBSpline{};
228 bool m_TransformIsCombo{};
230 std::size_t m_FilterPreGPUKernelHandle{};
232 std::size_t m_FilterPostGPUKernelHandle{};
242#ifndef ITK_MANUAL_INSTANTIATION
243# include "itkGPUResampleImageFilter.hxx"
GPU version of BSplineInterpolateImageFunction.
typename GPUCoefficientImageType::Pointer GPUCoefficientImagePointer
typename GPUDataManager::Pointer GPUDataManagerPointer
class to abstract the behaviour of the GPU filters.
Templated n-dimensional image class for the GPU.
Base class fro all GPU interpolators.
GPU version of ResampleImageFilter.
GPUBSplineBaseTransformType * GetGPUBSplineBaseTransform(const std::vcl_size_t transformIndex)
SmartPointer< const Self > ConstPointer
~GPUResampleImageFilter() override=default
TInterpolatorPrecisionType InterpolatorPrecisionType
bool HasTransform(const GPUTransformTypeEnum type) const
std::pair< int, bool > TransformHandle
typename GPUDataManager::Pointer GPUDataManagerPointer
TInputImage InputImageType
const GPUTransformTypeEnum GetTransformType(const int &transformIndex) const
typename GPUTraits< TOutputImage >::Type GPUOutputImage
void GPUGenerateData() override
bool GetKernelIdFromTransformId(const std::vcl_size_t &index, std::vcl_size_t &kernelId) const
typename GPUBSplineInterpolatorType::GPUDataManagerPointer GPUBSplineInterpolatorDataManagerPointer
void SetBSplineTransformCoefficientsToGPU(const std::vcl_size_t transformIndex)
void SetExtrapolator(ExtrapolatorType *_arg) override
void SetArgumentsForLoopKernelManager(const typename GPUInputImage::Pointer &input, const typename GPUOutputImage::Pointer &output)
typename GPUSuperclass::OutputImagePixelType OutputImagePixelType
void SetArgumentsForPreKernelManager(const typename GPUOutputImage::Pointer &output)
int GetTransformHandle(const GPUTransformTypeEnum type) const
std::map< GPUTransformTypeEnum, TransformHandle > TransformsHandle
void SetTransformParametersForLoopKernelManager(const std::vcl_size_t transformIndex)
typename CPUSuperclass::InputImageRegionType InputImageRegionType
void SetTransform(const TransformType *_arg) override
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
typename OpenCLKernelManager::Pointer GPUKernelManagerPointer
typename CPUSuperclass::OutputImageRegionType OutputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
void SetInterpolator(InterpolatorType *_arg) override
typename GPUBSplineInterpolatorType::GPUCoefficientImagePointer GPUBSplineInterpolatorCoefficientImagePointer
typename CPUSuperclass::IndexType IndexType
void SetArgumentsForPostKernelManager(const typename GPUInputImage::Pointer &input, const typename GPUOutputImage::Pointer &output)
typename GPUBSplineInterpolatorType::GPUCoefficientImageType GPUBSplineInterpolatorCoefficientImageType
ITK_DISALLOW_COPY_AND_MOVE(GPUResampleImageFilter)
typename CPUSuperclass::InterpolatorType InterpolatorType
typename CPUSuperclass::SizeType SizeType
typename CPUSuperclass::TransformType TransformType
TOutputImage OutputImageType
typename CPUSuperclass::ExtrapolatorType ExtrapolatorType
ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType > CPUSuperclass
typename GPUTraits< TInputImage >::Type GPUInputImage
itkGPUKernelClassMacro(GPUBSplineTransformKernel)