displays a color image (ColorImageRGB8) using OpenGL More...
#include <GLImagePainter.h>
Public Member Functions | |
| void | addVectorObject (VectorObject2D vectorObject) |
| Adds a free form given by it's corner coordinates. | |
| void | clearForms () |
| Clear the list of painted boxes. | |
| GLImagePainter () | |
| void | paintImage (float alpha=1.0) |
| generate & display texture | |
| void | paintVectorObjects () |
| paint all registered boxes / lines / circles | |
| void | saveImage (std::string filename) |
| void | setAnaglyphImage (const puma2::GrayLevelImage8 *leftYImage, const puma2::GrayLevelImage8 *rightYImage, float aspect=1.0) |
| void | setColorImage (const puma2::ColorImageRGB8 *image, float aspect=1.0) |
| Update the contents of the OpenGL Texture, clear the box list and render the image. | |
| void | setColorImage (const puma2::GrayLevelImage8 *yImage, const puma2::ColorImageUV8 *uvImage, float aspect=1.0) |
| void | setGrayLevelImage (const puma2::GrayLevelImage8 *image, float aspect=1.0) |
| void | setPixelAspectRatio (float ratio) |
| Set the pixel aspect ratio (width/height) | |
| void | setThermalImage (const puma2::GrayLevelImage8 *image, float roomTemp=30.0) |
| ~GLImagePainter () | |
Protected Member Functions | |
| void | clearTexture () |
| void | initTexture (unsigned resolution, unsigned imageWidth, unsigned imageHeight, ImageGrabber::ColorFormat textureFormat) |
| void | updateTexture (unsigned char *imageData, unsigned width, unsigned height, ImageGrabber::ColorFormat format) |
Protected Attributes | |
| unsigned | m_ImageHeight |
| unsigned | m_ImageWidth |
| float | m_PixelAspectRatio |
| unsigned int | m_TextureByteSize |
| unsigned char * | m_TextureData |
| ImageGrabber::ColorFormat | m_TextureFormat |
| GLuint | m_TextureId |
| unsigned | m_TextureResolution |
| std::list< VectorObject2D > | m_VectorObjects |
Static Private Member Functions | |
| static int | calcTextureSize (int width, int height) |
| calculates the next larger power of two that width and height fit into | |
displays a color image (ColorImageRGB8) using OpenGL
Definition at line 33 of file GLImagePainter.h.
| void GLImagePainter::addVectorObject | ( | VectorObject2D | vectorObject | ) |
Adds a free form given by it's corner coordinates.
| static int GLImagePainter::calcTextureSize | ( | int | width, |
| int | height | ||
| ) | [static, private] |
calculates the next larger power of two that width and height fit into
| void GLImagePainter::clearForms | ( | ) |
Clear the list of painted boxes.
| void GLImagePainter::clearTexture | ( | ) | [protected] |
| void GLImagePainter::initTexture | ( | unsigned | resolution, |
| unsigned | imageWidth, | ||
| unsigned | imageHeight, | ||
| ImageGrabber::ColorFormat | textureFormat | ||
| ) | [protected] |
| void GLImagePainter::paintImage | ( | float | alpha = 1.0 | ) |
generate & display texture
| void GLImagePainter::paintVectorObjects | ( | ) |
paint all registered boxes / lines / circles
| void GLImagePainter::saveImage | ( | std::string | filename | ) |
| void GLImagePainter::setAnaglyphImage | ( | const puma2::GrayLevelImage8 * | leftYImage, |
| const puma2::GrayLevelImage8 * | rightYImage, | ||
| float | aspect = 1.0 |
||
| ) |
| void GLImagePainter::setColorImage | ( | const puma2::ColorImageRGB8 * | image, |
| float | aspect = 1.0 |
||
| ) |
Update the contents of the OpenGL Texture, clear the box list and render the image.
| void GLImagePainter::setColorImage | ( | const puma2::GrayLevelImage8 * | yImage, |
| const puma2::ColorImageUV8 * | uvImage, | ||
| float | aspect = 1.0 |
||
| ) |
| void GLImagePainter::setGrayLevelImage | ( | const puma2::GrayLevelImage8 * | image, |
| float | aspect = 1.0 |
||
| ) |
| void GLImagePainter::setPixelAspectRatio | ( | float | ratio | ) | [inline] |
Set the pixel aspect ratio (width/height)
Definition at line 51 of file GLImagePainter.h.
| void GLImagePainter::setThermalImage | ( | const puma2::GrayLevelImage8 * | image, |
| float | roomTemp = 30.0 |
||
| ) |
| void GLImagePainter::updateTexture | ( | unsigned char * | imageData, |
| unsigned | width, | ||
| unsigned | height, | ||
| ImageGrabber::ColorFormat | format | ||
| ) | [protected] |
unsigned GLImagePainter::m_ImageHeight [protected] |
Definition at line 80 of file GLImagePainter.h.
unsigned GLImagePainter::m_ImageWidth [protected] |
Definition at line 79 of file GLImagePainter.h.
float GLImagePainter::m_PixelAspectRatio [protected] |
Definition at line 82 of file GLImagePainter.h.
unsigned int GLImagePainter::m_TextureByteSize [protected] |
Definition at line 89 of file GLImagePainter.h.
unsigned char* GLImagePainter::m_TextureData [protected] |
Definition at line 87 of file GLImagePainter.h.
Definition at line 88 of file GLImagePainter.h.
GLuint GLImagePainter::m_TextureId [protected] |
Definition at line 86 of file GLImagePainter.h.
unsigned GLImagePainter::m_TextureResolution [protected] |
Definition at line 84 of file GLImagePainter.h.
std::list< VectorObject2D > GLImagePainter::m_VectorObjects [protected] |
Definition at line 91 of file GLImagePainter.h.