src/PIPELINE/VISU_LookupTable.hxx

Go to the documentation of this file.
00001 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00003 // 
00004 //  This library is free software; you can redistribute it and/or 
00005 //  modify it under the terms of the GNU Lesser General Public 
00006 //  License as published by the Free Software Foundation; either 
00007 //  version 2.1 of the License. 
00008 // 
00009 //  This library is distributed in the hope that it will be useful, 
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 //  Lesser General Public License for more details. 
00013 // 
00014 //  You should have received a copy of the GNU Lesser General Public 
00015 //  License along with this library; if not, write to the Free Software 
00016 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00017 // 
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 //
00020 //  File   : VISU_LookupTable.h
00021 //  Author : Vitaliy Smetannikov
00022 //  Module : VISU
00023 
00024 #ifndef VISU_LookupTable_H
00025 #define VISU_LookupTable_H
00026 
00027 #include <vtkLookupTable.h>
00028 
00029 #include "VTKViewer.h"
00030 
00031 class VISU_LookupTable: public vtkLookupTable 
00032 {
00033  public:
00034    vtkTypeMacro(VISU_LookupTable,vtkLookupTable);
00035    static VISU_LookupTable *New();
00036 
00037    virtual void MapScalarsThroughTable2(void *input, unsigned char *output,
00038                          int inputDataType, int numberOfValues,
00039                          int inputIncrement, int outputIncrement);
00040 
00041   vtkFloatingPointType GetMapScale() { return myScale; }
00042   void SetMapScale(vtkFloatingPointType theScale = 1.0);
00043 
00044   bool GetBicolor() { return myBicolor; }
00045   void SetBicolor( bool theBicolor );
00046 
00047    static int ComputeLogRange(vtkFloatingPointType inRange[2], vtkFloatingPointType outRange[2]);
00048    unsigned char *MapValue(vtkFloatingPointType v);
00049 
00050  protected:
00051    VISU_LookupTable(int sze=256, int ext=256);
00052    ~VISU_LookupTable() {};
00053    
00054    vtkFloatingPointType myScale;
00055 
00056    bool myBicolor;
00057 };
00058 #endif // VISU_LookupTable_H