stromx  0.8.0
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | List of all members
stromx::runtime::Image Class Referenceabstract

Abstract image. More...

#include <Image.h>

Inheritance diagram for stromx::runtime::Image:
stromx::runtime::Matrix stromx::runtime::Data stromx::runtime::DataInterface stromx::runtime::ImageWrapper stromx::cvsupport::Image

Public Types

enum  PixelType {
  NONE, MONO_8, MONO_16, RGB_24,
  RGB_48, BGR_24, BGR_48, BAYERBG_8,
  BAYERBG_16, BAYERGB_8, BAYERGB_16
}
 
- Public Types inherited from stromx::runtime::Matrix
enum  ValueType {
  NONE, INT_8, UINT_8, INT_16,
  UINT_16, INT_32, UINT_32, FLOAT_32,
  FLOAT_64
}
 

Public Member Functions

virtual unsigned int width () const =0
 
virtual unsigned int height () const =0
 
virtual unsigned int stride () const =0
 
virtual PixelType pixelType () const =0
 
virtual unsigned int pixelSize () const
 
virtual unsigned int numChannels () const
 
virtual unsigned int depth () const
 
virtual void initializeImage (const unsigned int width, const unsigned int height, const unsigned int stride, uint8_t *data, const PixelType pixelType)=0
 
- Public Member Functions inherited from stromx::runtime::Matrix
virtual uint8_t * buffer ()=0
 
virtual unsigned int bufferSize () const =0
 
virtual unsigned int rows () const =0
 
virtual unsigned int cols () const =0
 
virtual ValueType valueType () const =0
 
virtual unsigned int valueSize () const
 
virtual uint8_t * data ()=0
 
virtual const uint8_t * data () const =0
 
virtual void initializeMatrix (const unsigned int rows, const unsigned int cols, const unsigned int stride, uint8_t *data, const ValueType valueType)=0
 
template<class T >
T & at (const unsigned row, const unsigned col)
 
template<class T >
const T & at (const unsigned int row, const unsigned col) const
 
template<class T >
const T value (const unsigned int row, const unsigned int col) const
 
- Public Member Functions inherited from stromx::runtime::Data
virtual void serialize (OutputProvider &out) const
 
virtual void deserialize (InputProvider &in, const Version &version)
 
- Public Member Functions inherited from stromx::runtime::DataInterface
virtual const Versionversion () const =0
 
virtual const std::string & type () const =0
 
virtual const std::string & package () const =0
 
virtual const VariantHandlevariant () const =0
 
virtual Dataclone () const =0
 
bool isVariant (const VariantInterface &v) const
 

Static Public Member Functions

static unsigned int pixelSize (const PixelType pixelType)
 
static unsigned int numChannels (const PixelType pixelType)
 
static unsigned depth (const PixelType pixelType)
 
- Static Public Member Functions inherited from stromx::runtime::Matrix
static unsigned int valueSize (const ValueType valueType)
 

Static Protected Member Functions

static const runtime::VariantHandle dataVariantFromPixelType (const PixelType pixelType)
 
static Matrix::ValueType valueTypeFromPixelType (const PixelType pixelType)
 
- Static Protected Member Functions inherited from stromx::runtime::Matrix
static const runtime::VariantHandle dataVariantFromValueType (const ValueType valueType)
 

Detailed Description

Abstract image.

Member Function Documentation

§ dataVariantFromPixelType()

const runtime::VariantHandle stromx::runtime::Image::dataVariantFromPixelType ( const PixelType  pixelType)
staticprotected

Returns the data variant defined by the input pixelType.

§ depth() [1/2]

unsigned int stromx::runtime::Image::depth ( ) const
virtual

Returns the size of a pixel of a single channel of the image in bytes.

§ depth() [2/2]

unsigned int stromx::runtime::Image::depth ( const PixelType  pixelType)
static

Returns the size of a single channel of a given pixel type in bytes.

§ height()

virtual unsigned int stromx::runtime::Image::height ( ) const
pure virtual

Returns the height of the image.

Implemented in stromx::runtime::ImageWrapper.

§ initializeImage()

virtual void stromx::runtime::Image::initializeImage ( const unsigned int  width,
const unsigned int  height,
const unsigned int  stride,
uint8_t *  data,
const PixelType  pixelType 
)
pure virtual

Initializes the image to the given data. Note that this function does not change the image buffer but merely changes the description of the data contained in the image buffer.

Implemented in stromx::cvsupport::Image.

§ numChannels() [1/2]

unsigned int stromx::runtime::Image::numChannels ( ) const
virtual

Returns the number of channels of the image.

§ numChannels() [2/2]

unsigned int stromx::runtime::Image::numChannels ( const PixelType  pixelType)
static

Returns the number of channels for a given pixel type.

§ pixelSize() [1/2]

unsigned int stromx::runtime::Image::pixelSize ( ) const
virtual

Returns the size of a single pixel in bytes.

§ pixelSize() [2/2]

unsigned int stromx::runtime::Image::pixelSize ( const PixelType  pixelType)
static

Returns the size of a single pixel of type pixelType in bytes.

§ pixelType()

virtual PixelType stromx::runtime::Image::pixelType ( ) const
pure virtual

Returns the type of the pixel data of the image.

Implemented in stromx::runtime::ImageWrapper.

§ stride()

virtual unsigned int stromx::runtime::Image::stride ( ) const
pure virtual

Returns the size of a line in the image in bytes.

Implements stromx::runtime::Matrix.

Implemented in stromx::runtime::ImageWrapper.

§ valueTypeFromPixelType()

Matrix::ValueType stromx::runtime::Image::valueTypeFromPixelType ( const PixelType  pixelType)
staticprotected

Returns the value type which corresponds to the input pixelType.

§ width()

virtual unsigned int stromx::runtime::Image::width ( ) const
pure virtual

Returns the width of the image.

Implemented in stromx::runtime::ImageWrapper.


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