Public Member Functions | Static Public Member Functions | Public Attributes

LogLUV32Pixel Struct Reference

This reference page is linked to from the following overview topics: High Dynamic Range Bitmaps.


Search for all occurrences

Detailed Description

See also:
Class Color.
Remarks:
This structure is available in release 4.0 and later only.

This structure is a 32 bit pixel format that stores 1 bit for sign, 15 bits for the log of the luminance, and 16 bits of chroma.

This class stores colors in XYZ space. XYZ color space is the space define by the CIE by the red (X), green (Y) and blue (Z) response curves of the eye. So to calculate a color in XYZ space, you take the incoming light, multiply it by each response curvey and integrate the result over the visible spectrum. There are several RGB spaces, all depending on what XYZ coordinates get assigned to the red, green and blue primaries of the space. The transformations between XYZ and RGB space are all linear and can be represented as 3 by 3 matrices.

The mapping used by XYZtoRGB and RGBtoXYZ is for CCIR-709 primaries and was taken from the code in the tiff reader for the LogLUV32 format. Both XYZ and RGB methods are supplied, so developers can supply different XYZ to RGB transforms, if desired.

This transform is important, because in the LogLUV32 format the log is taken of the Y coordinate in XYZ space. So, it is important that Y not be 0. The transform helps guarantee this. In fact, Y is zero only when r, g and b are all 0.

#include <color.h>

Inheritance diagram for LogLUV32Pixel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  operator Color () const
LogLUV32Pixel operator= (const float c[3])
GEOMEXPORT void  GetRGB (float rgb[3]) const
GEOMEXPORT void  SetRGB (const float rgb[3])
GEOMEXPORT void  GetXYZ (float xyz[3]) const
GEOMEXPORT void  SetXYZ (const float xyz[3])

Static Public Member Functions

static GEOMEXPORT void  XYZtoRGB (const float xyz[3], float rgb[3])
static GEOMEXPORT void  RGBtoXYZ (const float rgb[3], float xyz[3])

Public Attributes

DWORD32  value
  Storage for the pixel value.

Member Function Documentation

operator Color ( ) const [inline]
Remarks:
This method will return the pixel format as a Color.
{ Color c; GetRGB(c); return c; }
LogLUV32Pixel& operator= ( const float  c[3] ) [inline]
Remarks:
Assignment operator.
Parameters:
const float c[3]
The array of color values to assign in RGB order.
{ SetRGB(c); return *this; }
GEOMEXPORT void GetRGB ( float  rgb[3] ) const
Remarks:
Retrieves the RGB space values.
Parameters:
float rgb[3]
The results are stored here.
GEOMEXPORT void SetRGB ( const float  rgb[3] )
Remarks:
Sets the RGB space values.
Parameters:
const float rgb[3]
The values to set.
GEOMEXPORT void GetXYZ ( float  xyz[3] ) const
Remarks:
Retrieves the XYZ space values.
Parameters:
const float xyz[3]
The results are stored here.
GEOMEXPORT void SetXYZ ( const float  xyz[3] )
Remarks:
Sets the XYZ space values.
Parameters:
const float xyz[3]
The values to set.
static GEOMEXPORT void XYZtoRGB ( const float  xyz[3],
float  rgb[3] 
) [static]
Remarks:
This method converts from XYZ space to RGB space.
Parameters:
const float xyz[3]
The input values to convert.

float rgb[3]
The output values are stored here.
static GEOMEXPORT void RGBtoXYZ ( const float  rgb[3],
float  xyz[3] 
) [static]
Remarks:
This method converts from RGB space to XYZ space.
Parameters:
const float rgb[3]
The input values to convert.

float xyz[3]
The output values are stored here.

Member Data Documentation

DWORD32 value

Storage for the pixel value.