Drive Engine  1.0.0
Plateforme de reconstruction 3D
DriveEngine::IImage Class Referenceabstract

The image datatype interface. More...

#include <IImage.h>

Inheritance diagram for DriveEngine::IImage:
DriveEngine::IDatatype IExportable

Public Member Functions

virtual int GetWidth () const =0
 Gets the width. More...
 
virtual int GetHeight () const =0
 Gets the height. More...
 
virtual const IColorGetPixelColor (int x, int y) const =0
 Gets the color. More...
 
virtual float GetPixelIntensity (int x, int y) const =0
 Gets the intensity. More...
 
virtual const char * GetBuffer () const =0
 Gets the memory buffer. This method should be used carefully. More...
 
virtual Size GetBufferSize () const =0
 Gets the memory buffer size, in bytes. More...
 
virtual int GetPixelSize () const =0
 Gets the size of a pixel, in bytes. More...
 
virtual int GetNbChannels () const =0
 Gets the number of channel. Must be 1 for a gray scaled image, 3 for a colored image. More...
 
- Public Member Functions inherited from IExportable
virtual void Delete () const =0
 Deletes the current object. Needed for memory management. More...
 

Detailed Description

The image datatype interface.

Every image or frame must extends this interface.

It minimally contain it's size, in pixel.

Member Function Documentation

virtual const char* DriveEngine::IImage::GetBuffer ( ) const
pure virtual

Gets the memory buffer. This method should be used carefully.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
The memory buffer.
virtual Size DriveEngine::IImage::GetBufferSize ( ) const
pure virtual

Gets the memory buffer size, in bytes.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
The memory buffer size.
virtual int DriveEngine::IImage::GetHeight ( ) const
pure virtual

Gets the height.

The height must be positive and cannot exceed 32 767.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
The height.
virtual int DriveEngine::IImage::GetNbChannels ( ) const
pure virtual

Gets the number of channel. Must be 1 for a gray scaled image, 3 for a colored image.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
The number of channel.
virtual const IColor* DriveEngine::IImage::GetPixelColor ( int  x,
int  y 
) const
pure virtual

Gets the color.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
xThe X-axis position. It must be positive and must not exceed the width.
yThe Y-axis position. It must be positive and must not exceed the height.
Returns
The color of the pixel. On error, it returns nullptr.
virtual float DriveEngine::IImage::GetPixelIntensity ( int  x,
int  y 
) const
pure virtual

Gets the intensity.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
xThe X-axis position. It must be positive and must not exceed the width.
yThe Y-axis position. It must be positive and must not exceed the height.
Returns
The intensity of the pixel. The value can vary between 0.0 (blanc) and 1.0 (white). On error, it returns -1.0.
virtual int DriveEngine::IImage::GetPixelSize ( ) const
pure virtual

Gets the size of a pixel, in bytes.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
The pixel size.
virtual int DriveEngine::IImage::GetWidth ( ) const
pure virtual

Gets the width.

The width must be positive and cannot exceed 32 767.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
The width.

The documentation for this class was generated from the following file: