MrSID Decode SDK for Raster Reference Manual  9.1.0.4045
LTIPixelLookupTable Class Reference

color lookup table More...

#include <lti_pixelLookupTable.h>

Inheritance diagram for LTIPixelLookupTable:
Collaboration diagram for LTIPixelLookupTable:

Public Member Functions

 LTIPixelLookupTable (const LTIPixel &pixelProps, lt_uint32 tableSize)
 default constructor More...
 
 LTIPixelLookupTable (const LTIPixelLookupTable &)
 copy constructor More...
 
 ~LTIPixelLookupTable ()
 destructor More...
 
lt_uint32 getTableSize () const
 get table size More...
 
void setTableEntry (lt_uint32 index, const LTIPixel &pixelData)
 set table entry More...
 
void setTableEntries (const void *mapData)
 set all table entries More...
 
LTIPixelgetTableEntry (lt_uint32 index) const
 get table entry More...
 
const void * getTableEntries () const
 get all table entries More...
 
- Public Member Functions inherited from LTIPixel
 LTIPixel (void)
 constructor More...
 
 LTIPixel (LTIColorSpace colorSpace, lt_uint16 numBands, LTIDataType dataType, const LTISample *samples=NULL)
 constructor More...
 
 LTIPixel (const LTIPixel &pixel, const lt_uint16 *bandSelection, lt_uint16 numBands)
 constructor More...
 
 LTIPixel (const LTISample *samples, lt_uint16 numBands, LTIColorSpace colorSpace=LTI_COLORSPACE_INVALID)
 constructor More...
 
 LTIPixel (const LTIPixel &)
 copy constructor More...
 
virtual ~LTIPixel ()
 destructor More...
 
LTIPixeloperator= (const LTIPixel &)
 assignment operator More...
 
bool operator== (const LTIPixel &) const
 equality operator More...
 
bool operator!= (const LTIPixel &) const
 equality operator More...
 
lt_uint16 getNumBands () const
 get the number of bands More...
 
lt_uint16 getNumBandsWithoutAlpha () const
 get the number of bands not counting alpha More...
 
LTIDataType getDataType () const
 get the sample datatype More...
 
bool isSignedData () const
 
LTIColorSpace getColorSpace () const
 get the colorspace More...
 
LTIColorSpace getColorSpaceWithoutAlpha () const
 get the colorspace without alpha More...
 
bool hasAlphaBand () const
 returns true if colorspace has alpha channel flags More...
 
bool hasPreMultipliedAlphaBand () const
 returns true if colorspace has the pre-multiplied lpha channel flag More...
 
lt_uint32 getNumBytes () const
 get the size of a pixel More...
 
lt_uint32 getNumBytesWithoutAlpha () const
 get the size of a pixel not counting the alpha band More...
 
lt_uint32 getMaxBytesPerSample () const
 returns the largest size of any sample More...
 
LT_STATUS checkImpedance (const LTIPixel &pixel, bool enforceColorSpace=true) const
 returns status code comparing two pixels More...
 
LT_STATUS checkImpedanceWithoutAlpha (const LTIPixel &pixel) const
 
LTISamplegetSamples () const
 
LTISamplegetSample (lt_uint16) const
 
LT_STATUS getBandSelection (lt_uint16 *&bandSelection) const
 
const void * getSampleValueAddr (lt_uint16 band) const
 returns the address of the specified sample's value More...
 
lt_uint8 getSampleValueUint8 (lt_uint16 band) const
 returns the specified sample's value More...
 
lt_int8 getSampleValueSint8 (lt_uint16 band) const
 returns the specified sample's value More...
 
lt_uint16 getSampleValueUint16 (lt_uint16 band) const
 returns the specified sample's value More...
 
lt_int16 getSampleValueSint16 (lt_uint16 band) const
 returns the specified sample's value More...
 
lt_uint32 getSampleValueUint32 (lt_uint16 band) const
 returns the specified sample's value More...
 
lt_int32 getSampleValueSint32 (lt_uint16 band) const
 returns the specified sample's value More...
 
float getSampleValueFloat32 (lt_uint16 band) const
 returns the specified sample's value More...
 
double getSampleValueFloat64 (lt_uint16 band) const
 returns the specified sample's value More...
 
bool areSampleValuesMin () const
 are all samples equal to the minimum value More...
 
bool areSampleValuesMax () const
 are all samples equal to the maximum value More...
 
void setSampleValuesToMin ()
 sets all samples to minimum More...
 
void setSampleValuesToMax ()
 sets all samples to maximum More...
 
void setSampleValueAddr (lt_uint16 band, const void *data) const
 sets sample value by address More...
 
void setSampleValuesUint8 (lt_uint8 value)
 sets all samples to the given value More...
 
void setSampleValuesSint8 (lt_int8 value)
 sets all samples to the given value More...
 
void setSampleValuesUint16 (lt_uint16 value)
 sets all samples to the given value More...
 
void setSampleValuesSint16 (lt_int16 value)
 sets all samples to the given value More...
 
void setSampleValuesUint32 (lt_uint32 value)
 sets all samples to the given value More...
 
void setSampleValuesSint32 (lt_int32 value)
 sets all samples to the given value More...
 
void setSampleValuesFloat32 (float value)
 sets all samples to the given value More...
 
void setSampleValuesFloat64 (double value)
 sets all samples to the given value More...
 
void setSampleValuesFromDouble (double value)
 sets all samples to the given value More...
 
void setSampleValueUint8 (lt_uint16 band, lt_uint8 value)
 sets the given sample to the given value More...
 
void setSampleValueSint8 (lt_uint16 band, lt_int8 value)
 sets the given sample to the given value More...
 
void setSampleValueUint16 (lt_uint16 band, lt_uint16 value)
 sets the given sample to the given value More...
 
void setSampleValueSint16 (lt_uint16 band, lt_int16 value)
 sets the given sample to the given value More...
 
void setSampleValueUint32 (lt_uint16 band, lt_uint32 value)
 sets the given sample to the given value More...
 
void setSampleValueSint32 (lt_uint16 band, lt_int32 value)
 sets the given sample to the given value More...
 
void setSampleValueFloat32 (lt_uint16 band, float value)
 sets the given sample to the given value More...
 
void setSampleValueFloat64 (lt_uint16 band, double value)
 sets the given sample to the given value More...
 
void setSampleValuesUint8 (const lt_uint8 values[])
 sets all samples to the given values More...
 
void setSampleValuesSint8 (const lt_int8 values[])
 sets all samples to the given values More...
 
void setSampleValuesUint16 (const lt_uint16 values[])
 sets all samples to the given values More...
 
void setSampleValuesSint16 (const lt_int16 values[])
 sets all samples to the given values More...
 
void setSampleValuesUint32 (const lt_uint32 values[])
 sets all samples to the given values More...
 
void setSampleValuesSint32 (const lt_int32 values[])
 sets all samples to the given values More...
 
void setSampleValuesFloat32 (const float values[])
 sets all samples to the given values More...
 
void setSampleValuesFloat64 (const double values[])
 sets all samples to the given values More...
 

Additional Inherited Members

- Static Public Member Functions inherited from LTIPixel
static LT_STATUS checkCompatible (const LTIPixel &dstPixelProps, const LTIPixel &srcPixelProps)
 

Detailed Description

This class implements a color lookup table, for use with "indexed" or "palletized" images.

Definition at line 28 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
LTIPixelLookupTable::LTIPixelLookupTable ( const LTIPixelLookupTable )
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().

LTIPixel* LTIPixelLookupTable::getTableEntry ( lt_uint32  index) const

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)
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
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:

LizardTech