YARP
Yet Another Robot Platform
yarp::sig::FlexImage Class Reference

Image class with user control of representation details. More...

#include <yarp/sig/Image.h>

+ Inheritance diagram for yarp::sig::FlexImage:

Detailed Description

Image class with user control of representation details.

Can be necessary when interfacing with other image types.

Definition at line 383 of file Image.h.

Public Member Functions

void setPixelCode (int imgPixelCode)
 
void setPixelSize (size_t imgPixelSize)
 
void setQuantum (size_t imgQuantum)
 
- Public Member Functions inherited from yarp::sig::Image
 Image ()
 Default constructor. More...
 
 Image (const Image &alt)
 Copy constructor. More...
 
virtual ~Image ()
 Destructor. More...
 
const Imageoperator= (const Image &alt)
 Assignment operator. More...
 
bool copy (const Image &alt)
 Copy operator. More...
 
bool copy (const Image &alt, size_t w, size_t h)
 Scaled copy. More...
 
size_t width () const
 Gets width of image in pixels. More...
 
size_t height () const
 Gets height of image in pixels. More...
 
virtual size_t getPixelSize () const
 Gets pixel size in memory in bytes. More...
 
virtual int getPixelCode () const
 Gets pixel type identifier. More...
 
size_t getRowSize () const
 Size of the underlying image buffer rows. More...
 
size_t getQuantum () const
 The size of a row is constrained to be a multiple of the "quantum". More...
 
size_t getPadding () const
 Returns the number of padding bytes. More...
 
unsigned char * getRow (size_t r)
 Get the address of a the first byte of a row in memory. More...
 
const unsigned char * getRow (size_t r) const
 Get the address of a the first byte of a row in memory, const versions. More...
 
unsigned char * getPixelAddress (size_t x, size_t y) const
 Get address of a pixel in memory. More...
 
bool isPixel (size_t x, size_t y) const
 Check whether a coordinate lies within the image. More...
 
void zero ()
 Set all pixels to 0. More...
 
void resize (size_t imgWidth, size_t imgHeight)
 Reallocate an image to be of a desired size, throwing away its current contents. More...
 
void resize (const Image &alt)
 Reallocate the size of the image to match another, throwing away the actual content of the image. More...
 
void setExternal (const void *data, size_t imgWidth, size_t imgHeight)
 Use this to wrap an external image. More...
 
unsigned char * getRawImage () const
 Access to the internal image buffer. More...
 
size_t getRawImageSize () const
 Access to the internal buffer size information (this is how much memory has been allocated for the image). More...
 
void * getIplImage ()
 Returns IPL/OpenCV view of image, if possible. More...
 
const void * getIplImage () const
 Returns IPL/OpenCV view of image, if possible. More...
 
void wrapIplImage (void *iplImage)
 Act as a wrapper around an IPL/OpenCV image. More...
 
virtual bool read (yarp::os::ConnectionReader &connection) override
 Read image from a connection. More...
 
virtual bool write (yarp::os::ConnectionWriter &connection) const override
 Write image to a connection. More...
 
void setQuantum (size_t imgQuantum)
 
bool topIsLowIndex () const
 
void setTopIsLowIndex (bool flag)
 control whether image has origin at top left (default) or bottom left. More...
 
char ** getRowArray ()
 Get an array of pointers to the rows of the image. More...
 
virtual yarp::os::Type getReadType () const override
 
- Public Member Functions inherited from yarp::os::Portable
virtual Type getType () const
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor. More...
 
virtual void onCompletion () const
 This is called when the port has finished all writing operations. More...
 
virtual void onCommencement () const
 This is called when the port is about to begin writing operations. More...
 
virtual yarp::os::Type getWriteType () const
 

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::Portable
static bool copyPortable (PortWriter &writer, PortReader &reader)
 Copy one portable to another, via writing and reading. More...
 
- Protected Member Functions inherited from yarp::sig::Image
void setPixelCode (int imgPixelCode)
 
void setPixelSize (size_t imgPixelSize)
 

Member Function Documentation

◆ setPixelCode()

void yarp::sig::FlexImage::setPixelCode ( int  imgPixelCode)
inline

Definition at line 386 of file Image.h.

◆ setPixelSize()

void yarp::sig::FlexImage::setPixelSize ( size_t  imgPixelSize)
inline

Definition at line 391 of file Image.h.

◆ setQuantum()

void yarp::sig::FlexImage::setQuantum ( size_t  imgQuantum)
inline

Definition at line 398 of file Image.h.


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