#include <image.h>

An image holds color and depth information for a rectangular region.
Definition at line 21 of file image.h.
Operations | |
| void | startReadback (const uint32_t buffers, const PixelViewport &pvp, Window::ObjectManager *glObjects) |
| Start reading back an image from the frame buffer. | |
| void | syncReadback () |
| Make sure that the last readback operation is complete. | |
| void | writeImage (const std::string &filename, const Frame::Buffer buffer) const |
| Writes the pixel data as rgb image files. | |
| void | writeImages (const std::string &filenameTemplate) const |
| Writes all pixel data as separate images. | |
| bool | readImage (const std::string &filename, const Frame::Buffer buffer) |
| Read pixel data from an uncompressed rgb image file. | |
| std::ostream & | operator<< (std::ostream &os, const Image *) |
Public Member Functions | |
| Image () | |
| Constructs a new Image. | |
Data Access | |
| const eq::Viewport & | getViewport () const |
| GLEWContext * | glewGetContext () |
| void | reset () |
| Reset the image to its default state. | |
| void | setFormat (const Frame::Buffer buffer, const uint32_t format) |
| Set the (OpenGL) format of the pixel data for a buffer. | |
| void | setType (const Frame::Buffer buffer, const uint32_t type) |
| Set the (OpenGL) type of the pixel data for a buffer. | |
| uint32_t | getFormat (const Frame::Buffer buffer) const |
| uint32_t | getType (const Frame::Buffer buffer) const |
| uint32_t | getDepth (const Frame::Buffer buffer) const |
| bool | hasAlpha () const |
| const uint8_t * | getPixelPointer (const Frame::Buffer buffer) const |
| uint8_t * | getPixelPointer (const Frame::Buffer buffer) |
| uint32_t | getPixelDataSize (const Frame::Buffer buffer) const |
| const PixelData & | getPixelData (const Frame::Buffer buffer) const |
| const PixelData & | compressPixelData (const Frame::Buffer buffer) |
| bool | hasPixelData (const Frame::Buffer buffer) const |
| const PixelViewport & | getPixelViewport () const |
| void | setPixelViewport (const PixelViewport &pvp) |
| Set the pixel viewport of the image buffers. | |
| void | clearPixelData (const Frame::Buffer buffer) |
| Clear (zero-initialize) and validate an image buffer. | |
| void | setPixelData (const Frame::Buffer buffer, const uint8_t *data) |
| Set the pixel data of one of the image buffers. | |
| void | setPixelData (const Frame::Buffer buffer, const PixelData &data) |
| Set the pixel data of one of the image buffers. | |
| void | setPBO (const bool onOff) |
| Switch PBO usage for image transfers on or off. | |
| bool | getPBO () const |
Classes | |
| class | CompressedPixels |
| struct | Data |
| All distributed data. | |
| struct | PixelData |
| class | Pixels |
| Raw image data. | |
| eq::Image::Image | ( | ) |
| const eq::Viewport& eq::Image::getViewport | ( | ) | const [inline] |
| GLEWContext* eq::Image::glewGetContext | ( | ) | [inline] |
| void eq::Image::reset | ( | ) |
Reset the image to its default state.
Definition at line 49 of file image.cpp.
References setPixelViewport().
Referenced by Image().


| void eq::Image::setFormat | ( | const Frame::Buffer | buffer, | |
| const uint32_t | format | |||
| ) |
Set the (OpenGL) format of the pixel data for a buffer.
Invalidates the pixel data.
| buffer | the buffer type. | |
| format | the format. |
Definition at line 160 of file image.cpp.
Referenced by setPixelData().

| void eq::Image::setType | ( | const Frame::Buffer | buffer, | |
| const uint32_t | type | |||
| ) |
Set the (OpenGL) type of the pixel data for a buffer.
Invalidates the pixel data.
| buffer | the buffer type. | |
| type | the type. |
Definition at line 167 of file image.cpp.
Referenced by setPixelData().

| uint32_t eq::Image::getFormat | ( | const Frame::Buffer | buffer | ) | const |
Definition at line 174 of file image.cpp.
Referenced by eq::Compositor::assembleImage2D(), eq::Compositor::assembleImageDB_FF(), eq::Compositor::assembleImageDB_GLSL(), compressPixelData(), getDepth(), hasAlpha(), and writeImage().

| uint32_t eq::Image::getType | ( | const Frame::Buffer | buffer | ) | const |
Definition at line 180 of file image.cpp.
Referenced by eq::Compositor::assembleImage2D(), eq::Compositor::assembleImageDB_FF(), eq::Compositor::assembleImageDB_GLSL(), compressPixelData(), and getDepth().

| uint32_t eq::Image::getDepth | ( | const Frame::Buffer | buffer | ) | const |
Definition at line 61 of file image.cpp.
References getFormat(), and getType().
Referenced by clearPixelData(), compressPixelData(), readImage(), setPixelData(), and writeImage().


| bool eq::Image::hasAlpha | ( | ) | const |
Definition at line 186 of file image.cpp.
References eq::Frame::BUFFER_COLOR, and getFormat().

| const uint8_t * eq::Image::getPixelPointer | ( | const Frame::Buffer | buffer | ) | const |
Definition at line 200 of file image.cpp.
References hasPixelData().
Referenced by eq::Compositor::assembleImage2D(), eq::Compositor::assembleImageDB_FF(), eq::Compositor::assembleImageDB_GLSL(), compressPixelData(), and writeImage().


| uint32_t eq::Image::getPixelDataSize | ( | const Frame::Buffer | buffer | ) | const [inline] |
Definition at line 98 of file image.h.
Referenced by clearPixelData(), compressPixelData(), and setPixelData().

| const Image::PixelData & eq::Image::getPixelData | ( | const Frame::Buffer | buffer | ) | const |
Definition at line 216 of file image.cpp.
References hasPixelData().
Referenced by eq::FrameData::transmit().


| const Image::PixelData & eq::Image::compressPixelData | ( | const Frame::Buffer | buffer | ) |
Definition at line 534 of file image.cpp.
References getDepth(), getFormat(), eq::base::OMP::getNThreads(), getPixelDataSize(), getPixelPointer(), and getType().
Referenced by eq::FrameData::transmit().


| bool eq::Image::hasPixelData | ( | const Frame::Buffer | buffer | ) | const [inline] |
Definition at line 111 of file image.h.
Referenced by eq::Compositor::assembleImage(), eq::Compositor::assembleImage2D(), eq::Compositor::assembleImageDB_FF(), getPixelData(), getPixelPointer(), and eq::FrameData::transmit().

| const PixelViewport& eq::Image::getPixelViewport | ( | ) | const [inline] |
Definition at line 115 of file image.h.
Referenced by eq::Compositor::assembleImage2D(), eq::Compositor::assembleImageDB_FF(), eq::Compositor::assembleImageDB_GLSL(), readImage(), eq::Compositor::setupStencilBuffer(), and eq::FrameData::transmit().

| void eq::Image::setPixelViewport | ( | const PixelViewport & | pvp | ) |
Set the pixel viewport of the image buffers.
The image buffers will be invalidated.
| pvp | the pixel viewport. |
Definition at line 359 of file image.cpp.
Referenced by readImage(), and reset().

| void eq::Image::clearPixelData | ( | const Frame::Buffer | buffer | ) |
Clear (zero-initialize) and validate an image buffer.
| buffer | the image buffer to clear. |
Definition at line 368 of file image.cpp.
References eq::Frame::BUFFER_COLOR, eq::Frame::BUFFER_DEPTH, getDepth(), and getPixelDataSize().

| void eq::Image::setPixelData | ( | const Frame::Buffer | buffer, | |
| const uint8_t * | data | |||
| ) |
Set the pixel data of one of the image buffers.
The data is copied, and previous data for the buffer is overwritten.
| buffer | the image buffer to set. | |
| data | the buffer data of size pvp.w * pvp.h * depth. |
Definition at line 419 of file image.cpp.
References getPixelDataSize().
Referenced by readImage(), and setPixelData().


| void eq::Image::setPixelData | ( | const Frame::Buffer | buffer, | |
| const PixelData & | data | |||
| ) |
Set the pixel data of one of the image buffers.
Previous data for the buffer is overwritten. The pixel data is decompressed, if needed.
| buffer | the image buffer to set. | |
| data | the pixel data. |
Definition at line 433 of file image.cpp.
References getDepth(), getPixelDataSize(), setFormat(), setPixelData(), and setType().

| void eq::Image::setPBO | ( | const bool | onOff | ) | [inline] |
| bool eq::Image::getPBO | ( | ) | const [inline] |
| void eq::Image::startReadback | ( | const uint32_t | buffers, | |
| const PixelViewport & | pvp, | |||
| Window::ObjectManager * | glObjects | |||
| ) |
Start reading back an image from the frame buffer.
| buffers | bit-wise combination of the frame buffer components. | |
| pvp | the area of the frame buffer wrt the drawable. | |
| glObjects | the GL object manager for the current GL context. |
Definition at line 222 of file image.cpp.
References eq::Frame::BUFFER_COLOR, eq::Frame::BUFFER_DEPTH, eq::PixelViewport::x, and eq::PixelViewport::y.
Referenced by eq::FrameData::startReadback().

| void eq::Image::syncReadback | ( | ) |
Make sure that the last readback operation is complete.
Definition at line 246 of file image.cpp.
References eq::Frame::BUFFER_COLOR, and eq::Frame::BUFFER_DEPTH.
Referenced by eq::FrameData::syncReadback().

| void eq::Image::writeImage | ( | const std::string & | filename, | |
| const Frame::Buffer | buffer | |||
| ) | const |
Writes the pixel data as rgb image files.
Definition at line 745 of file image.cpp.
References getDepth(), getFormat(), getPixelPointer(), eq::PixelViewport::h, and eq::PixelViewport::w.
Referenced by writeImages().


| void eq::Image::writeImages | ( | const std::string & | filenameTemplate | ) | const |
Writes all pixel data as separate images.
Definition at line 676 of file image.cpp.
References eq::Frame::BUFFER_COLOR, eq::Frame::BUFFER_DEPTH, and writeImage().
Referenced by eq::Compositor::assembleFramesCPU(), and eq::FrameData::syncReadback().


| bool eq::Image::readImage | ( | const std::string & | filename, | |
| const Frame::Buffer | buffer | |||
| ) |
Read pixel data from an uncompressed rgb image file.
Definition at line 807 of file image.cpp.
References eq::Frame::BUFFER_COLOR, eq::Frame::BUFFER_DEPTH, getDepth(), getPixelViewport(), setPixelData(), and setPixelViewport().

0.6 by
1.5.5