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
mitkOclImageFormats.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 __mitkOclImageFormats_h
18 #define __mitkOclImageFormats_h
19 
20 //mitk
21 #include <mitkCommon.h>
22 #include <mitkLogMacros.h>
23 
24 //itk
25 #include <itkLightObject.h>
26 #include <itkObjectFactory.h>
27 
28 //ocl
29 #include "mitkOclUtils.h"
30 #include <MitkOpenCLExports.h>
31 
32 #define MAX_FORMATS 10
33 #define MAX_DATA_TYPES 12
34 
35 namespace mitk
36 {
37 
44 class MITKOPENCL_EXPORT OclImageFormats : public itk::LightObject
45 {
46 public:
47  mitkClassMacroItkParent(OclImageFormats, itk::LightObject);
48  itkFactorylessNewMacro(Self)
49  itkCloneMacro(Self)
50 
51 
55  bool IsFormatSupported(cl_image_format* format);
56 
66  bool GetNearestSupported(cl_image_format* inputformat, cl_image_format* outputformat);
67 
72  void SetGPUContext( cl_context context );
73 
74 
75 protected:
79  void CollectAvailableFormats();
80 
85 
87  virtual ~OclImageFormats();
88 
89 private:
90 
100  void SortFormats( cl_image_format* formats, cl_uint count, int val=1 , int dims = 2);
101 
104  unsigned int GetOffset( cl_image_format format );
105 
107  void PrintSelf();
108 
110  unsigned char* m_Image2DSupport;
111 
113  unsigned char* m_Image3DSupport;
114 
116  cl_context m_GpuContext;
117 };
118 
119 }
120 
121 #endif // __mitkOclImageFormats_h
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53