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 GPUImage;
64
65template< typename ImageType >
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
76 typedef SmartPointer< Self > Pointer;
77 typedef SmartPointer< const Self > ConstPointer;
78
79 itkNewMacro( Self );
80 itkTypeMacro( GPUImageDataManager, GPUDataManager );
81
82 void SetImagePointer( typename ImageType::Pointer img );
83
85 void UpdateCPUBuffer() override;
86
88 void UpdateGPUBuffer() override;
89
91 virtual void Graft( const GPUImageDataManager * data );
92
93protected:
94
95 GPUImageDataManager() { m_Image = nullptr; }
97
98private:
99
100 GPUImageDataManager( const Self & ); // purposely not implemented
101 void operator=( const Self & ); // purposely not implemented
102
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.
SmartPointer< const Self > ConstPointer
void operator=(const Self &)
GPUImageDataManager(const Self &)
Templated n-dimensional image class for the GPU.
Definition: itkGPUImage.h:64
OpenCL kernel manager implemented using OpenCL.
#define ITKOpenCL_EXPORT


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo