Typed image class. More...
#include <yarp/sig/Image.h>
Public Member Functions | |
ImageOf () | |
size_t | getPixelSize () const override |
Gets pixel size in memory in bytes. | |
int | getPixelCode () const override |
Gets pixel type identifier. | |
T & | pixel (size_t x, size_t y) |
T & | pixel (size_t x, size_t y) const |
const T & | operator() (size_t x, size_t y) const |
T & | operator() (size_t x, size_t y) |
T & | safePixel (size_t x, size_t y) |
const T & | safePixel (size_t x, size_t y) const |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
int | getPixelCode () const |
Gets pixel type identifier. | |
Public Member Functions inherited from yarp::sig::Image | |
Image () | |
Default constructor. | |
Image (const Image &alt) | |
Copy constructor. | |
Image (Image &&other) noexcept | |
Move constructor. | |
Image & | operator= (const Image &alt) |
Assignment operator. | |
Image & | operator= (Image &&other) noexcept |
Move assignment operator. | |
bool | operator== (const Image &alt) const |
Comparison operator. | |
~Image () override | |
Destructor. | |
bool | copy (const Image &alt) |
Copy operator. | |
bool | copy (const Image &alt, size_t w, size_t h) |
Scaled copy. | |
bool | move (Image &&alt) noexcept |
move operator. | |
bool | swap (Image &alt) |
swap operator. | |
size_t | width () const |
Gets width of image in pixels. | |
size_t | height () const |
Gets height of image in pixels. | |
size_t | getRowSize () const |
Size of the underlying image buffer rows. | |
size_t | getQuantum () const |
The size of a row is constrained to be a multiple of the "quantum". | |
size_t | getPadding () const |
Returns the number of padding bytes. | |
unsigned char * | getRow (size_t r) |
Get the address of a the first byte of a row in memory. | |
const unsigned char * | getRow (size_t r) const |
Get the address of a the first byte of a row in memory, const versions. | |
unsigned char * | getPixelAddress (size_t x, size_t y) const |
Get address of a pixel in memory. | |
bool | isPixel (size_t x, size_t y) const |
Check whether a coordinate lies within the image. | |
void | zero () |
Set all pixels to 0. | |
void | resize (size_t imgWidth, size_t imgHeight) |
Reallocate an image to be of a desired size, throwing away its current contents. | |
void | resize (const Image &alt) |
Reallocate the size of the image to match another, throwing away the actual content of the image. | |
void | setExternal (const void *data, size_t imgWidth, size_t imgHeight) |
Use this to wrap an external image. | |
unsigned char * | getRawImage () const |
Access to the internal image buffer. | |
size_t | getRawImageSize () const |
Access to the internal buffer size information (this is how much memory has been allocated for the image). | |
bool | read (yarp::os::ConnectionReader &connection) override |
Read image from a connection. | |
bool | write (yarp::os::ConnectionWriter &connection) const override |
Write image to a connection. | |
void | setQuantum (size_t imgQuantum) |
char ** | getRowArray () |
Get an array of pointers to the rows of the image. | |
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. | |
Public Member Functions inherited from yarp::os::PortWriter | |
virtual | ~PortWriter () |
Destructor. | |
virtual void | onCompletion () const |
This is called when the port has finished all writing operations. | |
virtual void | onCommencement () const |
This is called when the port is about to begin writing operations. | |
virtual yarp::os::Type | getWriteType () const |
Additional Inherited Members | |
Static Public Member Functions inherited from yarp::os::Portable | |
static bool | copyPortable (const PortWriter &writer, PortReader &reader) |
Copy one portable to another, via writing and reading. | |
Protected Member Functions inherited from yarp::sig::Image | |
void | setPixelCode (int imgPixelCode) |
void | setPixelSize (size_t imgPixelSize) |
Typed image class.
This is a wrapper over yarp::sig::Image providing type security for pixel access. "T" can be any of sig::PixelMono, sig::PixelMono16, sig::PixelRgb, sig::PixelHsv, sig::PixelBgr, sig::PixelMonoSigned, sig::PixelRgbSigned, sig::PixelFloat, sig::PixelRgbFloat, sig::PixelHsvFloat, sig::PixelInt. If ImageOf::copy is called for two such images, a reasonable casting operation will occur if the pixel types are different.
|
inline |
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlinevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlineoverridevirtual |
Gets pixel type identifier.
Images have an associated type identifier to permit automatic casting between different image types.
Reimplemented from yarp::sig::Image.
|
inlineoverridevirtual |
Gets pixel size in memory in bytes.
Reimplemented from yarp::sig::Image.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |