go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkOpenCLKernelToImageBridge.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 * http://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//
19// \author Denis P. Shamonin and Marius Staring. Division of Image Processing,
20// Department of Radiology, Leiden, The Netherlands
21//
22// \note This work was funded by the Netherlands Organisation for
23// Scientific Research (NWO NRG-2010.02 and NWO 639.021.124).
24//
25
26#ifndef itkOpenCLKernelToImageBridge_h
27#define itkOpenCLKernelToImageBridge_h
28
29#include "itkGPUImage.h"
30#include "itkGPUDataManager.h"
31
32#include "itkOpenCLKernel.h"
33
34namespace itk
35{
41template <typename TImage>
42class ITK_TEMPLATE_EXPORT OpenCLKernelToImageBridge
43{
44public:
47
49 using ImageType = TImage;
50 using ImagePointer = typename ImageType::ConstPointer;
51 using ImageRegionType = typename ImageType::RegionType;
52 using ImagePixelType = typename ImageType::PixelType;
53
55 itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
56
58 virtual const char *
60 {
61 return "OpenCLKernelToImageBridge";
62 }
63
64 static void
66 const cl_uint argumentIndex,
67 const typename GPUDataManager::Pointer imageDataManager,
68 const bool updateCPU);
69
70 static void
72 const cl_uint argumentIndex,
73 const typename ImageType::Pointer & image,
74 const bool updateCPU);
75
76 static void
78 const cl_uint argumentIndex,
79 const typename ImageType::Pointer & image,
80 typename GPUDataManager::Pointer & imageMetaDataManager);
81
82 static void
83 SetDirection(OpenCLKernel & kernel, const cl_uint argumentIndex, const typename ImageType::DirectionType & direction);
84
85 static void
86 SetSize(OpenCLKernel & kernel, const cl_uint argumentIndex, const typename ImageType::SizeType & size);
87
88 static void
89 SetOrigin(OpenCLKernel & kernel, const cl_uint argumentIndex, const typename ImageType::PointType & origin);
90
91protected:
94
95private:
96 OpenCLKernelToImageBridge(const Self & other); // purposely not
97 // implemented
98 const Self &
99 operator=(const Self &); // purposely not
100
101 // implemented
102};
103
104} // end namespace itk
105
106#ifndef ITK_MANUAL_INSTANTIATION
107# include "itkOpenCLKernelToImageBridge.hxx"
108#endif
109
110#endif /* itkOpenCLKernelToImageBridge_h */
itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension)
static void SetDirection(OpenCLKernel &kernel, const cl_uint argumentIndex, const typename ImageType::DirectionType &direction)
OpenCLKernelToImageBridge(const Self &other)
typename ImageType::ConstPointer ImagePointer
static void SetImage(OpenCLKernel &kernel, const cl_uint argumentIndex, const typename ImageType::Pointer &image, const bool updateCPU)
const Self & operator=(const Self &)
static void SetImageMetaData(OpenCLKernel &kernel, const cl_uint argumentIndex, const typename ImageType::Pointer &image, typename GPUDataManager::Pointer &imageMetaDataManager)
typename ImageType::RegionType ImageRegionType
virtual const char * GetNameOfClass() const
static void SetSize(OpenCLKernel &kernel, const cl_uint argumentIndex, const typename ImageType::SizeType &size)
typename ImageType::PixelType ImagePixelType
static void SetOrigin(OpenCLKernel &kernel, const cl_uint argumentIndex, const typename ImageType::PointType &origin)
static void SetImageDataManager(OpenCLKernel &kernel, const cl_uint argumentIndex, const typename GPUDataManager::Pointer imageDataManager, const bool updateCPU)
The OpenCLKernel class represents an executable entry point function in an OpenCL program.


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo