BmpPaletteSampleValue Class Reference

a sample in a bmp palette (i.e. in a 1-,4- or 8-bit) file

`#include <BmpPaletteSampleValue.h>`

Inheritance diagram for BmpPaletteSampleValue:

## Public Member Functions

| BmpPaletteSampleValue (BYTE i)
SampleValue * | getNearestTargetSampleValue (EmbValue t) const
std::string | getName (void) const
BYTE | getIndex (void) const
BYTE | getRed (void) const
BYTE | getGreen (void) const
BYTE | getBlue (void) const
Public Member Functions inherited from BmpSampleValue
| BmpSampleValue (void)
virtual UWORD32 | calcDistance (const SampleValue *s) const
Public Member Functions inherited from SampleValue
| SampleValue (void)
virtual | ~SampleValue (void)
virtual bool | isNeighbour (const SampleValue *s) const
EmbValue | getEmbeddedValue (void) const
UWORD32 | getKey (void) const
bool | operator== (const SampleValue &sv) const
bool | operator!= (const SampleValue &sv) const
bool | operator< (const SampleValue &sv) const
UWORD32 | getNumEdges (EmbValue t) const
void | setNumEdges (EmbValue t, UWORD32 ne)
void | incNumEdges (EmbValue t)
void | decNumEdges (EmbValue t)
void | setLabel (unsigned long l)
unsigned long | getLabel (void) const
void | print (unsigned short spc=0) const

## Private Member Functions

EmbValue | calcEValue (BYTE idx) const

## Private Attributes

ColorPalette * | Palette
BYTE | Index

## Additional Inherited Members

Protected Attributes inherited from SampleValue
EmbValue | EValue
| the bit that is embedded in this sample value - must be set in constructor of derived class More...
UWORD32 | Key
| the key of this sample value - must be different for two different sample values - must be set in constructor of derived class More...

## Constructor & Destructor Documentation

## BmpPaletteSampleValue()

BmpPaletteSampleValue::BmpPaletteSampleValue | ( | BYTE | i | ) |

## Member Function Documentation

## calcEValue()

EmbValue BmpPaletteSampleValue::calcEValue | ( | BYTE | idx | ) | const

inline private

## getBlue()

BYTE BmpPaletteSampleValue::getBlue | ( | void |  | ) | const

inline virtual

get the blue color component

Implements BmpSampleValue.

## getGreen()

BYTE BmpPaletteSampleValue::getGreen | ( | void |  | ) | const

inline virtual

get the green color component

Implements BmpSampleValue.

## getIndex()

BYTE BmpPaletteSampleValue::getIndex | ( | void |  | ) | const

inline

## getName()

std::string BmpPaletteSampleValue::getName | ( | void |  | ) | const

virtual

return a short name uniquely identifying this sample value

Implements SampleValue.

## getNearestTargetSampleValue()

SampleValue * BmpPaletteSampleValue::getNearestTargetSampleValue | ( | EmbValue | t | ) | const

virtual

get the nearest (with the least distance to this sample value) sample value whose embedded value equals the specified target

Parameters

  t | the target embedded value

If two or more target sample values have equal distance each of them should be returned with equal probability.

The returned SampleValue object should be deleted by the callser.

Implements SampleValue.

## getRed()

BYTE BmpPaletteSampleValue::getRed | ( | void |  | ) | const

inline virtual

get the red color component

Implements BmpSampleValue.

## Member Data Documentation

## Index

BYTE BmpPaletteSampleValue::Index

private

## Palette

ColorPalette* BmpPaletteSampleValue::Palette

private

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

- BmpPaletteSampleValue.h
- BmpPaletteSampleValue.cc