RgbaImage Class Reference
Image class supporting a standard 32-bit Rgba pixel format. More...
#include <RgbaImage.h>

Public Member Functions | |
Constructors | |
| RgbaImage (unsigned width=640, unsigned height=480) | |
| RgbaImage (QImage &image) | |
| virtual | ~RgbaImage () |
Data Accessors / Mutators | |
| |
| virtual bool | isHDR () const |
| Rgba32 * | operator[] (unsigned index) |
| const Rgba32 * | operator[] (unsigned index) const |
| Rgba32 * | getData () |
| const Rgba32 * | getData () const |
| virtual real_t | getLuminance (unsigned row, unsigned col) const |
Mutators | |
| virtual void | setSize (unsigned width, unsigned height) |
| Sets the dimensions of this image, most likely allocating a new underlying buffer and erasing its previous contents. | |
Miscellaneous | |
| virtual Image * | clone () const |
| virtual void | copyData (const Image *image) |
| Overwrites this image's data with the given image which is assumed to have the same dimensions as this image (and may have been created from this image by, for example, the clone function). | |
Protected Member Functions | |
| virtual Rgba32 | _getPixelRgba32 (unsigned row, unsigned col) const |
| virtual RgbaHDR | _getPixelRgbaHDR (unsigned row, unsigned col) const |
| virtual void | _setPixel (unsigned row, unsigned col, const Rgba32 &val) |
| virtual void | _setPixel (unsigned row, unsigned col, const RgbaHDR &val) |
| virtual void | _setData (const Rgba32 *data) |
| virtual void | _setData (const RgbaHDR *data) |
Protected Attributes | |
| Rgba32 * | m_data |
| bool | m_ownData |
Detailed Description
Image class supporting a standard 32-bit Rgba pixel format.
- Date:
- January 2008
Definition at line 17 of file RgbaImage.h.
Constructor & Destructor Documentation
| RgbaImage::RgbaImage | ( | unsigned | width = 640, |
|
| unsigned | height = 480 | |||
| ) | [inline] |
Definition at line 13 of file RgbaImage.inl.
| RgbaImage::RgbaImage | ( | QImage & | image | ) | [explicit] |
Definition at line 14 of file RgbaImage.cpp.
| RgbaImage::~RgbaImage | ( | ) | [virtual] |
Definition at line 35 of file RgbaImage.cpp.
Member Function Documentation
| bool RgbaImage::isHDR | ( | ) | const [virtual] |
- Returns:
- whether or not the underlying data for this image is stored in a floating-point HDR format
- Note:
- that some operations will be more of less efficient when performed on an HDR image versus a standard 32-bit Rgba image, and knowing whether or not an image is in HDR format can facilitate efficient usage (cutting down on the number of implicit conversions between HDR and non-HDR pixel formats that must be performed)
returns false for RgbaImage
Implements Image.
Definition at line 40 of file RgbaImage.cpp.
| Rgba32 * RgbaImage::operator[] | ( | unsigned | index | ) | [inline] |
| const Rgba32 * RgbaImage::operator[] | ( | unsigned | index | ) | const [inline] |
| Rgba32 * RgbaImage::getData | ( | ) | [inline] |
| const Rgba32 * RgbaImage::getData | ( | ) | const [inline] |
| real_t RgbaImage::getLuminance | ( | unsigned | row, | |
| unsigned | col | |||
| ) | const [virtual] |
- Returns:
- the luminance of the pixel at the given row and column which is guaranteed to lie in [0, 1]
Implements Image.
Definition at line 44 of file RgbaImage.cpp.
| void RgbaImage::setSize | ( | unsigned | width, | |
| unsigned | height | |||
| ) | [virtual] |
Sets the dimensions of this image, most likely allocating a new underlying buffer and erasing its previous contents.
Implements Image.
Definition at line 66 of file RgbaImage.cpp.
| Image * RgbaImage::clone | ( | ) | const [virtual] |
- Returns:
- a copy of this Image and its underlying data
Implements Image.
Definition at line 97 of file RgbaImage.cpp.
| void RgbaImage::copyData | ( | const Image * | image | ) | [virtual] |
Overwrites this image's data with the given image which is assumed to have the same dimensions as this image (and may have been created from this image by, for example, the clone function).
Implements Image.
Definition at line 104 of file RgbaImage.cpp.
| Rgba32 RgbaImage::_getPixelRgba32 | ( | unsigned | row, | |
| unsigned | col | |||
| ) | const [protected, virtual] |
| RgbaHDR RgbaImage::_getPixelRgbaHDR | ( | unsigned | row, | |
| unsigned | col | |||
| ) | const [protected, virtual] |
| void RgbaImage::_setPixel | ( | unsigned | row, | |
| unsigned | col, | |||
| const Rgba32 & | val | |||
| ) | [protected, virtual] |
| void RgbaImage::_setPixel | ( | unsigned | row, | |
| unsigned | col, | |||
| const RgbaHDR & | val | |||
| ) | [protected, virtual] |
| void RgbaImage::_setData | ( | const Rgba32 * | data | ) | [protected, virtual] |
| void RgbaImage::_setData | ( | const RgbaHDR * | data | ) | [protected, virtual] |
Member Data Documentation
Rgba32* RgbaImage::m_data [protected] |
Definition at line 114 of file RgbaImage.h.
bool RgbaImage::m_ownData [protected] |
Definition at line 115 of file RgbaImage.h.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6