X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPIPELINE%2FVISU_LookupTable.hxx;h=daa1a22ba28b8dc2a5055fca333e6ab74535d597;hb=43ac4bca0b3831bed6ba417dba4ee14e6d99680b;hp=93fc7a47b137c19cadbe062c5ac3158baa7d93bd;hpb=e967b0415406f4f86ca2c9489abc8554b4c15dae;p=modules%2Fvisu.git diff --git a/src/PIPELINE/VISU_LookupTable.hxx b/src/PIPELINE/VISU_LookupTable.hxx index 93fc7a47..daa1a22b 100644 --- a/src/PIPELINE/VISU_LookupTable.hxx +++ b/src/PIPELINE/VISU_LookupTable.hxx @@ -1,42 +1,49 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE // +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + // File : VISU_LookupTable.h // Author : Vitaliy Smetannikov // Module : VISU - +// #ifndef VISU_LookupTable_H #define VISU_LookupTable_H +#include "VISUPipeline.hxx" + #include #include "VTKViewer.h" -class VISU_LookupTable: public vtkLookupTable +class VISU_PIPELINE_EXPORT VISU_LookupTable: public vtkLookupTable { public: vtkTypeMacro(VISU_LookupTable,vtkLookupTable); static VISU_LookupTable *New(); + virtual void ForceBuild(); + virtual void MapScalarsThroughTable2(void *input, unsigned char *output, - int inputDataType, int numberOfValues, - int inputIncrement, int outputIncrement); + int inputDataType, int numberOfValues, + int inputIncrement, int outputIncrement); vtkFloatingPointType GetMapScale() { return myScale; } void SetMapScale(vtkFloatingPointType theScale = 1.0); @@ -44,8 +51,19 @@ class VISU_LookupTable: public vtkLookupTable bool GetBicolor() { return myBicolor; } void SetBicolor( bool theBicolor ); - static int ComputeLogRange(vtkFloatingPointType inRange[2], vtkFloatingPointType outRange[2]); - unsigned char *MapValue(vtkFloatingPointType v); + static int ComputeLogRange( vtkFloatingPointType inRange[2], + vtkFloatingPointType outRange[2] ); + + unsigned char *MapValue(vtkFloatingPointType v); + + void MarkValueByColor( vtkFloatingPointType theValue, + unsigned char* theColor ); + + bool HasMarkedValues() const { return myHasMarkedValues; } + + void FillByColor( unsigned char* theColor ); + + void MakeBiColor(); protected: VISU_LookupTable(int sze=256, int ext=256); @@ -54,5 +72,6 @@ class VISU_LookupTable: public vtkLookupTable vtkFloatingPointType myScale; bool myBicolor; + bool myHasMarkedValues; }; #endif // VISU_LookupTable_H