Salome HOME
Merge with branch V2_2_0_VISU_improvement
[modules/visu.git] / src / PIPELINE / VISU_ScalarMapPL.cxx
index d7b7b4a6f43f1a7d7cbd8344423b7d25774c7725..473d2de86da3c19e270dfda8a840c7417f71825e 100644 (file)
@@ -1,23 +1,23 @@
 //  VISU OBJECT : interactive object for VISU entities implementation
 //
 //  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
 //
 //
 //
 #include "VISU_ScalarMapPL.hxx"
 #include "VISU_PipeLineUtils.hxx"
 
-#ifdef _DEBUG_
-static int MYDEBUG = 1;
-#else
-static int MYDEBUG = 0;
-#endif
-
 vtkStandardNewMacro(VISU_ScalarMapPL);
 
 
@@ -52,6 +46,7 @@ VISU_ScalarMapPL::VISU_ScalarMapPL(){
 
   myExtractor = VISU_Extractor::New();
   //myExtractor->DebugOn();
+  myIsShrinkable = true;
 }
 
 
@@ -86,7 +81,7 @@ void VISU_ScalarMapPL::SetScalarMode(int theScalarMode){
 }
 
 
-int VISU_ScalarMapPL::GetScaling() { 
+int VISU_ScalarMapPL::GetScaling() {
   return myBarTable->GetScale();
 }
 void VISU_ScalarMapPL::SetScaling(int theScaling) {
@@ -99,9 +94,9 @@ void VISU_ScalarMapPL::SetScaling(int theScaling) {
 }
 
 
-float* VISU_ScalarMapPL::GetScalarRange() { 
+float* VISU_ScalarMapPL::GetScalarRange() {
   return myFieldTransform->GetScalarRange();
-}  
+}
 void VISU_ScalarMapPL::SetScalarRange(float theRange[2]){
   myFieldTransform->SetScalarRange(theRange);
   myBarTable->SetRange(theRange);
@@ -117,12 +112,12 @@ void VISU_ScalarMapPL::SetScalarMax(float theValue){
 }
 
 
-void VISU_ScalarMapPL::SetNbColors(int theNbColors) { 
+void VISU_ScalarMapPL::SetNbColors(int theNbColors) {
   myMapperTable->SetNumberOfColors(theNbColors);
   myBarTable->SetNumberOfColors(theNbColors);
   Modified();
 }
-int VISU_ScalarMapPL::GetNbColors() { 
+int VISU_ScalarMapPL::GetNbColors() {
   return myMapperTable->GetNumberOfColors();
 }
 
@@ -139,8 +134,8 @@ void VISU_ScalarMapPL::Init(){
 }
 
 
-void VISU_ScalarMapPL::Build() { 
-  myExtractor->SetInput(myInput);
+void VISU_ScalarMapPL::Build() {
+  myExtractor->SetInput(GetInput2());
   myFieldTransform->SetInput(myExtractor->GetOutput());
   myMapper->SetInput(DoHook());
 }
@@ -157,7 +152,7 @@ void VISU_ScalarMapPL::Update() {
   myMapperTable->Build();
   myBarTable->Build();
 
-  myMapper->SetLookupTable(myMapperTable);   
+  myMapper->SetLookupTable(myMapperTable);
   myMapper->SetScalarRange(aScalarRange);
 
   VISU_PipeLine::Update();