ITK  6.0.0
Insight Toolkit
itkGPUCastImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkGPUCastImageFilter_h
19 #define itkGPUCastImageFilter_h
20 
21 #include "itkCastImageFilter.h"
23 
24 #include "itkGPUFunctorBase.h"
25 #include "itkGPUKernelManager.h"
27 
28 namespace itk
29 {
30 
32 itkGPUKernelClassMacro(GPUCastImageFilterKernel);
33 
48 namespace Functor
49 {
50 
51 template <typename TInput, typename TOutput>
52 class ITK_TEMPLATE_EXPORT GPUCast : public GPUFunctorBase
53 {
54 public:
55  GPUCast() {}
56 
57  ~GPUCast() {}
58 
62  int
63  SetGPUKernelArguments(GPUKernelManager::Pointer itkNotUsed(kernelManager), int itkNotUsed(kernelHandle))
64  {
65  return 0;
66  }
67 };
68 
69 } // end of namespace Functor
70 
71 template <typename TInputImage, typename TOutputImage>
72 class ITK_TEMPLATE_EXPORT GPUCastImageFilter
74  TInputImage,
75  TOutputImage,
76  Functor::GPUCast<typename TInputImage::PixelType, typename TOutputImage::PixelType>,
77  CastImageFilter<TInputImage, TOutputImage>>
78 {
79 public:
80  ITK_DISALLOW_COPY_AND_MOVE(GPUCastImageFilter);
81 
84  using GPUSuperclass =
85  GPUUnaryFunctorImageFilter<TInputImage,
86  TOutputImage,
92 
94  itkNewMacro(Self);
95 
97  itkOverrideGetNameOfClassMacro(GPUCastImageFilter);
98 
100  using InputPixelType = typename TInputImage::PixelType;
101  using OutputPixelType = typename TOutputImage::PixelType;
102 
105 
106 protected:
108  ~GPUCastImageFilter() override {}
109 
112  void
113  GPUGenerateData() override;
114 
115 private:
116 };
117 
118 } // end of namespace itk
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 # include "itkGPUCastImageFilter.hxx"
122 #endif
123 
124 #endif /* itkGPUCastImageFilter_h */
itk::Functor::GPUFunctorBase
Base functor class for GPU functor image filters.
Definition: itkGPUFunctorBase.h:33
itk::SimpleDataObjectDecorator
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Definition: itkSimpleDataObjectDecorator.h:66
itk::CastImageFilter
Casts input pixels to output pixel type.
Definition: itkCastImageFilter.h:100
itk::GPUCastImageFilter
GPU version of CastImageFilter.
Definition: itkGPUCastImageFilter.h:72
itk::Functor::GPUCast
Definition: itkGPUCastImageFilter.h:52
itk::CastImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkCastImageFilter.h:117
itk::SmartPointer< Self >
itkCastImageFilter.h
itkGPUKernelManager.h
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::GPUCastImageFilter::~GPUCastImageFilter
~GPUCastImageFilter() override
Definition: itkGPUCastImageFilter.h:108
itk::Functor::GPUCast::SetGPUKernelArguments
int SetGPUKernelArguments(GPUKernelManager::Pointer, int)
Definition: itkGPUCastImageFilter.h:63
itk::GPUUnaryFunctorImageFilter
Implements pixel-wise generic operation on one image using the GPU.
Definition: itkGPUUnaryFunctorImageFilter.h:39
itkGPUFunctorBase.h
itk::Functor::GPUCast::GPUCast
GPUCast()
Definition: itkGPUCastImageFilter.h:55
itk::CastImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkCastImageFilter.h:116
itk::Functor::GPUCast::~GPUCast
~GPUCast()
Definition: itkGPUCastImageFilter.h:57
itk::itkGPUKernelClassMacro
itkGPUKernelClassMacro(GPUImageOpsKernel)
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkSimpleDataObjectDecorator.h
itkGPUUnaryFunctorImageFilter.h