Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkOclBaseData.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef __mitkOclBaseData_h
18 #define __mitkOclBaseData_h
19 
20 #include "MitkOpenCLExports.h"
21 #include "mitkOclUtils.h"
22 
23 #include "mitkOpenCL.h"
24 
25 #include <mitkCommon.h>
26 #include <itkObjectFactory.h>
27 #include <itkObject.h>
28 
29 namespace mitk
30 {
31 
32  class MITKOPENCL_EXPORT OclBaseData : public itk::Object
33  {
34  public:
36 
40  virtual int TransferDataToGPU(cl_command_queue) = 0;
41 
45  virtual void* TransferDataToCPU(cl_command_queue) = 0;
46 
48  void GPUModified();
49 
51  void CPUModified();
52 
53 
55  virtual cl_mem GetGPUBuffer();
56 
57  protected:
59  OclBaseData();
60 
62  virtual ~OclBaseData();
63 
64  private:
65 
67  size_t m_BufferSize;
68 
70  cl_mem m_GPUBuffer;
71 
73  void* m_CPUBuffer;
74  };
75 
76 }
77 
78 #endif // __mitkOclBaseData_h
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53