17 #ifndef __mitkOclImage_h
18 #define __mitkOclImage_h
26 #include "MitkOpenCLExports.h"
35 #define SHORT_IM mitk::MakeScalarPixelType<short>()
36 #define FLOAT_IM mitk::MakeScalarPixelType<float>()
53 itkFactorylessNewMacro(Self)
57 virtual int TransferDataToGPU(cl_command_queue);
60 virtual void* TransferDataToCPU(cl_command_queue);
73 cl_mem GetGPUImage(cl_command_queue);
78 return this->m_gpuImage;
84 cl_mem CreateGPUImage(
unsigned int,
unsigned int,
unsigned int,
unsigned int);
90 bool IsModified(
int _type);
96 void Modified(
int _type);
100 void InitializeMITKImage();
106 int GetDimension(
int)
const;
118 float GetSpacing(
int);
121 void GetOffset(
float*)
const;
125 void SetPixelType(
const cl_image_format*);
138 return &(this->m_proposedFormat);
142 void SetDimensions(
unsigned int* Dims);
145 void SetDimension(
unsigned short dim);
165 cl_image_format ConvertPixelTypeToOCLFormat();
173 unsigned short m_dim;
175 unsigned int* m_Dims;
177 unsigned short m_BpE;
179 cl_int AllocateGPUImage();
184 bool m_formatSupported;
187 cl_image_format m_supportedFormat;
190 cl_image_format m_proposedFormat;
204 #endif //__mitkOclImage_h
short GetBytesPerPixel() const
DataCollection - Class to facilitate loading/accessing structured data.
The ImageTypeIsNotSupportedByGPU class specialized exception class for unsupported image formats...
Class implementing the image format for GPU Image Processing.
unsigned int * GetDimensions()
returns the pointer to the array of image sizes
int GetDimension() const
returns the dimensionality of the image
An object of this class represents an exception of MITK. Please don't instantiate exceptions manually...
#define mitkClassMacro(className, SuperClassName)
#define mitkExceptionClassMacro(ClassName, SuperClassName)
Image::Pointer GetMITKImage()
Returns the pointer to the referenced mitk::Image.
const cl_image_format * GetPixelType() const
Get the currently used pixel type.
unsigned int m_bufferSize