go home Home | Main Page | Topics | 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 itkOverrideGetNameOfClassMacro(GPUImageDataManager);
82
83 void
84 SetImagePointer(ImageType * img);
85
87 void
88 UpdateCPUBuffer() override;
89
91 void
92 UpdateGPUBuffer() override;
93
95 virtual void
96 Graft(const GPUImageDataManager * data);
97
98protected:
100 ~GPUImageDataManager() override = default;
101
102private:
103 WeakPointer<ImageType> m_Image; // WeakPointer has to be used here
104 // to avoid SmartPointer loop
105};
106
107} // namespace itk
108
109#ifndef ITK_MANUAL_INSTANTIATION
110# include "itkGPUImageDataManager.hxx"
111#endif
112
113#endif
~GPUImageDataManager() override=default
SmartPointer< const Self > ConstPointer
WeakPointer< ImageType > m_Image
ITK_DISALLOW_COPY_AND_MOVE(GPUImageDataManager)
void UpdateGPUBuffer() override
itkOverrideGetNameOfClassMacro(GPUImageDataManager)
void SetImagePointer(ImageType *img)
virtual void Graft(const GPUImageDataManager *data)
void UpdateCPUBuffer() override
Templated n-dimensional image class for the GPU.
Definition itkGPUImage.h:64
#define ITKOpenCL_EXPORT


Generated on 26-02-2026 for elastix by doxygen 1.16.1 (669aeeefca743c148e2d935b3d3c69535c7491e6) elastix logo