MrSID Decode SDK for Raster Reference Manual  9.5.1.4427
LTIPixelLookupTable Class Reference

color lookup table More...

#include <lti_pixelLookupTable.h>

Inheritance diagram for LTIPixelLookupTable:
LTIPixel

List of all members.

Public Member Functions

 LTIPixelLookupTable (const LTIPixel &pixelProps, lt_uint32 tableSize)
 default constructor
 LTIPixelLookupTable (const LTIPixelLookupTable &)
 copy constructor
 ~LTIPixelLookupTable ()
 destructor
lt_uint32 getTableSize () const
 get table size
void setTableEntry (lt_uint32 index, const LTIPixel &pixelData)
 set table entry
void setTableEntries (const void *mapData)
 set all table entries
LTIPixelgetTableEntry (lt_uint32 index) const
 get table entry
const void * getTableEntries () const
 get all table entries
LT_STATUS apply (const LTISceneBuffer &srcData, LTISceneBuffer &dstData) const

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:
pixelPropsthe basic properties of the pixel in this LUT
tableSizethe number of elements in the table

Member Function Documentation

LT_STATUS LTIPixelLookupTable::apply ( const LTISceneBuffer srcData,
LTISceneBuffer dstData 
) const
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:
indexthe index number of the entry to look up
Returns:
pointer to the pixel data of the index (or NULL)

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:
mapDatathe 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:
indexthe index number of the entry
pixelDatathe pixel data to be recorded for the index

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