From 92697527b30bb98b23cbfdb5efd16fd1f5140ec4 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 15 Jul 2008 07:41:38 +0000 Subject: [PATCH] Fix for issue 0019937: EDF 790 VISU : ScalarMapondeformed of ELNO field. --- src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx | 10 ++++++---- src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx index 20824113..b807671e 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx @@ -32,7 +32,7 @@ #include "VTKViewer_TransformFilter.h" #include "VTKViewer_Transform.h" #include "VISU_MergeFilter.hxx" - +#include "VISU_ElnoDisassembleFilter.hxx" #include "VISU_PipeLineUtils.hxx" #include @@ -68,6 +68,7 @@ VISU_DeformedShapeAndScalarMapPL myScalarsFieldTransform = VISU_FieldTransform::New(); myCellDataToPointData = vtkCellDataToPointData::New(); + myScalarsElnoDisassembleFilter = VISU_ElnoDisassembleFilter::New(); } //---------------------------------------------------------------------------- @@ -201,9 +202,10 @@ VISU_DeformedShapeAndScalarMapPL ::UpdateScalars() { vtkDataSet* aScalars = GetScalars(); - myScalarsExtractor->SetInput(aScalars); + myScalarsElnoDisassembleFilter->SetInput(aScalars); + myScalarsExtractor->SetInput(myScalarsElnoDisassembleFilter->GetOutput()); - if(VISU::IsDataOnCells(aScalars)) + if(VISU::IsDataOnCells(myScalarsElnoDisassembleFilter->GetOutput())) GetMapper()->SetScalarModeToUseCellData(); else GetMapper()->SetScalarModeToUsePointData(); @@ -238,7 +240,7 @@ VISU_DeformedShapeAndScalarMapPL { if(GetScalars() == theScalars) return; - + myScalars = theScalars; UpdateScalars(); } diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx index 6319c49c..b3d454a2 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx @@ -35,6 +35,7 @@ class vtkWarpVector; class vtkUnstructuredGrid; class vtkCellDataToPointData; class vtkPointDataToCellData; +class VISU_ElnoDisassembleFilter; //---------------------------------------------------------------------------- @@ -142,6 +143,7 @@ private: vtkCellDataToPointData* myCellDataToPointData; VISU_FieldTransform* myScalarsFieldTransform; VISU_Extractor* myScalarsExtractor; + VISU_ElnoDisassembleFilter* myScalarsElnoDisassembleFilter; }; #endif -- 2.39.2