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 
34 namespace itk
35 {
41 template< typename TImage >
42 class ITK_EXPORT OpenCLKernelToImageBridge
43 {
44 public:
45 
48 
50  typedef TImage ImageType;
51  typedef typename ImageType::ConstPointer ImagePointer;
52  typedef typename ImageType::RegionType ImageRegionType;
53  typedef typename ImageType::PixelType ImagePixelType;
54 
56  itkStaticConstMacro( ImageDimension, unsigned int, TImage::ImageDimension );
57 
59  virtual const char * GetNameOfClass() const { return "OpenCLKernelToImageBridge"; }
60 
61  static void SetImageDataManager( OpenCLKernel & kernel, const cl_uint argumentIndex,
62  const typename GPUDataManager::Pointer imageDataManager, const bool updateCPU );
63 
64  static void SetImage( OpenCLKernel & kernel, const cl_uint argumentIndex,
65  const typename ImageType::Pointer & image, const bool updateCPU );
66 
67  static void SetImageMetaData( OpenCLKernel & kernel, const cl_uint argumentIndex,
68  const typename ImageType::Pointer & image,
69  typename GPUDataManager::Pointer & imageMetaDataManager );
70 
71  static void SetDirection( OpenCLKernel & kernel, const cl_uint argumentIndex,
72  const typename ImageType::DirectionType & direction );
73 
74  static void SetSize( OpenCLKernel & kernel, const cl_uint argumentIndex,
75  const typename ImageType::SizeType & size );
76 
77  static void SetOrigin( OpenCLKernel & kernel, const cl_uint argumentIndex,
78  const typename ImageType::PointType & origin );
79 
80 protected:
81 
84 
85 private:
86 
87  OpenCLKernelToImageBridge( const Self & other ); // purposely not
88  // implemented
89  const Self & operator=( const Self & ); // purposely not
90 
91  // implemented
92 };
93 
94 } // end namespace itk
95 
96 #ifndef ITK_MANUAL_INSTANTIATION
97 #include "itkOpenCLKernelToImageBridge.hxx"
98 #endif
99 
100 #endif /* __itkOpenCLKernelToImageBridge_h */
The OpenCLKernel class represents an executable entry point function in an OpenCL program...
virtual const char * GetNameOfClass() const


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo