Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkOclImageFormats_h
14 #define mitkOclImageFormats_h
15 
16 //mitk
17 #include <mitkCommon.h>
18 #include <mitkLog.h>
19 
20 //itk
21 #include <itkLightObject.h>
22 #include <itkObjectFactory.h>
23 
24 //ocl
25 #include "mitkOclUtils.h"
26 #include <MitkOpenCLExports.h>
27 
28 #define MAX_FORMATS 10
29 #define MAX_DATA_TYPES 12
30 
31 namespace mitk
32 {
33 
40 class MITKOPENCL_EXPORT OclImageFormats : public itk::LightObject
41 {
42 public:
43  mitkClassMacroItkParent(OclImageFormats, itk::LightObject);
44  itkFactorylessNewMacro(Self);
45  itkCloneMacro(Self);
46 
51  bool IsFormatSupported(cl_image_format* format);
52 
62  bool GetNearestSupported(cl_image_format* inputformat, cl_image_format* outputformat);
63 
68  void SetGPUContext( cl_context context );
69 
70 
71 protected:
75  void CollectAvailableFormats();
76 
81 
83  virtual ~OclImageFormats();
84 
85 private:
86 
96  void SortFormats( cl_image_format* formats, cl_uint count, int val=1 , int dims = 2);
97 
100  unsigned int GetOffset( cl_image_format format );
101 
102  using itk::LightObject::PrintSelf;
104  void PrintSelf();
105 
107  unsigned char* m_Image2DSupport;
108 
110  unsigned char* m_Image3DSupport;
111 
113  cl_context m_GpuContext;
114 };
115 
116 }
117 
118 #endif
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkOclUtils.h
mitkCommon.h
mitkLog.h
mitk::OclImageFormats
Definition: mitkOclImageFormats.h:40