Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / PIPELINE / VISU_LookupTable.hxx
1 //  Copyright (C) 2003  CEA/DEN, EDF R&D
2 //
3 //
4 //
5 //  File   : VISU_LookupTable.h
6 //  Author : Vitaliy Smetannikov
7 //  Module : VISU
8
9 #ifndef VISU_LookupTable_H
10 #define VISU_LookupTable_H
11
12 #include <vtkLookupTable.h>
13
14 class VISU_LookupTable: public vtkLookupTable {
15  public:
16    vtkTypeMacro(VISU_LookupTable,vtkLookupTable);
17    static VISU_LookupTable *New();
18
19    virtual void MapScalarsThroughTable2(void *input, unsigned char *output,
20                                         int inputDataType, int numberOfValues,
21                                         int inputIncrement, int outputIncrement);
22
23   float GetMapScale() { return myScale; }
24   void SetMapScale(float theScale = 1.0);
25
26   float GetBicolor() { return myBicolor; }
27   void SetBicolor( bool theBicolor );
28
29    static int ComputeLogRange(float inRange[2], float outRange[2]);
30    unsigned char *MapValue(float v);
31
32  protected:
33    VISU_LookupTable(int sze=256, int ext=256);
34    ~VISU_LookupTable() {};
35    
36    float myScale;
37
38    bool myBicolor;
39 };
40 #endif // VISU_LookupTable_H