HDRImage Class Reference

HDR image class supporting a 128- or 256-bit RgbaHDR pixel format. More...

#include <HDRImage.h>

Inheritance diagram for HDRImage:

Image

List of all members.

Public Member Functions

Constructors
 HDRImage (unsigned width=640, unsigned height=480)
virtual ~HDRImage ()
Data Accessors / Mutators
Note:
You can extract a particular pixel via [][]. For example:
HDRImage image;
image[2][0] = RgbaHDR(0.0, 1.0, 0.0);
This example sets the pixel in the third row, first column to green.


virtual bool isHDR () const
RgbaHDRoperator[] (unsigned index)
const RgbaHDRoperator[] (unsigned index) const
RgbaHDRgetData ()
const RgbaHDRgetData () 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 Imageclone () 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

RgbaHDRm_data


Detailed Description

HDR image class supporting a 128- or 256-bit RgbaHDR pixel format.

Author:
Travis Fischer (fisch0920@gmail.com)
Date:
January 2008

Definition at line 15 of file HDRImage.h.


Constructor & Destructor Documentation

HDRImage::HDRImage ( unsigned  width = 640,
unsigned  height = 480 
) [inline]

Definition at line 13 of file HDRImage.inl.

HDRImage::~HDRImage (  )  [virtual]

Definition at line 13 of file HDRImage.cpp.


Member Function Documentation

bool HDRImage::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 true for HDRImage

Implements Image.

Definition at line 17 of file HDRImage.cpp.

RgbaHDR * HDRImage::operator[] ( unsigned  index  )  [inline]

Returns:
the underlying data in the given row index

Definition at line 19 of file HDRImage.inl.

const RgbaHDR * HDRImage::operator[] ( unsigned  index  )  const [inline]

Returns:
the underlying data in the given row index

Definition at line 25 of file HDRImage.inl.

RgbaHDR * HDRImage::getData (  )  [inline]

Returns:
the underlying data in row major order

Definition at line 31 of file HDRImage.inl.

const RgbaHDR * HDRImage::getData (  )  const [inline]

Returns:
the underlying data in row major order

Definition at line 35 of file HDRImage.inl.

real_t HDRImage::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 21 of file HDRImage.cpp.

void HDRImage::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 43 of file HDRImage.cpp.

Image * HDRImage::clone (  )  const [virtual]

Returns:
a copy of this Image and its underlying data

Implements Image.

Definition at line 72 of file HDRImage.cpp.

void HDRImage::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 79 of file HDRImage.cpp.

Rgba32 HDRImage::_getPixelRgba32 ( unsigned  row,
unsigned  col 
) const [protected, virtual]

Implements Image.

Definition at line 27 of file HDRImage.cpp.

RgbaHDR HDRImage::_getPixelRgbaHDR ( unsigned  row,
unsigned  col 
) const [protected, virtual]

Implements Image.

Definition at line 31 of file HDRImage.cpp.

void HDRImage::_setPixel ( unsigned  row,
unsigned  col,
const Rgba32 val 
) [protected, virtual]

Implements Image.

Definition at line 35 of file HDRImage.cpp.

void HDRImage::_setPixel ( unsigned  row,
unsigned  col,
const RgbaHDR val 
) [protected, virtual]

Implements Image.

Definition at line 39 of file HDRImage.cpp.

void HDRImage::_setData ( const Rgba32 data  )  [protected, virtual]

Implements Image.

Definition at line 56 of file HDRImage.cpp.

void HDRImage::_setData ( const RgbaHDR data  )  [protected, virtual]

Implements Image.

Definition at line 65 of file HDRImage.cpp.


Member Data Documentation

RgbaHDR* HDRImage::m_data [protected]

Definition at line 111 of file HDRImage.h.


The documentation for this class was generated from the following files:

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6