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
45namespace itk
46{
62template <typename TPixel, unsigned int NDimension>
63class ITK_TEMPLATE_EXPORT GPUImage;
64
65template <typename ImageType>
66class ITK_TEMPLATE_EXPORT ITKOpenCL_EXPORT GPUImageDataManager : public GPUDataManager
67{
68 // allow GPUKernelManager to access GPU buffer pointer
69 friend class OpenCLKernelManager;
70 friend class GPUImage<typename ImageType::PixelType, ImageType::ImageDimension>;
71
72public:
73 ITK_DISALLOW_COPY_AND_MOVE(GPUImageDataManager);
74
77 using Pointer = SmartPointer<Self>;
78 using ConstPointer = SmartPointer<const Self>;
79
80 itkNewMacro(Self);
81 itkTypeMacro(GPUImageDataManager, GPUDataManager);
82
83 void
84 SetImagePointer(typename ImageType::Pointer img);
85
87 void
88 UpdateCPUBuffer() override;
89
91 void
92 UpdateGPUBuffer() override;
93
95 virtual void
96 Graft(const GPUImageDataManager * data);
97
98protected:
99 GPUImageDataManager() { m_Image = nullptr; }
100 ~GPUImageDataManager() override = default;
101
102private:
103 typename ImageType::Pointer m_Image;
104};
105
106} // namespace itk
107
108#ifndef ITK_MANUAL_INSTANTIATION
109# include "itkGPUImageDataManager.hxx"
110#endif
111
112#endif
GPU memory manager implemented using OpenCL. Required by GPUImage class.
~GPUImageDataManager() override=default
SmartPointer< const Self > ConstPointer
Templated n-dimensional image class for the GPU.
Definition: itkGPUImage.h:64
OpenCL kernel manager implemented using OpenCL.
#define ITKOpenCL_EXPORT


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