MeVisLab Toolbox Reference
mlLUTFloatRGBA.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_LUTFLOAT_RGBA_H
14 #define ML_LUTFLOAT_RGBA_H
15 
16 
23 
24 #include "mlLUTSystem.h"
25 #include "mlLUTBasic.h"
26 #include "mlLUTFunction.h"
27 #include "mlLUTData.h"
28 
29 
30 
31 ML_START_NAMESPACE
32 
40 
41 public:
42 
46  LUTFloatRGBA(LUTFunction* lutFunction, double minIndex, double maxIndex, bool continuousIndexRange = true);
47 
50 
58  float* getColorAt(double value);
59 
62  bool isValid();
63 
64 private:
65 
67  double _minIndex;
69  double _maxIndex;
70 
72  LUTFunction* _lutFunction;
74  LUTData<float>* _lutData;
76  float* _rgbaColorLut;
77 
79  double _indexScale;
81  double _indexShift;
82 
85  bool _isValid;
86 };
87 
88 
89 ML_END_NAMESPACE
90 
91 
92 #endif // __mlLUTFloatRGBA_H
93 
Implements a float RGBA color table.
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.
float * getColorAt(double value)
Returns the color of a given value as an index into the color table.
~LUTFloatRGBA()
Default destructor.
bool isValid()
Return true if the construction of the internal color table was successful.
Common base class for lookup tables.
Definition: mlLUTFunction.h:55
#define MLLUT_EXPORT
System specific macro definitions.
Definition: mlLUTSystem.h:25