]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_LookupTable.hxx
Salome HOME
NRI : Remove dependence with KERNEL.
[modules/visu.git] / src / VISU_I / VISU_LookupTable.hxx
1 //  File      : VISU_LookupTable.h
2 //  Created   : UI team, 18.02.03
3 //  Descr     : Scaling values of vtkLookupTable
4 //  Author    : Vitaliy Smetannikov
5 //  Project   : SALOME
6 //  Module    : OBJECT
7 //  Copyright : Open CASCADE 2003
8
9
10 #ifndef VISU_LookupTable_H
11 #define VISU_LookupTable_H
12
13 //#include <vtkLookupTable.h>
14 #include <vtkLogLookupTable.h>
15
16 class VISU_LookupTable: public vtkLogLookupTable {
17  public:
18    vtkTypeMacro(VISU_LookupTable,vtkLogLookupTable);
19
20    static VISU_LookupTable *New();
21    
22    void SetTableRange(float min, float max);
23    static int ComputeLogRange(float inRange[2], float outRange[2]);
24    float* GetLogRange() { return myLogRange;}
25    unsigned char *MapValue(float v);
26
27    float GetMapScale() { return myScale; }
28    void SetMapScale(float theScale) { myScale = theScale; Modified(); }
29
30    int IsLog() { return myIsLog; }
31    void SetLog(int theLog) { myIsLog = theLog; Modified(); }
32    
33  protected:
34   VISU_LookupTable(int sze=256, int ext=256);
35   ~VISU_LookupTable() {};
36    
37   float myScale;
38   int myIsLog;
39   float myLogRange[2];
40 };
41 #endif // VISU_LookupTable_H