ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkCudaZengForwardProjectionImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright RTK Consortium
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 rtkCudaZengForwardProjectionImageFilter_h
19#define rtkCudaZengForwardProjectionImageFilter_h
20
21#include "rtkConfiguration.h"
22#ifdef RTK_USE_CUDA
23
25# include "RTKExport.h"
26# include <itkCudaImage.h>
27# include <itkCudaInPlaceImageFilter.h>
28# include <itkImageBase.h>
29
30namespace rtk
31{
32
44class RTK_EXPORT CudaZengForwardProjectionImageFilter
45 : public itk::CudaInPlaceImageFilter<
46 itk::CudaImage<float, 3>,
47 itk::CudaImage<float, 3>,
48 ZengForwardProjectionImageFilter<itk::CudaImage<float, 3>, itk::CudaImage<float, 3>>>
49{
50public:
51 ITK_DISALLOW_COPY_AND_MOVE(CudaZengForwardProjectionImageFilter);
52 using ImageType = itk::CudaImage<float, 3>;
55 using CPUImageType = itk::ImageBase<3>;
56 using ProjectorType = ZengForwardProjectionImageFilter<ImageType, ImageType>;
57 using Self = CudaZengForwardProjectionImageFilter;
58 using Superclass = itk::CudaInPlaceImageFilter<ImageType, ImageType, ProjectorType>;
59 using Pointer = itk::SmartPointer<Self>;
60 using ConstPointer = itk::SmartPointer<const Self>;
61
62 itkNewMacro(Self);
63 itkOverrideGetNameOfClassMacro(CudaZengForwardProjectionImageFilter);
64
66 itkSetMacro(BatchSize, unsigned int);
67 itkGetConstMacro(BatchSize, unsigned int);
68
69protected:
70 CudaZengForwardProjectionImageFilter();
71 ~CudaZengForwardProjectionImageFilter() override;
72 void
73 EnlargeOutputRequestedRegion(itk::DataObject * output) override;
74 void
75 GPUGenerateData() override;
76
77private:
78 void * m_CudaWorkspace{ nullptr };
79 unsigned int m_BatchSize{ 0 };
80};
81
82} // namespace rtk
83#endif // RTK_USE_CUDA
84#endif // rtkCudaZengForwardProjectionImageFilter_h
class ITK_FORWARD_EXPORT DataObject
#define itkSetMacro(name, type)