LogLUV32Pixel Struct Reference

#include <color.h>

Class 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.
+ Inheritance diagram for LogLUV32Pixel:

Public Member Functions

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

Static Public Member Functions

static void XYZtoRGB (const float xyz[3], float rgb[3])
 
static void RGBtoXYZ (const float rgb[3], float xyz[3])
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Public Attributes

DWORD32 value
 Storage for the pixel value. More...
 

Member Function Documentation

operator Color ( ) const
inline
Remarks
This method will return the pixel format as a Color.
464 { Color c; GetRGB(c); return c; }
Definition: color.h:69
void GetRGB(float rgb[3]) const
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.
470 { SetRGB(c); return *this; }
void SetRGB(const float rgb[3])
void GetRGB ( float  rgb[3]) const
Remarks
Retrieves the RGB space values.
Parameters:
float rgb[3]
The results are stored here.
void SetRGB ( const float  rgb[3])
Remarks
Sets the RGB space values.
Parameters:
const float rgb[3]
The values to set.
void GetXYZ ( float  xyz[3]) const
Remarks
Retrieves the XYZ space values.
Parameters:
const float xyz[3]
The results are stored here.
void SetXYZ ( const float  xyz[3])
Remarks
Sets the XYZ space values.
Parameters:
const float xyz[3]
The values to set.
static 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 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.