LTIPixelLookupTable Class Reference
color lookup table
More...
#include <lti_pixelLookupTable.h>
List of all members.
Detailed Description
This class implements a color lookup table, for use with "indexed" or "palletized" images.
Definition at line 31 of file lti_pixelLookupTable.h.
Constructor & Destructor Documentation
LTIPixelLookupTable::LTIPixelLookupTable |
( |
const LTIPixel & |
pixelProps, |
|
|
lt_uint32 |
tableSize | |
|
) |
| | |
This constructor creates an LTIPixelLookupTable object consisting of the given number of entries.
- Parameters:
-
| pixelProps | the basic properties of the pixel in this LUT |
| tableSize | the number of elements in the table |
LTIPixelLookupTable::~LTIPixelLookupTable |
( |
|
) |
|
Member Function Documentation
const void* LTIPixelLookupTable::getTableEntries |
( |
|
) |
const |
This function returns the color map data as a one-dimensional array, according to the format described in setAllEntries().
This function returns the entry with the given index number. The caller takes ownership of the returned object.
- Parameters:
-
| index | the index number of the entry to look up |
- Returns:
- pointer to the pixel data of the index (or NULL)
lt_uint32 LTIPixelLookupTable::getTableSize |
( |
|
) |
const |
Returns the number of entries in the table.
- Returns:
- the number of entries in the table
void LTIPixelLookupTable::setTableEntries |
( |
const void * |
mapData |
) |
|
This function sets all entries to the table. The mapData parameter is expected to be a one-dimensional array of length tablesize * numbands, e.g. if the pixel datatype is UINT8 then the array should be of the form "lt_uint8 data[3 * 256]" for a 3-banded, 256-entry table. Entry i will be referenced as data[i], data[i+256], data[i+512].
- Parameters:
-
| mapData | the colormap data |
void LTIPixelLookupTable::setTableEntry |
( |
lt_uint32 |
index, |
|
|
const LTIPixel & |
pixelData | |
|
) |
| | |
This function adds an entry to the table. The index must be less than the number of entries. The pixel data is copied into the table.
If the table already contains an entry with the given index number, the old entry is removed in favor of the new one.
- Parameters:
-
| index | the index number of the entry |
| pixelData | the pixel data to be recorded for the index |
The documentation for this class was generated from the following file: