MeVisLab Toolbox Reference
|
Implements a float RGBA color table. More...
#include <mlLUTFloatRGBA.h>
Public Member Functions | |
LUTFloatRGBA (LUTFunction *lutFunction, double minIndex, double maxIndex, bool continuousIndexRange=true) | |
Constructor takes a LUT function, the min and max indices as the range for the color table. | |
~LUTFloatRGBA () | |
Default destructor. | |
float * | getColorAt (double value) |
Returns the color of a given value as an index into the color table. | |
bool | isValid () |
Return true if the construction of the internal color table was successful. | |
Implements a float RGBA color table.
This class ought to be instantiated for a fixed index/value range. The instantiated object wraps a float rgba color table. A color at a certain index can be queried via the 'getColorAt' method, which takes an index/value as an argument and returns a float array, holding the r,g,b and a (red, green, blue, alpha) values. The range of these RGBA values is [0..1].
Definition at line 39 of file mlLUTFloatRGBA.h.
ml::LUTFloatRGBA::LUTFloatRGBA | ( | LUTFunction * | lutFunction, |
double | minIndex, | ||
double | maxIndex, | ||
bool | continuousIndexRange = true ) |
Constructor takes a LUT function, the min and max indices as the range for the color table.
If the indices are of integer type, set the 'continuousIndexRange' to 'false'. The default value is 'true' which fits for all data types like float, double etc.
ml::LUTFloatRGBA::~LUTFloatRGBA | ( | ) |
Default destructor.
Returns the color of a given value
as an index into the color table.
Note that there is no range checking in this method, so be sure that the given value
lies within the specified range. The returned float array holds four (4) values in the range [0..1] and they represent the r,g,b and a (red, green, blue and alpha) values of a color. If the given lutFunction is invalid, or the internal lutData is invalid, a NULL-pointer is returned.
bool ml::LUTFloatRGBA::isValid | ( | ) |
Return true if the construction of the internal color table was successful.
In this case, the getColorAt() method can be used to access the color table.