]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Improving "Filtering by Scalars" functionality
authorapo <apo@opencascade.com>
Thu, 11 Sep 2008 07:06:51 +0000 (07:06 +0000)
committerapo <apo@opencascade.com>
Thu, 11 Sep 2008 07:06:51 +0000 (07:06 +0000)
15 files changed:
idl/VISU_Gen.idl
src/PIPELINE/VISUPipeLine.cxx
src/PIPELINE/VISU_ColoredPL.cxx
src/PIPELINE/VISU_ColoredPL.hxx
src/PIPELINE/VISU_IsoSurfacesPL.cxx
src/PIPELINE/VISU_IsoSurfacesPL.hxx
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_FilterScalarsDlg.cxx
src/VISUGUI/VisuGUI_FilterScalarsDlg.h
src/VISUGUI/VisuGUI_Prs3dDlg.cxx
src/VISUGUI/VisuGUI_Prs3dDlg.h
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_GaussPoints_i.cc

index f068b4ef7f76cca48bb88fffec1e036f70037b8f..ddabec988715e01219dafbb7d92d68032e15669e 100644 (file)
@@ -554,7 +554,6 @@ module VISU {
      */
     Orientation GetBarOrientation();
 
-    // RKV : Begin
     /*!  
      * Set the visibility of a distribution curve.
      * \param theIs is used to switch on/off the visibility of a distribution curve.
@@ -565,7 +564,9 @@ module VISU {
     boolean GetIsDistributionVisible();
 
     //! Gets current filtering by scalars mode
-    boolean IsFilteredByScalars();
+    boolean IsScalarFilterUsed();
+
+    void UseScalarFiltering( in boolean theUseScalarFilter );
 
     /*!
      * Sets scalar range - min and max boundaries of the scalar bar.
@@ -573,9 +574,11 @@ module VISU {
      * \param theMax  Max boundary of the scalar bar.
      * \param theIsFilter  if true then filter by scalars.
      */
-    void SetRangeAndFilter(in double theMin, in double theMax, in boolean theIsFilter);
+    void SetScalarFilterRange( in double theMin, in double theMax );
+
+    double GetScalarFilterMin();
 
-    // RKV : End
+    double GetScalarFilterMax();
 
     /*!
      * Add group as geometry of presentation.
index dbe0955f32760edef4d754018fb26b3e95b4fe16..6dd93b813009e8e7173815de0946f06ab2ad449e 100644 (file)
@@ -225,7 +225,8 @@ CreateColoredPL(VISU_Convertor* theConvertor,
 cout << "before filter limits set" << endl;
       vtkObject::GlobalWarningDisplayOn();
       aPresent->DebugOn();
-  aPresent->SetScalarRange(aRange, true);
+  aPresent->SetScalarFilteredRange( aRange );
+  aPresent->UseScalarFiltering( true );
 cout << "after filter set" << endl;
 
   //aPresent->ClearGeometry();
index dc046b8f1cc2290558478f50bc284eabbbd63c79..3c01e1bd5968601e1278541fb472ceb4c1930295 100644 (file)
 
 #include "VISU_PipeLineUtils.hxx"
 
+#include <vtkThreshold.h>
+#include <vtkPassThroughFilter.h>
+#include <vtkDoubleArray.h>
+
 
 //----------------------------------------------------------------------------
 VISU_ColoredPL
 ::VISU_ColoredPL():
-  myMapperTable(VISU_LookupTable::New()),
-  myBarTable(VISU_LookupTable::New()),
-  myExtractor(VISU_Extractor::New()),
-  myFieldTransform(VISU_FieldTransform::New()),
-  myThreshold(vtkThreshold::New()), // RKV
-  myPassFilter(vtkPassThroughFilter::New()), // RKV
-  myDistribution(vtkDoubleArray::New()), // RKV
-  myIsFiltered(false) // RKV
+  myMapperTable( VISU_LookupTable::New() ),
+  myBarTable( VISU_LookupTable::New() ),
+  myExtractor( VISU_Extractor::New() ),
+  myFieldTransform( VISU_FieldTransform::New() ),
+  myThreshold ( vtkThreshold::New() ),
+  myPassFilter( vtkPassThroughFilter::New() ),
+  myDistribution( vtkDoubleArray::New() )
 {
   myMapperTable->Delete();
   myMapperTable->SetScale(VTK_SCALE_LINEAR);
@@ -59,10 +62,10 @@ VISU_ColoredPL
 
   myFieldTransform->Delete();
 
-  myThreshold->AllScalarsOn(); // RKV
-  myThreshold->Delete(); // RKV
-  myPassFilter->Delete(); // RKV
-  myDistribution->Delete(); // RKV
+  myThreshold->AllScalarsOn(); 
+  myThreshold->Delete();
+  myPassFilter->Delete();
+  myDistribution->Delete();
 }
 
 
@@ -83,13 +86,9 @@ VISU_ColoredPL
   aTime = std::max(aTime, myBarTable->GetMTime());
   aTime = std::max(aTime, myExtractor->GetMTime());
   aTime = std::max(aTime, myFieldTransform->GetMTime());
-  // RKV : Begin
-  if (IsFiltered()) {
-         aTime = std::max(aTime, myThreshold->GetMTime());
-  }
+  aTime = std::max(aTime, myThreshold->GetMTime());
   aTime = std::max(aTime, myPassFilter->GetMTime());
   aTime = std::max(aTime, myDistribution->GetMTime());
-  // RKV : End
 
   return aTime;
 }
@@ -104,19 +103,23 @@ VISU_ColoredPL
   Superclass::DoShallowCopy(thePipeLine, theIsCopyInput);
 
   if(VISU_ColoredPL *aPipeLine = dynamic_cast<VISU_ColoredPL*>(thePipeLine)){
-    if(theIsCopyInput)
-      SetScalarRange(aPipeLine->GetScalarRange(), aPipeLine->IsFiltered()); // RKV
-// RKV      SetScalarRange(aPipeLine->GetScalarRange());
+    if ( theIsCopyInput ) {
+      SetScalarRange( aPipeLine->GetScalarRange() );
+      if ( this->IsScalarFilterUsed() )
+       SetScalarFilteredRange( aPipeLine->GetScalarFilteredRange() );
+    }
+
     SetScalarMode(aPipeLine->GetScalarMode());
     SetNbColors(aPipeLine->GetNbColors());
     SetScaling(aPipeLine->GetScaling());
     SetMapScale(aPipeLine->GetMapScale());
-    if(this != thePipeLine){
-      if(aPipeLine->IsExternalGeometryUsed()){
+
+    if ( this != thePipeLine ) {
+      if ( aPipeLine->IsExternalGeometryUsed() ) {
        ClearGeometry();
        int aNbOfGeometry = aPipeLine->GetNumberOfGeometry();
        for(int aGeomNumber = 0; aGeomNumber < aNbOfGeometry; aGeomNumber++)
-         AddGeometry(aPipeLine->GetGeometry(aGeomNumber));
+         AddGeometry( aPipeLine->GetGeometry( aGeomNumber ) );
       }else
        SetSourceGeometry();
     }
@@ -169,48 +172,85 @@ VISU_ColoredPL
   SetScalarMode(theScalarMode, GetInput(), myExtractor);
 }
 
+
 //----------------------------------------------------------------------------
-/* RKV
 void
 VISU_ColoredPL
-::SetScalarRange(vtkFloatingPointType theRange[2])
+::SetScalarRange( vtkFloatingPointType theRange[2] )
 {
-  if(theRange[0] > theRange[1]
+  if ( theRange[0] > theRange[1] 
     return;
   
-  if(VISU::CheckIsSameRange(GetScalarRange(), theRange))
+  if (VISU::CheckIsSameRange( GetScalarRange(), theRange) )
     return;
 
-  myFieldTransform->SetScalarRange(theRange);
-  myBarTable->SetRange(theRange);
+  myFieldTransform->SetScalarRange( theRange );
+  myBarTable->SetRange( theRange );
 }
-*/
-// RKV : Begin
+
+
+//----------------------------------------------------------------------------
 void
 VISU_ColoredPL
-::SetScalarRange(vtkFloatingPointType theRange[2], const bool isFiltered)
+::SetScalarFilteredRange( vtkFloatingPointType theRange[2] )
 {
-  // isFiltered - if true then drop cells which are not in the scalar range
-  if(theRange[0] > theRange[1]) 
-    return;
-  
-  if(VISU::CheckIsSameRange(GetScalarRange(), theRange) && (myIsFiltered == isFiltered))
+  vtkFloatingPointType aRange[ 2 ];
+  this->GetScalarFilteredRange( aRange );
+
+  if ( VISU::CheckIsSameRange( aRange, theRange) )
     return;
 
-  myFieldTransform->SetScalarRange(theRange);
-  myBarTable->SetRange(theRange);
-  myIsFiltered = isFiltered;
-  if (IsFiltered()) {
+  myThreshold->ThresholdBetween( theRange[0], theRange[1] );
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU_ColoredPL
+::GetScalarFilteredRange( vtkFloatingPointType theRange[2] )
+{
+  theRange[ 0 ] = myThreshold->GetLowerThreshold();
+  theRange[ 1 ] = myThreshold->GetUpperThreshold();
+}
+
+
+//----------------------------------------------------------------------------
+vtkFloatingPointType*
+VISU_ColoredPL
+::GetScalarFilteredRange()
+{
+  static vtkFloatingPointType aRange[ 2 ];
+
+  this->GetScalarFilteredRange( aRange );
+
+  return aRange;
+}
+
+
+//----------------------------------------------------------------------------
+void
+VISU_ColoredPL
+::UseScalarFiltering( bool theUseScalarFilter )
+{
+  if ( theUseScalarFilter ) {
     // Include threshold filter between the transform and the pass filters. 
-       myThreshold->SetInput(myFieldTransform->GetOutput());
-       myThreshold->ThresholdBetween(theRange[0], theRange[1]);
-       myPassFilter->SetInput(myThreshold->GetOutput());
+    myPassFilter->SetInput( myThreshold->GetOutput() );
   } else {
     // Exclude threshold filter before the pass filter. 
-       myPassFilter->SetInput(myFieldTransform->GetOutput());
+    myPassFilter->SetInput( myFieldTransform->GetOutput() );
   }
 }
 
+
+//----------------------------------------------------------------------------
+bool
+VISU_ColoredPL
+::IsScalarFilterUsed()
+{
+  return myThreshold->GetOutput() == myPassFilter->GetInput();
+}
+
+
 //----------------------------------------------------------------------------
 vtkDoubleArray* 
 VISU_ColoredPL
@@ -329,7 +369,12 @@ VISU_ColoredPL
 ::Init()
 {
   SetScalarMode(0);
-  SetSourceRange();
+
+  vtkFloatingPointType aRange[2];
+  GetSourceRange( aRange );
+
+  SetScalarRange( aRange );
+  SetScalarFilteredRange( aRange );
 }
 
 //----------------------------------------------------------------------------
@@ -356,11 +401,13 @@ void
 VISU_ColoredPL
 ::Build() 
 {
-  myExtractor->SetInput(Superclass::GetClippedInput());
+  myExtractor->SetInput( Superclass::GetClippedInput() );
   myFieldTransform->SetInput(myExtractor->GetOutput());
+
+  myThreshold->SetInput( myFieldTransform->GetOutput() );
   // The pass filter is used here for possibility to include/exclude 
   // threshold filter before it.
-  myPassFilter->SetInput(myFieldTransform->GetOutput()); // RKV
+  myPassFilter->SetInput( myFieldTransform->GetOutput() );
 
   GetMapperHolder()->SetLookupTable(GetMapperTable());
   GetMapper()->SetUseLookupTableScalarRange(true);
@@ -467,7 +514,7 @@ VISU_ColoredPL
 ::GetSourceRange(vtkFloatingPointType theRange[2])
 {
   myExtractor->Update();
-  myExtractor->GetOutput()->GetScalarRange(theRange);
+  myExtractor->GetOutput()->GetScalarRange( theRange );
 }
 
 void
@@ -475,7 +522,6 @@ VISU_ColoredPL
 ::SetSourceRange()
 {
   vtkFloatingPointType aRange[2];
-  GetSourceRange(aRange);
-// RKV  SetScalarRange(aRange);
-  SetScalarRange(aRange, myIsFiltered); // RKV
+  GetSourceRange( aRange );
+  SetScalarRange( aRange );
 }
index fe65499d0f68a3b5ed3e2214ef1af88ec21cf38a..add4a36d55364f210cd71ca429d465e1cf699217 100644 (file)
 #include "VISU_PipeLine.hxx"
 
 #include <vtkSmartPointer.h>
-#include <vtkThreshold.h> // RKV
-#include <vtkPassThroughFilter.h> // RKV
-#include <vtkDoubleArray.h> // RKV
 
 class VISU_Extractor;
 class VISU_FieldTransform;
 class VISU_LookupTable;
 
+class vtkPassThroughFilter;
+class vtkDoubleArray;
+class vtkThreshold;
+
+
 //----------------------------------------------------------------------------
 class VISU_ColoredPL : public VISU_PipeLine
 {
@@ -64,8 +66,22 @@ public:
 
   virtual
   void
-  SetScalarRange(vtkFloatingPointType theRange[2], const bool isFiltered); // RKV
-// RKV  SetScalarRange(vtkFloatingPointType theRange[2]);
+  SetScalarRange( vtkFloatingPointType theRange[2] );
+
+  void
+  SetScalarFilteredRange( vtkFloatingPointType theRange[2] );
+
+  void
+  GetScalarFilteredRange( vtkFloatingPointType theRange[2] );
+
+  vtkFloatingPointType* 
+  GetScalarFilteredRange();
+
+  bool
+  IsScalarFilterUsed();
+
+  void
+  UseScalarFiltering( bool theUseScalarFilter );
 
   virtual
   void
@@ -83,14 +99,11 @@ public:
   int
   GetNbColors();
   
-// RKV : Begin
-  //----------------------------------------------------------------------------
-  bool IsFiltered() {return myIsFiltered;};
-  
-  vtkDoubleArray* GetDistribution(); // RKV
-// RKV : End
-  //----------------------------------------------------------------------------
+  vtkDoubleArray* GetDistribution();
+
+
 public:
+  //----------------------------------------------------------------------------
   virtual
   void
   Init();
@@ -132,31 +145,31 @@ public:
   
   virtual  
   void  
-  SetSourceGeometry()=0;
+  SetSourceGeometry() = 0;
 
   virtual
   int
-  AddGeometry(vtkDataSet* theGeometry)=0;
+  AddGeometry(vtkDataSet* theGeometry) = 0;
 
   virtual
   vtkDataSet*
-  GetGeometry(int theGeomNumber)=0;
+  GetGeometry( int theGeomNumber ) = 0;
 
   virtual
   int
-  GetNumberOfGeometry()=0;
+  GetNumberOfGeometry() = 0;
 
   virtual
   bool 
-  IsExternalGeometryUsed()=0;
+  IsExternalGeometryUsed() = 0;
 
   virtual
   void
-  ClearGeometry()=0;
+  ClearGeometry() = 0;
 
   virtual 
   vtkPointSet* 
-  GetMergedInput()=0;
+  GetMergedInput() = 0;
 
 protected:
   //----------------------------------------------------------------------------
@@ -196,14 +209,13 @@ protected:
                VISU_Extractor* theExtractor);
 
 private:
-  vtkSmartPointer<VISU_LookupTable> myMapperTable;
-  vtkSmartPointer<VISU_LookupTable> myBarTable;
-  vtkSmartPointer<VISU_Extractor> myExtractor;
-  vtkSmartPointer<VISU_FieldTransform> myFieldTransform;
-  vtkSmartPointer<vtkThreshold> myThreshold; // RKV
-  vtkSmartPointer<vtkPassThroughFilter> myPassFilter; // RKV
-  vtkSmartPointer<vtkDoubleArray> myDistribution; // RKV
-  bool myIsFiltered; // RKV
+  vtkSmartPointer< VISU_LookupTable > myMapperTable;
+  vtkSmartPointer< VISU_LookupTable > myBarTable;
+  vtkSmartPointer< VISU_Extractor > myExtractor;
+  vtkSmartPointer< VISU_FieldTransform > myFieldTransform;
+  vtkSmartPointer< vtkThreshold > myThreshold;
+  vtkSmartPointer< vtkPassThroughFilter > myPassFilter;
+  vtkSmartPointer< vtkDoubleArray > myDistribution;
 };
   
 #endif
index c133cad48e04bedf05069b27ef6e48c2717fba02..66529bb96eb16731dfb05ab07cd2f0960a72306b 100644 (file)
@@ -114,11 +114,9 @@ VISU_IsoSurfacesPL
 //----------------------------------------------------------------------------
 void
 VISU_IsoSurfacesPL
-::SetScalarRange(vtkFloatingPointType theRange[2], const bool isFiltered
+::SetScalarRange( vtkFloatingPointType theRange[2] 
 {
-// RKV  Superclass::SetScalarRange(theRange);
-//  Superclass::SetScalarRange(theRange, IsFiltered()); // RKV
-  Superclass::SetScalarRange(theRange, isFiltered); // VSV
+  Superclass::SetScalarRange( theRange );
   SetRange(myRange);
 }
 
index 1e75ddd7aad0dfa736856e3ad473dc85e880bcd2..9d606f7ecb130109dc020f0ad986584ff3a6bb67 100644 (file)
@@ -59,7 +59,7 @@ public:
 
   virtual
   void
-  SetScalarRange(vtkFloatingPointType theRange[2], const bool isFiltered);
+  SetScalarRange( vtkFloatingPointType theRange[2] );
 
   virtual
   void
index 5ff2255daeeed1952b1987d8a103fafcf6d7bc6c..d14f77650e4c37302c5c9466b8511f8fbb37e1b8 100644 (file)
@@ -200,7 +200,7 @@ number of time stamps or number of components is not the same!</translation>
         </message>
         <message>
             <source>VISU_LOGARITHMIC_SCALING</source>
-            <translation>Logarithmic scaling</translation>
+            <translation>Logarithmic</translation>
         </message>
         <message>
             <source>VISU_MAX</source>
index c6ec2d9dd6dbdb62c1fb22a078c9a2f5c408f58f..bc8b238e2d7c67f3a6416d1d980d892bface8836 100644 (file)
@@ -3811,6 +3811,6 @@ void VisuGUI::OnMultiprChangeRes(VISU::Result::Resolution theResolution)
 
 void VisuGUI::OnFilterScalars()
 {
-  VisuGUI_FilterScalarsDlg* aDlg = new VisuGUI_FilterScalarsDlg(this);
+  VisuGUI_FilterScalarsDlg* aDlg = new VisuGUI_FilterScalarsDlg( this );
   aDlg->show();
 }
index 8482b7b3d16e42dd7d8f37445e0a90e3396dba11..b606a41e17fcd4d34a7d2ab66d87ea2433073266 100644 (file)
 //
 
 #include "VisuGUI_FilterScalarsDlg.h"
+#include "VISU_ColoredPrs3d_i.hh"
 
 #include "VisuGUI.h"
 #include "VisuGUI_Tools.h"
 
-#include <LightApp_Application.h>
+#include <SalomeApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+
 #include <SUIT_Desktop.h>
 #include <SUIT_MessageBox.h>
 #include <SUIT_Session.h>
@@ -38,9 +41,9 @@
 #include <QDoubleValidator>
   
 
-VisuGUI_FilterScalarsDlg::VisuGUI_FilterScalarsDlg(VisuGUI* theModule)
+VisuGUI_FilterScalarsDlg::VisuGUI_FilterScalarsDlg( VisuGUI* theModule )
   : QDialog(VISU::GetDesktop(theModule), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
-    myVisuGUI(theModule)
+    myVisuGUI( theModule )
 {
   setModal( false );
   setWindowTitle(tr("TITLE"));
@@ -49,19 +52,19 @@ VisuGUI_FilterScalarsDlg::VisuGUI_FilterScalarsDlg(VisuGUI* theModule)
   
   QVBoxLayout* aMainLayout = new QVBoxLayout(this);
   
-  QGroupBox* aRangeBox = new QGroupBox(this);
-  aRangeBox->setTitle(tr("BOXTITLE"));
-  aRangeBox->setCheckable(true);
-  aMainLayout->addWidget(aRangeBox);
-
-  QHBoxLayout* aBoxLayout = new QHBoxLayout(aRangeBox);
-  aBoxLayout->addWidget(new QLabel(tr("MINLBL"), aRangeBox));
-  myMinEdit = new QLineEdit( aRangeBox );
+  myRangeBox = new QGroupBox(this);
+  myRangeBox->setTitle(tr("BOXTITLE"));
+  myRangeBox->setCheckable(true);
+  aMainLayout->addWidget(myRangeBox);
+
+  QHBoxLayout* aBoxLayout = new QHBoxLayout(myRangeBox);
+  aBoxLayout->addWidget(new QLabel(tr("MINLBL"), myRangeBox));
+  myMinEdit = new QLineEdit( myRangeBox );
   myMinEdit->setValidator( new QDoubleValidator(myMinEdit) );
   aBoxLayout->addWidget(myMinEdit);
 
-  aBoxLayout->addWidget(new QLabel(tr("MAXLBL"), aRangeBox));
-  myMaxEdit = new QLineEdit( aRangeBox );
+  aBoxLayout->addWidget(new QLabel(tr("MAXLBL"), myRangeBox));
+  myMaxEdit = new QLineEdit( myRangeBox );
   myMaxEdit->setValidator( new QDoubleValidator(myMaxEdit) );
   aBoxLayout->addWidget(myMaxEdit);
 
@@ -88,11 +91,43 @@ VisuGUI_FilterScalarsDlg::VisuGUI_FilterScalarsDlg(VisuGUI* theModule)
   connect(aBtnOk,     SIGNAL(clicked()), this, SLOT(accept()));
   connect(aBtnCancel, SIGNAL(clicked()), this, SLOT(reject()));
   connect(aBtnHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
+
+  SalomeApp_Application* anApp = theModule->getApp();
+  LightApp_SelectionMgr* aSelectionMgr = anApp->selectionMgr();
+  connect( aSelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionEvent() ) );
+
+  onSelectionEvent();
 }
 
 
+VisuGUI_FilterScalarsDlg::~VisuGUI_FilterScalarsDlg()
+{}
+
+void VisuGUI_FilterScalarsDlg::onSelectionEvent()
+{
+  VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects( myVisuGUI );
+  if ( !aSelectionInfo.empty() ) {
+    VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
+    if ( VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase )
+      if ( VISU::ColoredPrs3d_i* aColoredPrs3d = dynamic_cast< VISU::ColoredPrs3d_i* >( aBase ) ) {
+       myRangeBox->setChecked( aColoredPrs3d->IsScalarFilterUsed() );
+       myMinEdit->setText( QString::number( aColoredPrs3d->GetScalarFilterMin() ) );
+       myMaxEdit->setText( QString::number( aColoredPrs3d->GetScalarFilterMax() ) );
+       myColoredPrs3d = aColoredPrs3d;
+       setEnabled( true );
+       return;
+      }
+  }
+  typedef SALOME::GenericObjPtr< VISU::ColoredPrs3d_i  > TColoredPrs3dPtr;
+  myColoredPrs3d = TColoredPrs3dPtr();
+  setEnabled( false );
+  return;
+}
+
 void VisuGUI_FilterScalarsDlg::accept()
 {
+  myColoredPrs3d->SetScalarFilterRange( myMinEdit->text().toDouble(), myMaxEdit->text().toDouble() );
+  myColoredPrs3d->UseScalarFiltering( myRangeBox->isChecked() );
   QDialog::accept();
 }
 
index fa9e2e04f68b0ceada95aa3935a93d99e75a89b9..fdbb1f2b002adfa4b32e8d20b8fd934e04685769 100644 (file)
 
 #include <QDialog>
 
-class QLineEdit;
+#include "SALOME_GenericObjPointer.hh"
+
 class VisuGUI;
 
+class QLineEdit;
+class QGroupBox;
+
+namespace VISU
+{
+  class ColoredPrs3d_i;
+}
+
 
 class VisuGUI_FilterScalarsDlg: public QDialog
 {
   Q_OBJECT;
 
  public:
-  VisuGUI_FilterScalarsDlg(VisuGUI* theModule);
-  ~VisuGUI_FilterScalarsDlg() {};
+  VisuGUI_FilterScalarsDlg( VisuGUI* theModule );
+  ~VisuGUI_FilterScalarsDlg();
 
 protected slots:
 
@@ -51,10 +60,13 @@ protected slots:
 private slots:
 
   void onHelp();
+  void onSelectionEvent();
 
 private:
   VisuGUI* myVisuGUI;
+  SALOME::GenericObjPtr< VISU::ColoredPrs3d_i > myColoredPrs3d;
 
+  QGroupBox* myRangeBox;
   QLineEdit* myMinEdit;
   QLineEdit* myMaxEdit;
 };
index 8d07bf99c58df75bb11ff8bebb385d8f68b5ad57..f16cc52da3cbfa4353e8c250548adede094a3610 100644 (file)
@@ -624,11 +624,6 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   CBLog = new QCheckBox (tr("LOGARITHMIC_SCALING"), aGB);
   CBLog->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-// RKV : Begin
-  CBFilter = new QCheckBox (tr("FILTER_BY_SCALARS"), aGB);
-  CBFilter->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-// RKV : End
-
   RBFrange = new QRadioButton (tr("FIELD_RANGE_BTN"), aGB);
   RBIrange = new QRadioButton (tr("IMPOSED_RANGE_BTN"), aGB);
   RangeGroup->addButton( RBFrange, 0 );
@@ -641,6 +636,7 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   MinEdit->setValidator( new QDoubleValidator(this) );
   MinEdit->setText( "0.0" );
   QLabel* MinLabel = new QLabel (tr("LBL_MIN"), aGB);
+  MinLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
   MinLabel->setBuddy(MinEdit);
 
   MaxEdit = new QLineEdit( aGB );
@@ -649,19 +645,18 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   MaxEdit->setValidator( new QDoubleValidator(this) );
   MaxEdit->setText( "0.0" );
   QLabel* MaxLabel = new QLabel (tr("LBL_MAX"), aGB);
+  MaxLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
   MaxLabel->setBuddy(MaxEdit);
 
-  RangeGroupLayout->addWidget( myModeLbl, 0, 0 );
-  RangeGroupLayout->addWidget( myModeCombo, 0, 1, 1, 4);
-// RKV  RangeGroupLayout->addWidget( CBLog, 1, 0, 1, 4);
-  RangeGroupLayout->addWidget( CBLog, 1, 0, 1, 2); // RKV
-  RangeGroupLayout->addWidget( CBFilter, 1, 2, 1, 2); // RKV
-  RangeGroupLayout->addWidget( RBFrange, 2, 0, 1, 2);
-  RangeGroupLayout->addWidget( RBIrange, 2, 2, 1, 2);
-  RangeGroupLayout->addWidget( MinLabel, 3, 0 );
-  RangeGroupLayout->addWidget( MinEdit,  3, 1 );
-  RangeGroupLayout->addWidget( MaxLabel, 3, 2 );
-  RangeGroupLayout->addWidget( MaxEdit,  3, 3 );
+  RangeGroupLayout->addWidget( myModeLbl, 0, 0, 1, 1 );
+  RangeGroupLayout->addWidget( myModeCombo, 0, 1, 1, 2);
+  RangeGroupLayout->addWidget( CBLog, 0, 3, 1, 1);
+  RangeGroupLayout->addWidget( RBFrange, 1, 0, 1, 2);
+  RangeGroupLayout->addWidget( RBIrange, 1, 2, 1, 2);
+  RangeGroupLayout->addWidget( MinLabel, 2, 0 );
+  RangeGroupLayout->addWidget( MinEdit,  2, 1 );
+  RangeGroupLayout->addWidget( MaxLabel, 2, 2 );
+  RangeGroupLayout->addWidget( MaxEdit,  2, 3 );
 
   //TopLayout->addWidget( RangeGroup );
 
@@ -845,7 +840,6 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview )
   connect( myBarBtn,       SIGNAL( clicked() ),              this, SLOT( onBarPref() ) );
   connect( myPreviewCheck, SIGNAL( toggled( bool )),         this, SLOT( onPreviewCheck( bool ) ) );
   
-  connect( CBFilter,       SIGNAL( toggled( bool ) ),        this, SLOT( onFilterByScalars( bool ) )); // RKV
   connect( CBDistr,        SIGNAL( toggled( bool ) ),        this, SLOT( onShowDistribution( bool ) )); // RKV
   
   connect( ColorSpin,      SIGNAL( valueChanged( int ) ),    this, SLOT( updatePreview() ));
@@ -918,7 +912,6 @@ void VisuGUI_ScalarBarPane::storeToResources() {
     aResourceMgr->setValue("VISU", "scalar_range_type", 0);
   
   aResourceMgr->setValue("VISU", "scalar_bar_logarithmic", isLogarithmic());
-  aResourceMgr->setValue("VISU", "scalar_bar_filter_by_scalars", isFilteredByScalars()); // RKV
   aResourceMgr->setValue("VISU", "scalar_bar_show_distribution", isShowDistribution()); // RKV
  
   ////
@@ -1057,11 +1050,7 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs)
   setRange( myScalarMap->GetMin(), myScalarMap->GetMax(), myScalarMap->IsRangeFixed() );
 
   setScalarBarData( myScalarMap->GetNbColors(), myScalarMap->GetLabels() );
-// RKV : Begin
-  setFilteredByScalars( myScalarMap->IsFilteredByScalars() );
   setShowDistribution( myScalarMap->GetIsDistributionVisible() );
-// RKV : End
-
 
   // "Title"
   CORBA::String_var aTitle = myScalarMap->GetTitle();
@@ -1171,25 +1160,22 @@ void VisuGUI_ScalarBarPane::createScalarBar()
     myScalarMapPL->SetScaling(VISU::LOGARITHMIC);
   else
     myScalarMapPL->SetScaling(VISU::LINEAR);
-  vtkFloatingPointType theRange[2];
-  if(RBFrange->isChecked()) {
-    theRange[0] = myScalarMap->GetSourceMin();
-    theRange[1] = myScalarMap->GetSourceMax();
+
+  if ( RBFrange->isChecked() ) {
+    myScalarMapPL->SetSourceRange();
   } else {
-    theRange[0] = (vtkFloatingPointType)MinEdit->text().toDouble();
-    theRange[1] = (vtkFloatingPointType)MaxEdit->text().toDouble();
+    vtkFloatingPointType aRange[2];
+    aRange[0] = (vtkFloatingPointType)MinEdit->text().toDouble();
+    aRange[1] = (vtkFloatingPointType)MaxEdit->text().toDouble();
+    myScalarMapPL->SetScalarRange( aRange );
   }
-// RKV  myScalarMapPL->SetScalarRange(theRange, false);
-  myScalarMapPL->SetScalarRange(theRange, isFilteredByScalars()); // RKV
-  myScalarMapPL->SetNbColors(sbCol);
-  
+
+  myScalarMapPL->SetNbColors(sbCol);  
   myScalarMapPL->Update();
   
   aScalarBarActor->SetLookupTable(myScalarMapPL->GetBarTable());
-// RKV : Begin
-  aScalarBarActor->SetDistribution(myScalarMapPL->GetDistribution());
-  aScalarBarActor->SetDistributionVisibility(isShowDistribution());
-// RKV : End
+  aScalarBarActor->SetDistribution( myScalarMapPL->GetDistribution() );
+  aScalarBarActor->SetDistributionVisibility( isShowDistribution() );
   
   if (!myTextDlg->getTitleText().isEmpty()) {
     VISU::PValForTime aValForTime;
@@ -1323,11 +1309,10 @@ int VisuGUI_ScalarBarPane::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs) {
   else
     myScalarMap->SetScaling(VISU::LINEAR);
 
-  if (RBFrange->isChecked()) {
+  if ( RBFrange->isChecked() ) {
     myScalarMap->SetSourceRange();
   } else {
-// RKV    myScalarMap->SetRange(MinEdit->text().toDouble(), MaxEdit->text().toDouble());
-    myScalarMap->SetRangeAndFilter(MinEdit->text().toDouble(), MaxEdit->text().toDouble(), isFilteredByScalars()); // RKV
+    myScalarMap->SetRange( MinEdit->text().toDouble(), MaxEdit->text().toDouble() );
   }
   myScalarMap->SetNbColors(ColorSpin->value());
   myScalarMap->SetLabels(LabelSpin->value());
@@ -1412,7 +1397,6 @@ void VisuGUI_ScalarBarPane::onFieldRange( bool isOn )
     myScalarMap->SetSourceRange();
     MinEdit->setEnabled( false );
     MaxEdit->setEnabled( false );
-    CBFilter->setEnabled( false );
     changeScalarMode(myModeCombo->currentIndex());
   }
 }
@@ -1420,40 +1404,29 @@ void VisuGUI_ScalarBarPane::onFieldRange( bool isOn )
 void VisuGUI_ScalarBarPane::onImposedRange( bool isOn )
 {
   if (isOn) {
-    myScalarMap->SetRange(myScalarMap->GetMin(), myScalarMap->GetMax());
-    //myScalarMap->SetRangeAndFilter(myScalarMap->GetMin(), myScalarMap->GetMax(), isFilteredByScalars()); 
+    myScalarMap->SetRange( myScalarMap->GetMin(), myScalarMap->GetMax() );
     MinEdit->setEnabled( true );
     MaxEdit->setEnabled( true );
-    CBFilter->setEnabled( true );
     changeScalarMode(myModeCombo->currentIndex());
   }
 }
-// RKV : Begin
-void VisuGUI_ScalarBarPane::onFilterByScalars( bool isOn )
-{
-  myScalarMap->SetRangeAndFilter(myScalarMap->GetMin(), myScalarMap->GetMax(), isOn);
-  updatePreview();
-}
 
 void VisuGUI_ScalarBarPane::onShowDistribution( bool isOn )
 {
   myScalarMap->SetIsDistributionVisible(isOn);
   updatePreview();
 }
-// RKV : End
+
 void VisuGUI_ScalarBarPane::changeRange( int )
 {
   if ( RBFrange->isChecked() ) {
     myScalarMap->SetSourceRange();
     MinEdit->setEnabled( false );
     MaxEdit->setEnabled( false );
-    CBFilter->setEnabled( false );
   } else {
-    myScalarMap->SetRange(myScalarMap->GetMin(), myScalarMap->GetMax());
-    //myScalarMap->SetRangeAndFilter(myScalarMap->GetMin(), myScalarMap->GetMax(), isFilteredByScalars());
+    myScalarMap->SetRange( myScalarMap->GetMin(), myScalarMap->GetMax() );
     MinEdit->setEnabled( true );
     MaxEdit->setEnabled( true );
-    CBFilter->setEnabled( true );
   }
 
   changeScalarMode(myModeCombo->currentIndex());
@@ -1579,20 +1552,6 @@ void VisuGUI_ScalarBarPane::setLogarithmic( bool on ) {
   CBLog->setChecked( on );
 }
 
-// RKV : Begin
-//----------------------------------------------------------------------------
-bool VisuGUI_ScalarBarPane::isFilteredByScalars() {
-  if (CBFilter->isEnabled())
-    return CBFilter->isChecked();
-  return false;
-}
-
-
-//----------------------------------------------------------------------------
-void VisuGUI_ScalarBarPane::setFilteredByScalars( bool on ) {
-  CBFilter->setChecked( on );
-}
-
 //----------------------------------------------------------------------------
 bool VisuGUI_ScalarBarPane::isShowDistribution() {
   return CBDistr->isChecked();
index 4923b6263d9fe34639952af919fc80ff4331436a..01fefefd76c201fd4ec7f9e5c0f9c090d1f8e563 100644 (file)
@@ -175,12 +175,8 @@ class VisuGUI_ScalarBarPane : public QWidget//QVBox
   int     getNbLabels();
   bool    isLogarithmic();
   void    setLogarithmic( bool on );
-  // RKV : Begin
-  bool    isFilteredByScalars();
-  void    setFilteredByScalars( bool on );
   bool    isShowDistribution();
   void    setShowDistribution( bool on );
-  // RKV : End
   bool    isToSave();
 
   void storeToResources();
@@ -211,10 +207,8 @@ class VisuGUI_ScalarBarPane : public QWidget//QVBox
 
   QCheckBox*      CBSave;
   QCheckBox*      CBLog;
-  // RKV : Begin
-  QCheckBox*      CBFilter;
   QCheckBox*      CBDistr;
-  // RKV : End
+
   QLabel*         myModeLbl;
   QComboBox*      myModeCombo;
   QPushButton*    myTextBtn;
index cb97985fe34fbdee4d51d2642d7995639ffc717c..04b34d9f670adebd904006da2b9ee14a498dbe45 100644 (file)
@@ -687,19 +687,21 @@ VISU::ColoredPrs3d_i
     SetNbColors(anOrigin->GetNbColors());
     
     SetUnitsVisible(anOrigin->IsUnitsVisible());
-    SetIsDistributionVisible(anOrigin->GetIsDistributionVisible()); // RKV
+    SetIsDistributionVisible(anOrigin->GetIsDistributionVisible());
     SetLabelsFormat(anOrigin->GetLabelsFormat());
 
     SetBarOrientation(anOrigin->GetBarOrientation());
     
     SetMinMaxController( anOrigin );
 
-    if(anOrigin->IsRangeFixed())
-// RKV      SetRange(anOrigin->GetMin(), anOrigin->GetMax());
-      SetRangeAndFilter(anOrigin->GetMin(), anOrigin->GetMax(), anOrigin->IsFilteredByScalars()); // RKV
+    if ( anOrigin->IsRangeFixed() )
+      SetRange( anOrigin->GetMin(), anOrigin->GetMax() );
     else
       SetSourceRange();
 
+    SetScalarFilterRange( anOrigin->GetScalarFilterMin(), anOrigin->GetScalarFilterMax() );
+    UseScalarFiltering( anOrigin->IsScalarFilterUsed() );
+
     SetPosition(anOrigin->GetPosX(), anOrigin->GetPosY());
     SetSize(anOrigin->GetWidth(), anOrigin->GetHeight());
     SetRatios(anOrigin->GetTitleWidth(), anOrigin->GetTitleHeight(),
@@ -773,25 +775,74 @@ VISU::ColoredPrs3d_i
   return myColoredPL->GetScalarRange()[1];
 }
 
+
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
-::SetRange(CORBA::Double theMin, CORBA::Double theMax)
+::SetRange( CORBA::Double theMin, CORBA::Double theMax )
 {
   VISU::TSetModified aModified(this);
 
   vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
-/* RKV  ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_ColoredPL, vtkFloatingPointType*, bool>
-                  (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange, false));
-*/
-// RKV : Begin
-  ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_ColoredPL, vtkFloatingPointType*, bool>
-                  (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange, myColoredPL->IsFiltered()));
-// RKV : End
+  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+                  (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange));
   UseFixedRange(true);
 }
 
 
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::SetScalarFilterRange( CORBA::Double theMin, CORBA::Double theMax )
+{
+  VISU::TSetModified aModified(this);
+
+  vtkFloatingPointType aScalarRange[ 2 ] = { theMin, theMax };
+  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+                  (GetSpecificPL(), &VISU_ColoredPL::SetScalarFilteredRange, aScalarRange) );
+}
+
+
+//----------------------------------------------------------------------------
+CORBA::Double
+VISU::ColoredPrs3d_i
+::GetScalarFilterMin()
+{
+  vtkFloatingPointType aScalarRange[ 2 ];
+  GetSpecificPL()->GetScalarFilteredRange( aScalarRange );
+
+  return aScalarRange[ 0 ];
+}
+
+
+//----------------------------------------------------------------------------
+CORBA::Double
+VISU::ColoredPrs3d_i
+::GetScalarFilterMax()
+{
+  vtkFloatingPointType aScalarRange[ 2 ];
+  GetSpecificPL()->GetScalarFilteredRange( aScalarRange );
+
+  return aScalarRange[ 1 ];
+}
+
+
+//----------------------------------------------------------------------------
+CORBA::Boolean
+VISU::ColoredPrs3d_i
+::IsScalarFilterUsed()
+{
+  return myColoredPL->IsScalarFilterUsed();
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::ColoredPrs3d_i
+::UseScalarFiltering( CORBA::Boolean theUseScalarFilter )
+{
+  return myColoredPL->UseScalarFiltering( theUseScalarFilter );
+}
+
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
@@ -804,9 +855,9 @@ VISU::ColoredPrs3d_i
     ProcessVoidEvent(new TVoidMemFunEvent<VISU_ColoredPL>
                     (GetSpecificPL(), &VISU_ColoredPL::SetSourceRange));
   }else{
-    vtkFloatingPointType aScalarRange[2] = {GetSourceMin(), GetSourceMax()};
-    ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_ColoredPL, vtkFloatingPointType*, bool>
-                    (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange, false));
+    vtkFloatingPointType aScalarRange[ 2 ] = {GetSourceMin(), GetSourceMax()};
+    ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+                    (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange));
   }
   UseFixedRange(false);
 }
@@ -1506,14 +1557,15 @@ VISU::ColoredPrs3d_i
 
   // Scalar Range
   int aRangeType = aResourceMgr->integerValue("VISU" , "scalar_range_type", 0);
-  if(aRangeType == 1){
+  if ( aRangeType == 1 ) {
     float aMin = aResourceMgr->doubleValue("VISU", "scalar_range_min", 0);
     float aMax = aResourceMgr->doubleValue("VISU", "scalar_range_max", 0);
-// RKV    SetRange(aMin, aMax);
-    bool isFiltered = aResourceMgr->booleanValue("VISU", "scalar_bar_filter_by_scalars", false); // RKV
-    SetRangeAndFilter(aMin, aMax, isFiltered);
+    SetRange( aMin, aMax );
   }
-  UseFixedRange(aRangeType == 1);
+  UseFixedRange( aRangeType == 1 );
+
+  bool isFiltered = aResourceMgr->booleanValue("VISU", "scalar_bar_filter_by_scalars", false);
+  UseScalarFiltering( isFiltered );
 
   int aNumberOfColors = aResourceMgr->integerValue( "VISU", "scalar_bar_num_colors", 64 );
   SetNbColors(aNumberOfColors);
@@ -1676,15 +1728,20 @@ VISU::ColoredPrs3d_i
 
   Build(ERestore);
 
-  SetScalarMode(VISU::Storable::FindValue(theMap,"myScalarMode").toInt());
-  float aMin = VISU::Storable::FindValue(theMap,"myScalarRange[0]").toDouble();
-  float aMax = VISU::Storable::FindValue(theMap,"myScalarRange[1]").toDouble();
-// RKV  SetRange(aMin, aMax);
-  // RKV : Begin
-  bool isFiltered = VISU::Storable::FindValue(theMap,"myIsFilteredByScalars", "0").toInt();
-  SetRangeAndFilter(aMin, aMax, isFiltered);
+  SetScalarMode(VISU::Storable::FindValue( theMap,"myScalarMode" ).toInt() );
+  {
+    float aMin = VISU::Storable::FindValue( theMap, "myScalarRange[0]" ).toDouble();
+    float aMax = VISU::Storable::FindValue( theMap, "myScalarRange[1]" ).toDouble();
+    SetRange( aMin, aMax );
+  }
+  {
+    bool isFiltered = VISU::Storable::FindValue( theMap, "myIsFilteredByScalars", "0" ).toInt();
+    float aMin = VISU::Storable::FindValue( theMap, "myScalarFilterRange[0]" ).toDouble();
+    float aMax = VISU::Storable::FindValue( theMap, "myScalarFilterRange[1]" ).toDouble();
+    SetScalarFilterRange( aMin, aMax );
+    UseScalarFiltering( isFiltered );
+  }
   SetIsDistributionVisible(VISU::Storable::FindValue(theMap,"myIsDistributionVisible", "0").toInt());
-  // RKV : End
 
   UseFixedRange(VISU::Storable::FindValue(theMap,"myIsFixedRange", "0").toInt());
 
@@ -1755,7 +1812,10 @@ VISU::ColoredPrs3d_i
   Storable::DataToStream( theStr, "myScalarRange[1]", GetMax() );
   Storable::DataToStream( theStr, "myIsFixedRange",   IsRangeFixed() );
   
-  Storable::DataToStream( theStr, "myIsFilteredByScalars",   IsFilteredByScalars() ); // RKV
+  Storable::DataToStream( theStr, "myIsFilteredByScalars",  IsScalarFilterUsed() );
+  Storable::DataToStream( theStr, "myScalarFilterRange[0]", GetScalarFilterMin() );
+  Storable::DataToStream( theStr, "myScalarFilterRange[1]", GetScalarFilterMax() );
+
   Storable::DataToStream( theStr, "myIsDistributionVisible", GetIsDistributionVisible() ); // RKV
 
   Storable::DataToStream( theStr, "myNumberOfColors", int(GetNbColors()) );
@@ -1914,7 +1974,6 @@ VISU::ColoredPrs3d_i
   return this;
 }
 
-// RKV : Begin
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
@@ -1936,26 +1995,3 @@ VISU::ColoredPrs3d_i
 }
 
 //----------------------------------------------------------------------------
-CORBA::Boolean
-VISU::ColoredPrs3d_i
-::IsFilteredByScalars()
-{
-  return myColoredPL->IsFiltered();
-}
-
-//----------------------------------------------------------------------------
-void
-VISU::ColoredPrs3d_i
-::SetRangeAndFilter(CORBA::Double theMin, CORBA::Double theMax, CORBA::Boolean isFilter)
-{
-  VISU::TSetModified aModified(this);
-
-  vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
-  ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_ColoredPL, vtkFloatingPointType*, bool>
-                  (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange, isFilter));
-
-  UseFixedRange(true);
-}
-
-//----------------------------------------------------------------------------
-// RKV : End
index 1215ac7b16eef03f5bf121b0599b452cb2797937..52f5f631d5a4f764803e5acab5f5f4a1450dfe24 100644 (file)
@@ -355,7 +355,6 @@ namespace VISU
     CORBA::Boolean
     IsUnitsVisible();
 
-// RKV : Begin
     /*!  
      * Set the visibility of a distribution curve.
      * \param theIs is used to switch on/off the visibility of a distribution curve.
@@ -366,8 +365,10 @@ namespace VISU
     virtual CORBA::Boolean GetIsDistributionVisible();
     
     //! Gets current filtering by scalars mode
-    virtual CORBA::Boolean IsFilteredByScalars();
+    virtual CORBA::Boolean IsScalarFilterUsed();
     
+    virtual void UseScalarFiltering( CORBA::Boolean theUseScalarFilter );
+
     /*!
      * Sets scalar range - min and max boundaries of the scalar bar.
      * \param theMin  Min boundary of the scalar bar.
@@ -376,8 +377,17 @@ namespace VISU
      */
     virtual
     void
-    SetRangeAndFilter(CORBA::Double theMin, CORBA::Double theMax, CORBA::Boolean theIs);
-// RKV : End  
+    SetScalarFilterRange( CORBA::Double theMin, CORBA::Double theMax );
+
+    //----------------------------------------------------------------------------
+    virtual
+    CORBA::Double
+    GetScalarFilterMin();
+
+    //----------------------------------------------------------------------------
+    virtual
+    CORBA::Double
+    GetScalarFilterMax();
 
     //----------------------------------------------------------------------------
     //! Gets memory size actually used by the presentation (Mb).
index 87453dcb1a6b6be05374b6dd801b5901a1618c63..42e007a08b3fbccc7d3ac0a0412faa5f81670ea0 100644 (file)
@@ -1091,8 +1091,8 @@ VISU::GaussPoints_i
   VISU::TSetModified aModified(this);
 
   vtkFloatingPointType aScalarRange[2] = {GetSourceMin(), GetSourceMax()};
-  ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_ColoredPL, vtkFloatingPointType*, bool>
-                  (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange, false));
+  ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+                  (GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange));
 
   UseFixedRange(false);
 }