Color Lookup Tables

All Lookup classes are derived from the abtract base class LookUp, which declares the methods getColor() which translates a double value to a red value, a green value, a blue value, and an alpha value. They all have a minimum level and a maximum level which are used to calculate the color for a value.

LookUp

constructor

LookUp(double dMinLevel, double dMaxLevel) : m_dMinLevel(dMinLevel), m_dMaxLevel(dMaxLevel);
dMinLevel

Minimum level.

dMaxvel

Maximum level.

getColor

virtual void getColor(double dValue, double &dRed, double &dGreen, double &dBlue, double &dAlpha)=0;
virtual void getColor(double dValue, unsigned char &uRed, unsigned char &uGreen, unsigned char &uBlue, unsigned char &uAlpha);

These virtual functions are implemented by the derived classes.

dValue

The value to be translated.

dRed

The resulting red value as double (in [0,1]).

dGreen

The resulting green value as double (in [0,1]).

dBlue

The resulting blue value as double (in [0,1]).

dAlpha

The resulting alpha value as double (in [0,1]).

uRed

The resulting red value as uchar (in [0,255]).

uGreen

The resulting green value as uchar (in [0,255]).

uBlue

The resulting blue value as uchar (in [0,255]).

uAlpha

The resulting blue value as uchar (in [0,255]).

RainbowLookUp

../../images/LU_Ex_Rainbow.png

constructor

RainbowLookUp(double dMinLevel, double dMaxLevel);

Rainbow2LookUp

../../images/LU_Ex_Rainbow2.png

constructor

Rainbow2LookUp(double dMinLevel, double dMaxLevel);

GeoLookUp

../../images/LU_Ex_Geo.png

constructor

GeoLookUp(double dMinLevel, double dSeaLevel, double dMaxLevel);

dSeaLevel is the value where the color switches from bluish to greenish.

Geo2LookUp

../../images/LU_Ex_Geo2.png

constructor

Geo2LookUp(double dMinLevel, double dSeaLevel, double dMaxLevel);

Like GeoLookUp, with the exception that high values are colored whitish.

TwoToneLookUp

../../images/LU_Ex_TwoTone.png

constructor

TwoToneLookUp(double dSepLevel,
              double dR1, double dG1, double dB1, double dA1,
              double dR2, double dG2, double dB2, double dA2);

At the value dSepLevel, the color changes from the first color to the second one.

FadeOutLookUp

../../images/LU_Ex_FadeOut.png

constructor

FadeOutLookUp(double dMin, double dMax,
              double dR, double dG, double dB, double dA);

The color for low values is transparent and gradually changes to the specified color.

FadeToLookUp

../../images/LU_Ex_FadeTo.png

constructor

FadeToLookUp(double dMin, double dMax,
             double dR0,  double dG0,   double dB0,   double dA0,
             double dR1,  double dG1,   double dB1,   double dA1);

The color linearly morphs from (dR0, dG0, dB0. dA0) to (dR1, dG1, dB1, dA1) as the value increases.