go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGPUImageDataManager.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 *
20 * Copyright Insight Software Consortium
21 *
22 * Licensed under the Apache License, Version 2.0 (the "License");
23 * you may not use this file except in compliance with the License.
24 * You may obtain a copy of the License at
25 *
26 * http://www.apache.org/licenses/LICENSE-2.0.txt
27 *
28 * Unless required by applicable law or agreed to in writing, software
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
33 *
34 *=========================================================================*/
35 #ifndef __itkGPUImageDataManager_h
36 #define __itkGPUImageDataManager_h
37 
38 #include <itkObject.h>
39 #include <itkTimeStamp.h>
40 #include <itkLightObject.h>
41 #include <itkObjectFactory.h>
42 #include "itkGPUImage.h"
43 #include "itkGPUDataManager.h"
44 #include "itkSimpleFastMutexLock.h"
45 
46 namespace itk
47 {
63 template< typename TPixel, unsigned int NDimension >
64 class GPUImage;
65 
66 template< typename ImageType >
68 {
69  // allow GPUKernelManager to access GPU buffer pointer
70  friend class OpenCLKernelManager;
71  friend class GPUImage< typename ImageType::PixelType, ImageType::ImageDimension >;
72 
73 public:
74 
77  typedef SmartPointer< Self > Pointer;
78  typedef SmartPointer< const Self > ConstPointer;
79 
80  itkNewMacro( Self );
81  itkTypeMacro( GPUImageDataManager, GPUDataManager );
82 
83  void SetImagePointer( typename ImageType::Pointer img );
84 
86  virtual void UpdateCPUBuffer();
87 
89  virtual void UpdateGPUBuffer();
90 
92  virtual void Graft( const GPUImageDataManager * data );
93 
94 protected:
95 
96  GPUImageDataManager() { m_Image = NULL; }
97  virtual ~GPUImageDataManager() {}
98 
99 private:
100 
101  GPUImageDataManager( const Self & ); // purposely not implemented
102  void operator=( const Self & ); // purposely not implemented
103 
104  typename ImageType::Pointer m_Image;
105 };
106 
107 } // namespace itk
108 
109 #ifndef ITK_MANUAL_INSTANTIATION
110 #include "itkGPUImageDataManager.hxx"
111 #endif
112 
113 #endif
GPU memory manager implemented using OpenCL. Required by GPUImage class.
OpenCL kernel manager implemented using OpenCL.
Templated n-dimensional image class for the GPU.
Definition: itkGPUImage.h:63
SmartPointer< const Self > ConstPointer
#define ITKOpenCL_EXPORT


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