|
roviz
0.7
Code Documentation of roviz
|
A portable image class with smart memory management. More...
#include <image.h>


Public Types | |
| enum | Format { NoFormat, RGB555, RGB888, Gray8, YUV422, YUV422_Flipped, BGR_CV } |
| Enum of all supported image formats. | |
Public Member Functions | |
| Image (const StreamObject &base) | |
| Converts a StreamObject to an Image. More... | |
| Image (std::initializer_list< SourceID > sources={}) | |
| Standard constructor. More... | |
| int | width (void) const |
| int | height (void) const |
| enum Format | format (void) const |
| int | bitsPerPixel (void) const |
| int | bytesPerPixel (void) const |
| int | dataLength (void) const |
| const unsigned char * | data (void) const |
Public Member Functions inherited from StreamObject | |
| SourceID | id (void) const |
| Get the SourceID of the object. More... | |
Static Public Member Functions | |
| static StreamWidget * | initWidget (OutputPrivate *out) |
| initWidget Returns a ImageWidget to display the image More... | |
Protected Member Functions | |
| Image (bool do_init, std::initializer_list< SourceID > sources) | |
Protected Member Functions inherited from StreamObject | |
| void | initSources (std::initializer_list< SourceID > sources={}) |
Protected Attributes | |
| ImagePrivate * | _this |
Protected Attributes inherited from StreamObject | |
| std::shared_ptr< StreamObjectPrivate > | _this_base |
A portable image class with smart memory management.
This class is pseudo-const. It can be assigned, but the data cannot be altered. To alter the data of an image, use ImageMutable. If you are done manipulating the pixels, convert it to a Image and pass it to the receiver. The receiver has no way (unless he is really nasty) to go back and alter the data again. This means the image data is protected (and read-only access is thread safe). This prevents that two items that receive the same image manipulate each others data. You can also directly convert Qt images (QImage) and OpenCV images (cv::Mat) to Images.
| Image::Image | ( | const StreamObject & | base | ) |
Converts a StreamObject to an Image.
| base | The StreamObject |
This is only used internally, a plugin should never need to use that. Only use it if you're absolutely sure the StreamObject is in fact an Image!

| Image::Image | ( | std::initializer_list< SourceID > | sources = {} | ) |
Standard constructor.
| sources | Source tree |
Needed by some container classes. Not really useful otherwise.

| int Image::bitsPerPixel | ( | void | ) | const |
| int Image::bytesPerPixel | ( | void | ) | const |
| const unsigned char * Image::data | ( | void | ) | const |

| int Image::dataLength | ( | void | ) | const |

| Image::Format Image::format | ( | void | ) | const |

| int Image::height | ( | void | ) | const |

|
static |
initWidget Returns a ImageWidget to display the image
| stream | The asocciated stream |
See 'How to create your own streams'
| int Image::width | ( | void | ) | const |

1.8.13