]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Porting to VTK 6.
authorouv <ouv@opencascade.com>
Tue, 12 Mar 2013 15:50:09 +0000 (15:50 +0000)
committerouv <ouv@opencascade.com>
Tue, 12 Mar 2013 15:50:09 +0000 (15:50 +0000)
Debug.

60 files changed:
src/CONVERTOR/VISU_CommonCellsFilter.cxx
src/CONVERTOR/VISU_CommonCellsFilter.hxx
src/CONVERTOR/VISU_ConvertorUtils.cxx
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_GaussMergeFilter.cxx
src/CONVERTOR/VISU_GaussMergeFilter.hxx
src/CONVERTOR/VISU_IDMapper.hxx
src/CONVERTOR/VISU_MergeFilter.cxx
src/CONVERTOR/VISU_MergeFilter.hxx
src/CONVERTOR/VISU_MergeFilterUtilities.cxx
src/CONVERTOR/VISU_Structures_impl.cxx
src/CONVERTOR/VISU_Structures_impl.hxx
src/CONVERTOR/VISU_TableReader.hxx
src/CONVERTOR/VISU_UsedPointsFilter.hxx
src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsDeviceActor.cxx
src/OBJECT/VISU_MeshAct.cxx
src/OBJECT/VISU_ScalarMapAct.cxx
src/OBJECT/VISU_VectorsAct.cxx
src/PIPELINE/VISU_ColoredPL.cxx
src/PIPELINE/VISU_ColoredPL.hxx
src/PIPELINE/VISU_CutLinesPL.cxx
src/PIPELINE/VISU_CutLinesPL.hxx
src/PIPELINE/VISU_CutPlanesPL.cxx
src/PIPELINE/VISU_CutPlanesPL.hxx
src/PIPELINE/VISU_CutSegmentPL.cxx
src/PIPELINE/VISU_CutSegmentPL.hxx
src/PIPELINE/VISU_DataSetMapperHolder.cxx
src/PIPELINE/VISU_DataSetMapperHolder.hxx
src/PIPELINE/VISU_DeformationPL.cxx
src/PIPELINE/VISU_DeformationPL.hxx
src/PIPELINE/VISU_DeformedGridPL.cxx
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx
src/PIPELINE/VISU_DeformedShapePL.cxx
src/PIPELINE/VISU_DeformedShapePL.hxx
src/PIPELINE/VISU_GaussPointsPL.cxx
src/PIPELINE/VISU_GaussPointsPL.hxx
src/PIPELINE/VISU_IsoSurfacesPL.cxx
src/PIPELINE/VISU_IsoSurfacesPL.hxx
src/PIPELINE/VISU_MapperHolder.hxx
src/PIPELINE/VISU_MergedPL.hxx
src/PIPELINE/VISU_MeshPL.cxx
src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx
src/PIPELINE/VISU_PipeLine.cxx
src/PIPELINE/VISU_PipeLine.hxx
src/PIPELINE/VISU_PipeLineUtils.hxx
src/PIPELINE/VISU_Plot3DPL.cxx
src/PIPELINE/VISU_Plot3DPL.hxx
src/PIPELINE/VISU_PolyDataMapperHolder.cxx
src/PIPELINE/VISU_PolyDataMapperHolder.hxx
src/PIPELINE/VISU_ScalarMapPL.cxx
src/PIPELINE/VISU_ScalarMapPL.hxx
src/PIPELINE/VISU_StreamLinesPL.cxx
src/PIPELINE/VISU_StreamLinesPL.hxx
src/PIPELINE/VISU_VectorsPL.cxx
src/PIPELINE/VISU_VectorsPL.hxx
src/PIPELINE/VISU_XYPlotActor.cxx
src/VISUGUI/VisuGUI_EvolutionDlg.cxx

index be5237afcceea1a59963a594309b6e841ed5f9d7..4473acb63efc0fc1f7d04a09c9434d69045be3d4 100644 (file)
@@ -209,7 +209,9 @@ namespace
 vtkStandardNewMacro(VISU_CommonCellsFilter);
 
 VISU_CommonCellsFilter
-::VISU_CommonCellsFilter()
+::VISU_CommonCellsFilter() :
+  myIsProfileSet( false ),
+  myIsCellsSet( false )
 {}
 
 VISU_CommonCellsFilter
@@ -218,30 +220,18 @@ VISU_CommonCellsFilter
 
 void
 VISU_CommonCellsFilter
-::SetProfileUG(vtkUnstructuredGrid *input)
+::SetProfileUG(vtkAlgorithmOutput *input)
 {
-  this->SetInputData(0, input);
-}
-
-vtkUnstructuredGrid*
-VISU_CommonCellsFilter
-::GetProfileUG()
-{
-  return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(0));
+  myIsProfileSet = true;
+  this->SetInputConnection(0, input);
 }
 
 void
 VISU_CommonCellsFilter
-::SetCellsUG(vtkUnstructuredGrid *input)
+::SetCellsUG(vtkAlgorithmOutput *input)
 {
-  this->SetInputData(1, input);
-}
-
-vtkUnstructuredGrid*
-VISU_CommonCellsFilter
-::GetCellsUG()
-{
-  return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(1));
+  myIsCellsSet = true;
+  this->SetInputConnection(1, input);
 }
 
 int
@@ -253,25 +243,25 @@ VISU_CommonCellsFilter
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"VISU_CommonCellsFilter::Execute");
 
-  // get the info objects
-  vtkInformation *inInfo1 = inputVector[0]->GetInformationObject(0);
-  vtkInformation *inInfo2 = inputVector[1]->GetInformationObject(0); // OUV_PORTING: to check
-  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+  if( !myIsProfileSet )
+    return 0;
 
-  // get the input and ouptut
+  vtkInformation *inInfo1 = inputVector[0]->GetInformationObject(0);
   vtkUnstructuredGrid *anInputProfileUG = vtkUnstructuredGrid::SafeDownCast(
     inInfo1->Get(vtkDataObject::DATA_OBJECT()));
-  vtkUnstructuredGrid *anInputCellsUG = vtkUnstructuredGrid::SafeDownCast(
-    inInfo2->Get(vtkDataObject::DATA_OBJECT()));
+
+  vtkUnstructuredGrid *anInputCellsUG = NULL;
+  if( myIsCellsSet )
+  {
+    vtkInformation *inInfo2 = inputVector[1]->GetInformationObject(0);
+    anInputCellsUG = vtkUnstructuredGrid::SafeDownCast(
+      inInfo2->Get(vtkDataObject::DATA_OBJECT()));
+  }
+
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
   vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
     outInfo->Get(vtkDataObject::DATA_OBJECT()));
 
-  // OUV_PORTING: to delete
-  //vtkUnstructuredGrid* anInputProfileUG = this->GetProfileUG();
-  //vtkUnstructuredGrid* anInputCellsUG   = this->GetCellsUG();
-
-  //vtkUnstructuredGrid* anOutput         = this->GetOutput();
-  
   if(anInputCellsUG == NULL){
     anOutput->ShallowCopy(anInputProfileUG);
   }
index 1d3ec82d91b020196257ec52ebe3d464cf0e2e3a..7074bfca3852c6d7ae2ffecc00dbee7dd508ff61 100644 (file)
@@ -35,14 +35,12 @@ public:
   // Description:
   // Specify the Unstructured Grid which overview
   // nodal profile.
-  void SetProfileUG(vtkUnstructuredGrid *input);
-  vtkUnstructuredGrid* GetProfileUG();
+  void SetProfileUG(vtkAlgorithmOutput *input);
 
   // Description:
   // Specify the Unstructured Grid which overview
   // cells data on CELL_ENTITY.
-  void SetCellsUG(vtkUnstructuredGrid *input);
-  vtkUnstructuredGrid* GetCellsUG();
+  void SetCellsUG(vtkAlgorithmOutput *input);
 
 protected:
   VISU_CommonCellsFilter();
@@ -50,6 +48,10 @@ protected:
 
   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data
 
+private:
+  bool myIsProfileSet;
+  bool myIsCellsSet;
+
 private:
   VISU_CommonCellsFilter(const VISU_CommonCellsFilter&); // Lock copy
   void operator=(const VISU_CommonCellsFilter&); // Lock copy
index c9b7b0bb94815a15018e93d9d8762915590bb021..11d0cdab92520a748655ea924a71bee48577f483 100644 (file)
@@ -243,7 +243,6 @@ namespace VISU
   bool 
   IsDataOnPoints(vtkDataSet* theDataSet)
   {
-    //theDataSet->Update(); // OUV_PORTING (see the same below)
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
     return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
   }
index 8104dc3be57eb36d6ad2fe6d2e6a03df2f50f47f..82cd72c7479015f55c8568cd46ee9b60af53a09f 100644 (file)
@@ -553,8 +553,6 @@ namespace
     }
     anAppendFilter->Update(); // Fix on VTK
 
-    //theMeshOnEntity->GetOutput()->Update(); // OUV_PORTING
-
     vtkDataSet* aSource = anAppendFilter->GetOutput();
     INITMSGA(MYDEBUG,0,"aNbPoints - "<<aSource->GetNumberOfPoints()<<endl);
     BEGMSG(MYDEBUG,"aNbCells - "<<aSource->GetNumberOfCells()<<endl);
@@ -567,7 +565,6 @@ namespace
   void
   PrintMemorySize(vtkUnstructuredGrid* theDataSet)
   {
-    //theDataSet->Update(); // OUV_PORTING
     BEGMSG(1,"GetPoints() = "<<double(theDataSet->GetPoints()->GetActualMemorySize()*1000)<<endl);
     BEGMSG(1,"GetCells() = "<<double(theDataSet->GetCells()->GetActualMemorySize()*1000)<<endl);
     BEGMSG(1,"GetCellTypesArray() = "<<double(theDataSet->GetCellTypesArray()->GetActualMemorySize()*1000)<<endl);
@@ -982,7 +979,6 @@ VISU_Convertor_impl
       }
       if(MYVTKDEBUG){
         GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
-        //anOutput->Update(); // OUV_PORTING
         if(theEntity == VISU::NODE_ENTITY)
           BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
         else
@@ -1071,7 +1067,6 @@ VISU_Convertor_impl
       }
       if(MYVTKDEBUG){
         GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
-        //anOutput->Update(); // OUV_PORTING
         if(theEntity == VISU::NODE_ENTITY)
           BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
         else
index 810cae8760b3d043201b86c29b35aae6bf735d2b..f3f7652090b2e19f6fa5db286d503b66f93f5386 100644 (file)
@@ -60,105 +60,57 @@ VISU_GaussMergeFilter::~VISU_GaussMergeFilter()
 }
 
 //------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetGeometry(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetGeometryConnection(vtkAlgorithmOutput *input)
 {
-  this->Superclass::SetInputData(input);
+  this->Superclass::SetInputConnection(input);
 }
 
 //------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetGeometry()
+void VISU_GaussMergeFilter::SetGeometryData(vtkDataSet *input)
 {
-  if (this->GetNumberOfInputConnections(0) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(0, 0));
+  this->Superclass::SetInputData(input);
 }
 
 //------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetScalars(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetScalarsData(vtkDataSet *input)
 {
   this->SetInputData(1, input);
 }
 
 //------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetScalars()
+void VISU_GaussMergeFilter::SetScalarsConnection(vtkAlgorithmOutput *input)
 {
-  if (this->GetNumberOfInputConnections(1) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(1, 0));
+  this->SetInputConnection(1, input);
 }
 
 //------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetVectors(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetVectorsData(vtkDataSet *input)
 {
   this->SetInputData(2, input);
 }
 
 //------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetVectors()
-{
-  if (this->GetNumberOfInputConnections(2) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(2, 0));
-}
-
-//------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetNormals(vtkDataSet *input)
-{
-  this->SetInputData(3, input);
-}
-
-//------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetNormals()
+void VISU_GaussMergeFilter::SetVectorsConnection(vtkAlgorithmOutput *input)
 {
-  if (this->GetNumberOfInputConnections(3) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(3, 0));
+  this->SetInputConnection(2, input);
 }
 
 //------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetTCoords(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetNormals(vtkAlgorithmOutput *input)
 {
-  this->SetInputData(4, input);
+  this->SetInputConnection(3, input);
 }
 
 //------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetTCoords()
+void VISU_GaussMergeFilter::SetTCoords(vtkAlgorithmOutput *input)
 {
-  if (this->GetNumberOfInputConnections(4) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(4, 0));
+  this->SetInputConnection(4, input);
 }
 
 //------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetTensors(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetTensors(vtkAlgorithmOutput *input)
 {
-  this->SetInputData(5, input);
-}
-
-//------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetTensors()
-{
-  if (this->GetNumberOfInputConnections(5) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(5, 0));
+  this->SetInputConnection(5, input);
 }
 
 //------------------------------------------------------------------------------
@@ -204,10 +156,21 @@ VISU_GaussMergeFilter
               vtkInformationVector **theInputVector,
               vtkInformationVector *theOutputVector)
 {
-  if(vtkUnstructuredGrid *anInput = dynamic_cast<vtkUnstructuredGrid*>(this->GetInput())){
-    vtkPolyData *anOutput = dynamic_cast<vtkPolyData*>(this->GetOutput());
-    return ExecuteGauss(anInput,
-                        anOutput);
+  vtkInformation *inInfo0 = theInputVector[0]->GetInformationObject(0);
+  vtkInformation *inInfo1 = theInputVector[1]->GetInformationObject(0);
+  vtkInformation *outInfo = theOutputVector->GetInformationObject(0);
+
+  // get the input and output
+  vtkDataSet *anInput = vtkDataSet::SafeDownCast(inInfo0->Get(vtkDataObject::DATA_OBJECT()));
+  vtkDataSet *aScalars = theInputVector[1]->GetNumberOfInformationObjects() > 0 ?
+    vtkDataSet::SafeDownCast(inInfo1->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+  vtkDataSet *anOutput = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
+  if(vtkUnstructuredGrid *anInputUG = dynamic_cast<vtkUnstructuredGrid*>(this->GetInput())){
+    vtkPolyData *anOutputPD = dynamic_cast<vtkPolyData*>(this->GetOutput());
+    return ExecuteGauss(anInputUG,
+                        aScalars,
+                        anOutputPD);
   }
 
   return Superclass::RequestData(theRequest,
@@ -288,6 +251,7 @@ VISU_GaussMergeFilter
 bool 
 VISU_GaussMergeFilter
 ::ExecuteGauss(vtkUnstructuredGrid* theInput,
+               vtkDataSet*          theScalarsDataSet,
                vtkPolyData*         theOutput)
 {
   if(IsMergingInputs()){
@@ -340,7 +304,7 @@ VISU_GaussMergeFilter
         for(vtkIdType i = 0;i < anIntersection.size();i++)
           aNbTuples += aDataCellId2TupleGaussIdMap[anIntersection[i].first].size();
         
-        vtkPointSet* aScalarsDataSet = dynamic_cast<vtkPointSet*>(GetScalars());
+        vtkPointSet* aScalarsDataSet = dynamic_cast<vtkPointSet*>(theScalarsDataSet);
         vtkPoints* aDataPoints = aScalarsDataSet->GetPoints();
         vtkPoints* anOutputPoints = vtkPoints::New(aDataPoints->GetDataType());
         
@@ -366,13 +330,13 @@ VISU_GaussMergeFilter
           
           for(vtkIdType i = 0; i < aCellIdArray.size();i++) {
             vtkIdType aCellId = aCellIdArray[i];
-            vtkCell *aCell = GetScalars()->GetCell(aCellId);
+            vtkCell *aCell = theScalarsDataSet->GetCell(aCellId);
             
             aCellIds->Reset();
             aCellIds->InsertNextId(aNewTupleId);
             aNewTupleId++;
           
-            vtkIdType aCellType = GetScalars()->GetCellType(aCellId);
+            vtkIdType aCellType = theScalarsDataSet->GetCellType(aCellId);
             vtkIdType aNewCellId = theOutput->InsertNextCell(aCellType, aCellIds);
           
             anOutputCellData->CopyData(anInputCellData, aCellId, aNewCellId);
index 29f1a17a95782bad82f2d1940d4817693a6ee30d..3a2c0ea52e21b80a2dc5c2aa704989a243f498a5 100644 (file)
@@ -46,34 +46,31 @@ public:
 
   // Description:
   // Specify object from which to extract geometry information.
-  void SetGeometry(vtkDataSet *input);
-  vtkDataSet *GetGeometry();
+  void SetGeometryConnection(vtkAlgorithmOutput *input);
+  void SetGeometryData(vtkDataSet *);
 
   // Description:
   // Specify object from which to extract scalar information.
-  void SetScalars(vtkDataSet *);
-  vtkDataSet *GetScalars();
+  void SetScalarsConnection(vtkAlgorithmOutput *);
+  void SetScalarsData(vtkDataSet *);
 
   // Description:
-  // Set / get the object from which to extract vector information.
-  void SetVectors(vtkDataSet *);
-  vtkDataSet *GetVectors();
+  // Specify object from which to extract vector information.
+  void SetVectorsConnection(vtkAlgorithmOutput *);
+  void SetVectorsData(vtkDataSet *);
 
   // Description:
-  // Set / get the object from which to extract normal information.
-  void SetNormals(vtkDataSet *);
-  vtkDataSet *GetNormals();
+  // Specify object from which to extract normal information.
+  void SetNormals(vtkAlgorithmOutput *);
   
   // Description:
-  // Set / get the object from which to extract texture coordinates
+  // Specify object from which to extract texture coordinates
   // information.
-  void SetTCoords(vtkDataSet *);
-  vtkDataSet *GetTCoords();
+  void SetTCoords(vtkAlgorithmOutput *);
 
   // Description:
-  // Set / get the object from which to extract tensor data.
-  void SetTensors(vtkDataSet *);
-  vtkDataSet *GetTensors();
+  // Specify object from which to extract tensor data.
+  void SetTensors(vtkAlgorithmOutput *);
 
   // Description:
   // Set the object from which to extract a field and the name
@@ -123,6 +120,7 @@ protected:
 
   bool
   ExecuteGauss(vtkUnstructuredGrid* theInput,
+               vtkDataSet*          theScalarsDataSet,
                vtkPolyData*         theOutput);
   
 private:
index 8e7f30ef47bb6af0eb7c50aea8757797e88a5325..21cc6e0a148738792d2ea69c64757689252f2c2a 100644 (file)
@@ -48,6 +48,7 @@ class vtkUnstructuredGrid;
 class vtkPolyData;
 class vtkDataSet;
 class vtkCell;
+class vtkAlgorithmOutput;
 
 namespace VISU
 {
@@ -205,6 +206,11 @@ namespace VISU
     virtual
     vtkDataSet*
     GetOutput();
+
+    //! Get VTK representation of mesh for corresponding MED entity as algorithm output
+    virtual
+    vtkAlgorithmOutput*
+    GetOutputPort() = 0;
   };
   typedef MED::SharedPtr<TUnstructuredGridIDMapper> PUnstructuredGridIDMapper;
   
@@ -241,6 +247,11 @@ namespace VISU
     virtual
     vtkDataSet*
     GetOutput();
+
+    //! Get VTK representation of mesh for corresponding MED entity as algorithm output
+    virtual
+    vtkAlgorithmOutput*
+    GetOutputPort() = 0;
   };
   typedef MED::SharedPtr<TPolyDataIDMapper> PPolyDataIDMapper;
   
index 44fdf07573121d53dd3ab0b28cebc0f4ffa84304..0a5578f714163f8fa7656b462eb1e2072d0cf469 100644 (file)
@@ -58,105 +58,57 @@ VISU_MergeFilter::~VISU_MergeFilter()
 }
 
 //------------------------------------------------------------------------------
-void VISU_MergeFilter::SetGeometry(vtkDataSet *input)
+void VISU_MergeFilter::SetGeometryConnection(vtkAlgorithmOutput *input)
 {
-  this->Superclass::SetInputData(input);
+  this->Superclass::SetInputConnection(input);
 }
 
 //------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetGeometry()
+void VISU_MergeFilter::SetGeometryData(vtkDataSet *input)
 {
-  if (this->GetNumberOfInputConnections(0) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(0, 0));
+  this->Superclass::SetInputData(input);
 }
 
 //------------------------------------------------------------------------------
-void VISU_MergeFilter::SetScalars(vtkDataSet *input)
+void VISU_MergeFilter::SetScalarsData(vtkDataSet *input)
 {
   this->SetInputData(1, input);
 }
 
 //------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetScalars()
+void VISU_MergeFilter::SetScalarsConnection(vtkAlgorithmOutput *input)
 {
-  if (this->GetNumberOfInputConnections(1) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(1, 0));
+  this->SetInputConnection(1, input);
 }
 
 //------------------------------------------------------------------------------
-void VISU_MergeFilter::SetVectors(vtkDataSet *input)
+void VISU_MergeFilter::SetVectorsData(vtkDataSet *input)
 {
   this->SetInputData(2, input);
 }
 
 //------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetVectors()
-{
-  if (this->GetNumberOfInputConnections(2) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(2, 0));
-}
-
-//------------------------------------------------------------------------------
-void VISU_MergeFilter::SetNormals(vtkDataSet *input)
-{
-  this->SetInputData(3, input);
-}
-
-//------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetNormals()
+void VISU_MergeFilter::SetVectorsConnection(vtkAlgorithmOutput *input)
 {
-  if (this->GetNumberOfInputConnections(3) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(3, 0));
+  this->SetInputConnection(2, input);
 }
 
 //------------------------------------------------------------------------------
-void VISU_MergeFilter::SetTCoords(vtkDataSet *input)
+void VISU_MergeFilter::SetNormals(vtkAlgorithmOutput *input)
 {
-  this->SetInputData(4, input);
+  this->SetInputConnection(3, input);
 }
 
 //------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetTCoords()
+void VISU_MergeFilter::SetTCoords(vtkAlgorithmOutput *input)
 {
-  if (this->GetNumberOfInputConnections(4) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(4, 0));
+  this->SetInputConnection(4, input);
 }
 
 //------------------------------------------------------------------------------
-void VISU_MergeFilter::SetTensors(vtkDataSet *input)
+void VISU_MergeFilter::SetTensors(vtkAlgorithmOutput *input)
 {
-  this->SetInputData(5, input);
-}
-
-//------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetTensors()
-{
-  if (this->GetNumberOfInputConnections(5) < 1)
-    {
-    return NULL;
-    }
-  return vtkDataSet::SafeDownCast(
-    this->GetExecutive()->GetInputData(5, 0));
+  this->SetInputConnection(5, input);
 }
 
 //------------------------------------------------------------------------------
@@ -202,26 +154,48 @@ VISU_MergeFilter
               vtkInformationVector **theInputVector,
               vtkInformationVector *theOutputVector)
 {
-  if(vtkUnstructuredGrid *anInput = dynamic_cast<vtkUnstructuredGrid*>(this->GetInput())){
-    vtkUnstructuredGrid *anOutput = dynamic_cast<vtkUnstructuredGrid*>(this->GetOutput());
-    return VISU::Execute(anInput,
-                         anOutput,
-                         this->GetScalars(),
-                         this->GetVectors(),
-                         this->GetNormals(),
-                         this->GetTCoords(),
-                         this->GetTensors(),
+  vtkInformation *inInfo0 = theInputVector[0]->GetInformationObject(0);
+  vtkInformation *inInfo1 = theInputVector[1]->GetInformationObject(0);
+  vtkInformation *inInfo2 = theInputVector[2]->GetInformationObject(0);
+  vtkInformation *inInfo3 = theInputVector[3]->GetInformationObject(0);
+  vtkInformation *inInfo4 = theInputVector[4]->GetInformationObject(0);
+  vtkInformation *inInfo5 = theInputVector[5]->GetInformationObject(0);
+  vtkInformation *outInfo = theOutputVector->GetInformationObject(0);
+
+  // get the input and output
+  vtkDataSet *anInput = vtkDataSet::SafeDownCast(inInfo0->Get(vtkDataObject::DATA_OBJECT()));
+  vtkDataSet *aScalars = theInputVector[1]->GetNumberOfInformationObjects() > 0 ?
+    vtkDataSet::SafeDownCast(inInfo1->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+  vtkDataSet *aVectors = theInputVector[2]->GetNumberOfInformationObjects() > 0 ?
+    vtkDataSet::SafeDownCast(inInfo2->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+  vtkDataSet *aNormals = theInputVector[3]->GetNumberOfInformationObjects() > 0 ?
+    vtkDataSet::SafeDownCast(inInfo3->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+  vtkDataSet *aTCoords = theInputVector[4]->GetNumberOfInformationObjects() > 0 ?
+    vtkDataSet::SafeDownCast(inInfo4->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+  vtkDataSet *aTensors = theInputVector[5]->GetNumberOfInformationObjects() > 0 ?
+    vtkDataSet::SafeDownCast(inInfo5->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+  vtkDataSet *anOutput = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
+  if(vtkUnstructuredGrid *anInputUG = dynamic_cast<vtkUnstructuredGrid*>(anInput)){
+    vtkUnstructuredGrid *anOutputUG = dynamic_cast<vtkUnstructuredGrid*>(anOutput);
+    return VISU::Execute(anInputUG,
+                         anOutputUG,
+                         aScalars,
+                         aVectors,
+                         aNormals,
+                         aTCoords,
+                         aTensors,
                          this->FieldList,
                          IsMergingInputs());
-  }else if(vtkPolyData *anInput = dynamic_cast<vtkPolyData*>(this->GetInput())){
-    vtkPolyData *anOutput = dynamic_cast<vtkPolyData*>(this->GetOutput());
-    return VISU::Execute(anInput,
-                         anOutput,
-                         this->GetScalars(),
-                         this->GetVectors(),
-                         this->GetNormals(),
-                         this->GetTCoords(),
-                         this->GetTensors(),
+  }else if(vtkPolyData *anInputPD = dynamic_cast<vtkPolyData*>(anInput)){
+    vtkPolyData *anOutputPD =  dynamic_cast<vtkPolyData*>(anOutput);
+    return VISU::Execute(anInputPD,
+                         anOutputPD,
+                         aScalars,
+                         aVectors,
+                         aNormals,
+                         aTCoords,
+                         aTensors,
                          this->FieldList,
                          IsMergingInputs());
   }
index 3564fe01afa2cc7b126720aaf26b3e3b91280292..f65382ac833362a64e89fcb070c6ebe58b3a0476 100644 (file)
@@ -49,34 +49,31 @@ public:
 
   // Description:
   // Specify object from which to extract geometry information.
-  void SetGeometry(vtkDataSet *input);
-  vtkDataSet *GetGeometry();
+  void SetGeometryConnection(vtkAlgorithmOutput *input);
+  void SetGeometryData(vtkDataSet *);
 
   // Description:
   // Specify object from which to extract scalar information.
-  void SetScalars(vtkDataSet *);
-  vtkDataSet *GetScalars();
+  void SetScalarsConnection(vtkAlgorithmOutput *);
+  void SetScalarsData(vtkDataSet *);
 
   // Description:
-  // Set / get the object from which to extract vector information.
-  void SetVectors(vtkDataSet *);
-  vtkDataSet *GetVectors();
+  // Specify object from which to extract vector information.
+  void SetVectorsConnection(vtkAlgorithmOutput *);
+  void SetVectorsData(vtkDataSet *);
 
   // Description:
-  // Set / get the object from which to extract normal information.
-  void SetNormals(vtkDataSet *);
-  vtkDataSet *GetNormals();
+  // Specify object from which to extract normal information.
+  void SetNormals(vtkAlgorithmOutput *);
   
   // Description:
-  // Set / get the object from which to extract texture coordinates
+  // Specify object from which to extract texture coordinates
   // information.
-  void SetTCoords(vtkDataSet *);
-  vtkDataSet *GetTCoords();
+  void SetTCoords(vtkAlgorithmOutput *);
 
   // Description:
-  // Set / get the object from which to extract tensor data.
-  void SetTensors(vtkDataSet *);
-  vtkDataSet *GetTensors();
+  // Specify object from which to extract tensor data.
+  void SetTensors(vtkAlgorithmOutput *);
 
   // Description:
   // Set the object from which to extract a field and the name
index cd80e81e8940ed08566551705f5003512203ff4a..83d61637e6fdded3eb6b8b138115182a9d1edc5c 100644 (file)
@@ -230,6 +230,8 @@ namespace
                    VISU::TFieldList* theFieldList,
                    TDataSet *theOutput)
   {
+    if(!theGeometryPointMapper || !theDataPointMapper)
+      return;
     if(IsDifferent(theGeometryPointMapper, theDataPointMapper)){
       TObjectId2TupleIdMap aDataObjectId2PointIdMap;
       GetObjectId2TupleIdMap(theDataPointMapper, aDataObjectId2PointIdMap);
@@ -624,8 +626,8 @@ namespace
       if(vtkDataArray *aCellMapper = aCellData->GetArray("VISU_CELLS_MAPPER")){
         bool anIsDataOnCells = false;
         if(vtkDataSet* aDataSet = theScalarsDataSet)
-          if(vtkCellData* aCellData = aDataSet->GetCellData())
-            anIsDataOnCells = (aCellData->GetArray("VISU_FIELD") != NULL);
+          if(vtkCellData* aCellData1 = aDataSet->GetCellData())
+            anIsDataOnCells = (aCellData1->GetArray("VISU_FIELD") != NULL);
         if(anIsDataOnCells){
           vtkIntArray *aGeometryCellMapper = dynamic_cast<vtkIntArray*>(aCellMapper);
           vtkIntArray* aDataCellMapper = GetIDMapper(theFieldList,
index dea7c4aa423deaf4fc1ac3c186a395318e2740ec..96d596d1474158d444539e2742d9d1a09c0b653b 100644 (file)
@@ -303,7 +303,6 @@ namespace VISU
   ::GetMemorySize()
   {
     if(vtkDataSet* anOutput = GetPolyDataOutput()){
-      //anOutput->Update(); // OUV_PORTING
       return anOutput->GetActualMemorySize() * 1024;
     }
     if(myIsDone){
@@ -337,12 +336,18 @@ namespace VISU
     return GetSource().GetPointer();
   }
 
+  vtkAlgorithmOutput* 
+  TUnstructuredGridHolder
+  ::GetOutputPort()
+  {
+    return NULL;
+  }
+
   unsigned long int
   TUnstructuredGridHolder
   ::GetMemorySize()
   {
     if(vtkDataSet* anOutput = GetUnstructuredGridOutput()){
-      //anOutput->Update(); // OUV_PORTING
       return anOutput->GetActualMemorySize() * 1024;
     }
     if(myIsDone){
@@ -360,7 +365,6 @@ namespace VISU
   {
     if(myIsVTKDone){
       if(vtkDataSet* anOutput = GetOutput()){
-        //anOutput->Update(); // OUV_PORTING
         return anOutput->GetActualMemorySize() * 1024;
       }
     }
@@ -394,6 +398,13 @@ namespace VISU
     return GetFilter()->GetOutput();
   }
 
+  vtkAlgorithmOutput* 
+  TAppendFilterHolder
+  ::GetOutputPort()
+  {
+    return GetFilter()->GetOutputPort();
+  }
+
   //---------------------------------------------------------------
   TAppendPolyDataHolder
   ::TAppendPolyDataHolder()
@@ -419,6 +430,13 @@ namespace VISU
     return GetFilter()->GetOutput();
   }
 
+  vtkAlgorithmOutput* 
+  TAppendPolyDataHolder
+  ::GetOutputPort()
+  {
+    return GetFilter()->GetOutputPort();
+  }
+
 
   //---------------------------------------------------------------
   TMergeFilterHolder
@@ -444,6 +462,13 @@ namespace VISU
     return GetFilter()->GetOutput();
   }
 
+  vtkAlgorithmOutput* 
+  TMergeFilterHolder
+  ::GetOutputPort()
+  {
+    return GetFilter()->GetOutputPort();
+  }
+
 
   //---------------------------------------------------------------
   TMeshImpl
@@ -600,6 +625,14 @@ namespace VISU
     return anAppendFilter->GetOutput();
   }
 
+  vtkAlgorithmOutput* 
+  TProfileImpl
+  ::GetOutputPort()
+  {
+    const PAppendFilter& anAppendFilter = GetFilter();
+    return anAppendFilter->GetOutputPort();
+  }
+
   unsigned long int
   TProfileImpl
   ::GetMemorySize()
@@ -688,7 +721,7 @@ namespace VISU
   TUnstructuredGridIDMapperImpl
   ::SetReferencedMesh( const PNamedIDMapper& theNamedIDMapper )
   {
-    myCommonCellsFilter->SetCellsUG( theNamedIDMapper->GetUnstructuredGridOutput() );
+    myCommonCellsFilter->SetCellsUG( theNamedIDMapper->GetOutputPort() );
   }
 
   void
@@ -698,15 +731,18 @@ namespace VISU
     if ( !myFilter.GetPointer() ) {
       const PAppendFilter& anAppendFilter = myIDMapper->GetFilter();
 
-      vtkUnstructuredGrid* aGeometry = anAppendFilter->GetOutput();
+      vtkAlgorithmOutput* aGeometryConnection = anAppendFilter->GetOutputPort();
+      vtkUnstructuredGrid* aGeometryData = anAppendFilter->GetOutput();
+      anAppendFilter->Update();
+
       const PUnstructuredGrid& aSource = mySource.GetSource();
       vtkUnstructuredGrid* aDataSet = aSource.GetPointer();
-      aDataSet->ShallowCopy( aGeometry );
+      aDataSet->ShallowCopy( aGeometryData );
 
       const PMergeFilter& aFilter = GetFilter();
-      aFilter->SetGeometry( aGeometry );
-      aFilter->SetScalars( aDataSet );
-      aFilter->SetVectors( aDataSet );
+      aFilter->SetGeometryConnection( aGeometryConnection );
+      aFilter->SetScalarsData( aDataSet );
+      aFilter->SetVectorsData( aDataSet );
       aFilter->AddField( "VISU_FIELD", aDataSet );
       aFilter->AddField( "VISU_FIELD_GAUSS_MIN", aDataSet );
       aFilter->AddField( "VISU_FIELD_GAUSS_MAX", aDataSet );
@@ -716,7 +752,7 @@ namespace VISU
       aFilter->AddField( "ELNO_COMPONENT_MAPPER", aDataSet );
       aFilter->AddField( "VISU_POINTS_MAPPER", aDataSet );
 
-      myCommonCellsFilter->SetProfileUG( aFilter->GetUnstructuredGridOutput() );
+      myCommonCellsFilter->SetProfileUG( aFilter->GetOutputPort() );
     }
   }
 
@@ -725,7 +761,9 @@ namespace VISU
   ::GetUnstructuredGridOutput()
   {
     Build();
-    return myCommonCellsFilter->GetOutput();
+    vtkUnstructuredGrid* anOutput = myCommonCellsFilter->GetOutput();
+    myCommonCellsFilter->Update();
+    return anOutput;
   }
 
   vtkDataSet*
@@ -735,6 +773,13 @@ namespace VISU
     return GetUnstructuredGridOutput();
   }
 
+  vtkAlgorithmOutput*
+  TUnstructuredGridIDMapperImpl
+  ::GetOutputPort()
+  {
+    return myCommonCellsFilter->GetOutputPort();
+  }
+
   PUnstructuredGrid
   TUnstructuredGridIDMapperImpl
   ::GetSource()
@@ -806,16 +851,18 @@ namespace VISU
   {
     if ( !myFilter.GetPointer() ) {
       const PAppendPolyData& anAppendFilter = myIDMapper->GetFilter();
-      vtkPolyData* aGeometry = anAppendFilter->GetOutput();
+      vtkAlgorithmOutput* aGeometryConnection = anAppendFilter->GetOutputPort();
+      vtkPolyData* aGeometryData = anAppendFilter->GetOutput();
+      anAppendFilter->Update();
 
       const PPolyData& aSource = mySource.GetSource();
       vtkPolyData* aDataSet = aSource.GetPointer();
-      aDataSet->ShallowCopy( aGeometry );
+      aDataSet->ShallowCopy( aGeometryData );
 
       const PMergeFilter& aFilter = GetFilter();
-      aFilter->SetGeometry( aGeometry );
-      aFilter->SetScalars( aDataSet );
-      aFilter->SetVectors( aDataSet );
+      aFilter->SetGeometryConnection( aGeometryConnection );
+      aFilter->SetScalarsData( aDataSet );
+      aFilter->SetVectorsData( aDataSet );
       aFilter->AddField( "VISU_FIELD", aDataSet );
       aFilter->AddField( "VISU_FIELD_GAUSS_MIN", aDataSet );
       aFilter->AddField( "VISU_FIELD_GAUSS_MAX", aDataSet );
@@ -840,6 +887,13 @@ namespace VISU
     return GetPolyDataOutput();
   }
 
+  vtkAlgorithmOutput*
+  TPolyDataIDMapperImpl
+  ::GetOutputPort()
+  {
+    return myFilter->GetOutputPort();
+  }
+
   PPolyData
   TPolyDataIDMapperImpl
   ::GetSource()
@@ -1017,6 +1071,13 @@ namespace VISU
     return TAppendPolyDataHolder::GetPolyDataOutput();
   }
 
+  vtkAlgorithmOutput*
+  TGaussMeshImpl
+  ::GetOutputPort()
+  {
+    return TAppendPolyDataHolder::GetOutputPort();
+  }
+
   unsigned long int
   TGaussMeshImpl
   ::GetMemorySize()
@@ -1188,6 +1249,13 @@ namespace VISU
     return TAppendFilterHolder::GetUnstructuredGridOutput();
   }
 
+  vtkAlgorithmOutput* 
+  TMeshOnEntityImpl
+  ::GetOutputPort()
+  {
+    return TAppendFilterHolder::GetOutputPort();
+  }
+
   unsigned long int
   TMeshOnEntityImpl
   ::GetMemorySize()
@@ -1260,6 +1328,13 @@ namespace VISU
     return TUnstructuredGridHolder::GetUnstructuredGridOutput();
   }
 
+  vtkAlgorithmOutput* 
+  TFamilyImpl
+  ::GetOutputPort()
+  {
+    return TUnstructuredGridHolder::GetOutputPort();
+  }
+
   unsigned long int
   TFamilyImpl
   ::GetMemorySize()
@@ -1346,6 +1421,13 @@ namespace VISU
     return TAppendFilterHolder::GetUnstructuredGridOutput();
   }
 
+  vtkAlgorithmOutput* 
+  TGroupImpl
+  ::GetOutputPort()
+  {
+    return TAppendFilterHolder::GetOutputPort();
+  }
+
   unsigned long int
   TGroupImpl
   ::GetMemorySize()
index a4921835dcf07b5038bf97baae9d44db7440b9cf..2598cd959fd15e90184166edeb76a8f79ed2c21c 100644 (file)
@@ -90,6 +90,10 @@ namespace VISU
     vtkUnstructuredGrid* 
     GetUnstructuredGridOutput();
 
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
+
     //! Gets memory size used by the instance (bytes).
     virtual
     unsigned long int
@@ -132,6 +136,11 @@ namespace VISU
     virtual
     vtkUnstructuredGrid* 
     GetUnstructuredGridOutput();
+
+    //! Reimplement the TNamedIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
   };
 
   /*!
@@ -157,6 +166,11 @@ namespace VISU
     virtual
     vtkPolyData* 
     GetPolyDataOutput();
+
+    //! Reimplement the TGaussPtsIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
   };
 
 
@@ -180,6 +194,11 @@ namespace VISU
     virtual
     vtkDataSet*
     GetOutput();
+
+    //! Gets output port of the filter
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
   };
 
 
@@ -295,6 +314,11 @@ namespace VISU
     vtkUnstructuredGrid* 
     GetUnstructuredGridOutput();
 
+    //! Reimplement the TNamedIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
+
     //! Gets memory size used by the instance (bytes).
     virtual
     unsigned long int
@@ -369,6 +393,11 @@ namespace VISU
     vtkDataSet* 
     GetOutput();
 
+    //! Reimplement the TUnstructuredGridIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput*
+    GetOutputPort();
+
     //! Gets memory size used by the instance (bytes).
     virtual
     unsigned long int
@@ -433,6 +462,11 @@ namespace VISU
     vtkDataSet* 
     GetOutput();
 
+    //! Reimplement the TPolyDataIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput*
+    GetOutputPort();
+
     //! Gets memory size used by the instance (bytes).
     virtual
     unsigned long int
@@ -539,6 +573,11 @@ namespace VISU
     vtkPolyData* 
     GetPolyDataOutput();
 
+    //! Reimplement the TGaussPtsIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
+
     //! Gets memory size used by the instance (bytes).
     virtual
     unsigned long int
@@ -675,6 +714,11 @@ namespace VISU
     vtkUnstructuredGrid* 
     GetUnstructuredGridOutput();
 
+    //! Reimplement the TNamedIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
+
     //! Gets memory size used by the instance (bytes).
     virtual
     unsigned long int
@@ -724,6 +768,11 @@ namespace VISU
     vtkUnstructuredGrid* 
     GetUnstructuredGridOutput();
 
+    //! Reimplement the TUnstructuredGridIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
+
     //! Gets memory size used by the instance (bytes).
     virtual
     unsigned long int
@@ -781,6 +830,11 @@ namespace VISU
     vtkUnstructuredGrid* 
     GetUnstructuredGridOutput();
 
+    //! Reimplement the TUnstructuredGridIDMapper::GetOutputPort
+    virtual
+    vtkAlgorithmOutput* 
+    GetOutputPort();
+
     //! Gets memory size used by the instance (bytes).
     virtual
     unsigned long int
index 70c3727baf9afc35a99d1feca6a0b6e18afbaa7a..038435699ac584581eeb5d54e6c2a299088bec6e 100644 (file)
@@ -80,6 +80,10 @@ namespace VISU
     vtkPolyData*
     GetPolyDataOutput();
 
+    virtual
+    vtkAlgorithmOutput*
+    GetOutputPort() { return NULL; }
+
     virtual
     long unsigned int
     GetMemorySize();
index 3150a792fa60c0b9d94f96a3ff218ac20b06f23c..15b058336e2dbbef25da6cc8bbd3f69879ee3048 100644 (file)
@@ -29,8 +29,7 @@
 
 #include "VISUConvertor.hxx"
 
-//class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkDataSetToUnstructuredGridFilter
-class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkUnstructuredGridAlgorithm // OUV_PORTING: to check
+class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkUnstructuredGridAlgorithm
 {
 public:
   vtkTypeMacro(VISU_UsedPointsFilter,vtkUnstructuredGridAlgorithm);
index 958d9bb50feeacc4da3c48daaea4f4c309b7b99f..b76717d539c1f4d17abebb3cbcf8e9410925ae75 100644 (file)
@@ -139,7 +139,7 @@ VISU_Actor
   myShrinkFilter->SetStoreMapping(true);
 
   myAnnotationMapper->Delete();
-  myAnnotationActor->vtkActor2D::SetMapper(myAnnotationMapper.GetPointer()); // OUV_PORTING: to check
+  myAnnotationActor->vtkActor2D::SetMapper(myAnnotationMapper.GetPointer());
 
   myAnnotationActor->Delete();
   myAnnotationActor->SetVisibility(0);
@@ -438,8 +438,7 @@ VISU_Actor
   if ( !myIsFeatureEdgesAllowed || myIsFeatureEdgesEnabled == theIsFeatureEdgesEnabled )
     return;
 
-  //if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
-  if ( vtkAlgorithmOutput* aPolyData = myPassFilter[ 2 ]->GetOutputPort() ) // OUV_PORTING: to check
+  if ( vtkAlgorithmOutput* aPolyData = myPassFilter[ 2 ]->GetOutputPort() )
   {
     if( theIsFeatureEdgesEnabled )
     {
index 046c2586cb60962f393e0e32ab20a7e0683e1059..ed29199872526c6eb5e7c615ec31f2fd972f12d4 100644 (file)
@@ -450,7 +450,7 @@ VISU_GaussPtsAct
 
   //  myPolyDataExtractor->SetInput(myCurrentPL->GetPickableDataSet());
   //myMapper->SetInput(myPolyDataExtractor->GetOutput());
-  myMapper->SetInputData(myCurrentPL->GetPickableDataSet());
+  myMapper->SetInputConnection(myCurrentPL->GetPickableDataSet());
   SetMapper(myMapper.GetPointer());
 }
 
@@ -1281,8 +1281,7 @@ VISU_GaussPtsAct
       myCellDataToPointData->PassCellDataOn();
       aCellsToWarp->Delete();
              
-      //myWarpVector->SetInput(myCellDataToPointData->GetUnstructuredGridOutput());
-      myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
+      myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort());
       vtkUnstructuredGrid* aWarpedDataSet = myWarpVector->GetUnstructuredGridOutput();
       myWarpVector->Update();
       myCellSource->SetPoints(aWarpedDataSet->GetPoints());
index 2ca74452cf72374fef04fcd4907c1e30ac4007c8..14154222bc1daa0d6242d3cc707c0032bec92df5 100644 (file)
@@ -211,27 +211,25 @@ void
 VISU_GaussDeviceActorBase
 ::SetPointSpriteMapper(VISU_OpenGLPointSpriteMapper* theMapper) 
 {
-  vtkPolyData* aDataSet = theMapper->GetInput();
+  vtkAlgorithmOutput* aDataSet = theMapper->GetInputConnection( 0, 0 );
   myMapper = theMapper;
 
   int anId = 0;
   if (myPolyDataExtractor) {
-    myPolyDataExtractor->SetInputData(aDataSet);
+    myPolyDataExtractor->SetInputConnection(aDataSet);
     myPassFilter[ anId ]->SetInputConnection( myPolyDataExtractor->GetOutputPort() ); 
   } else {
-    myPassFilter[ anId ]->SetInputData( aDataSet ); 
+    myPassFilter[ anId ]->SetInputConnection( aDataSet ); 
   }
   myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
   anId++;
-  //myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
-  myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
+  myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
   
   anId++;
   myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
   
-  //myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
-  myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
+  myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
   
   Superclass::SetMapper( theMapper );
 }
index e5c23953c0e9bb5c31195e8990e4bbaf5771bb1a..0d5cf83e9703ee02faf40aef310808e56e1dedd3 100644 (file)
@@ -113,9 +113,9 @@ VISU_MeshAct
 {
   Superclass::SetMapperInput(theDataSet);
 
-  mySurfaceActor->SetInput(theDataSet);
-  myEdgeActor->SetInput(theDataSet);
-  myNodeActor->SetInput(theDataSet);
+  mySurfaceActor->SetInputData(theDataSet);
+  myEdgeActor->SetInputData(theDataSet);
+  myNodeActor->SetInputData(theDataSet);
 }
 
 
index 7ac2774f5a0a3903a245ef04394df8ed847554aa..b076e4d7885a6ab8308d64a1a87bacfd370db89c 100644 (file)
@@ -70,12 +70,21 @@ class VISU_PointsDeviceActor: public VISU_GaussDeviceActorBase
   //----------------------------------------------------------------------------
   virtual
   void
-  SetInput(vtkDataSet* theDataSet)
+  SetInputData(vtkDataSet* theDataSet)
   {
     myGeomFilter->SetInputData( theDataSet );
   }
 
 
+  //----------------------------------------------------------------------------
+  virtual
+  void
+  SetInputConnection(vtkAlgorithmOutput* theAlgorithmOutput)
+  {
+    myGeomFilter->SetInputConnection( theAlgorithmOutput );
+  }
+
+
   //----------------------------------------------------------------------------
   void
   SetInteractor(vtkRenderWindowInteractor* theInteractor)
@@ -312,15 +321,15 @@ VISU_ScalarMapAct
 //    myEdgeActor->SetInput( theDataSet );
 
   if (theDataSet->IsA("vtkPolyData")) {
-    myPointSpriteActor->SetInput( myPolyDataExtractor->GetOutput() );
-    myPointsActor->SetInput( myPolyDataExtractor->GetOutput() );
-    mySurfaceActor->SetInput( myPolyDataExtractor->GetOutput() );
-    myEdgeActor->SetInput( myPolyDataExtractor->GetOutput() );
+    myPointSpriteActor->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
+    myPointsActor->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
+    mySurfaceActor->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
+    myEdgeActor->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
   } else {
-    myPointSpriteActor->SetInput( myExtractor->GetOutput() );
-    myPointsActor->SetInput( myExtractor->GetOutput() );
-    mySurfaceActor->SetInput( myExtractor->GetOutput() );
-    myEdgeActor->SetInput( myExtractor->GetOutput() );
+    myPointSpriteActor->SetInputConnection( myExtractor->GetOutputPort() );
+    myPointsActor->SetInputConnection( myExtractor->GetOutputPort() );
+    mySurfaceActor->SetInputConnection( myExtractor->GetOutputPort() );
+    myEdgeActor->SetInputConnection( myExtractor->GetOutputPort() );
   }
 }
 
index 76e0f234e4c2ddd288ab2f5a30ad165a4f80ba55..2c41b83ecf800ecc867df2f48df8ffbf64fb5e70 100644 (file)
@@ -93,24 +93,14 @@ VISU_VectorsAct
 ::SetMapper(vtkMapper* theMapper)
 {
   if(theMapper){
-    myPassFilter[0]->SetInputData(theMapper->GetInput());
+    myPassFilter[0]->SetInputConnection(theMapper->GetInputConnection(0, 0));
     
-    //myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput());
-    myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort()); // OUV_PORTING: to check
-
-    //myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput());
-    myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort()); // OUV_PORTING: to check
-
-    //myPassFilter[3]->SetInput(myPassFilter[2]->GetPolyDataOutput());
-    myPassFilter[3]->SetInputConnection(myPassFilter[2]->GetOutputPort()); // OUV_PORTING: to check
-
-    // OUV_PORTING: to check
-    /*
-    if(vtkDataSetMapper* aMapper = dynamic_cast<vtkDataSetMapper*>(theMapper))
-      aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput());
-    else if(vtkPolyDataMapper* aMapper = dynamic_cast<vtkPolyDataMapper*>(theMapper))
-      aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput());
-    */
+    myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
+
+    myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
+
+    myPassFilter[3]->SetInputConnection(myPassFilter[2]->GetOutputPort());
+
     theMapper->SetInputConnection(myPassFilter[3]->GetOutputPort());
   }
 
index ae5327354677bbe8b71113f1cdc5014360aeb30d..b81693493c7869711ac35ea1b8ff8ebfb09c4d56 100644 (file)
@@ -383,13 +383,21 @@ VISU_ColoredPL
   return myPassFilter->GetUnstructuredGridOutput();
 }
 
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput* 
+VISU_ColoredPL
+::GetClippedInputPort()
+{
+  return myPassFilter->GetOutputPort();
+}
+
 
 //----------------------------------------------------------------------------
 void
 VISU_ColoredPL
 ::Build() 
 {
-  myExtractor->SetInputData( Superclass::GetClippedInput() );
+  myExtractor->SetInputConnection( Superclass::GetClippedInputPort() );
   myFieldTransform->SetInputConnection(myExtractor->GetOutputPort());
 
   myThreshold->SetInputConnection( myFieldTransform->GetOutputPort() );
index 16dbc84a598596a859206702c79563a50df20179..11bb1c27f57319273ba0c7d36db0888860ddc495 100644 (file)
@@ -176,6 +176,10 @@ protected:
   vtkPointSet* 
   GetClippedInput();
 
+  virtual
+  vtkAlgorithmOutput* 
+  GetClippedInputPort();
+
   //----------------------------------------------------------------------------
   static
   void
index e298113bd83740804e81133df37608119c08edd8..df80557f8a1c6b1a753994b89d50074a812a64e0 100644 (file)
@@ -98,11 +98,11 @@ VISU_CutLinesPL
   Modified();
 }
 
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_CutLinesPL
 ::InsertCustomPL()
 {
-  return myAppendPolyData->GetOutput();
+  return myAppendPolyData->GetOutputPort();
 }
 
 //----------------------------------------------------------------------------
index f82032dce54066a7049ae283600f7ba533963573..d25c6f04adbd8cdcffd1c6e3f32da79cf2b5dbf1 100644 (file)
@@ -65,7 +65,7 @@ public:
   void
   Init();
 
-  vtkDataSet*
+  vtkAlgorithmOutput*
   InsertCustomPL();
 
   virtual
index b485c5da89969d20428bfc65708d6769d4452c08..06ab525d24040255c5358799a88575e4c6b98404 100644 (file)
@@ -147,11 +147,11 @@ VISU_CutPlanesPL
 
 
 //----------------------------------------------------------------------------
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_CutPlanesPL
 ::InsertCustomPL()
 {
-  return GetWarpVectorOutput();
+  return GetWarpVectorOutputPort();
 }
 
 
index 238794d59dd7c3969399e53824cf1d43741152ed..52a44c0cafdb66c3399d9552fe1e98da57837aeb 100644 (file)
@@ -201,7 +201,7 @@ protected:
   ~VISU_CutPlanesPL();
 
   virtual 
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index 75cdff5af604cd7e482efba0f3b425ff5901e474..1619b4f7af0b8725e64eedb93a19a16e1e58bbd6 100644 (file)
@@ -120,11 +120,11 @@ VISU_CutSegmentPL
 }
 
 //----------------------------------------------------------------------------
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_CutSegmentPL
 ::InsertCustomPL()
 {
-  return myAppendPolyData->GetOutput();
+  return myAppendPolyData->GetOutputPort();
 }
 
 //----------------------------------------------------------------------------
index 273f2dad0c9b9755a7e2dd5a9cd51b49d579326e..0816ce92a76be73048dd639cee2d587d02cd43b2 100644 (file)
@@ -67,7 +67,7 @@ public:
   void
   Init();
 
-  vtkDataSet*
+  vtkAlgorithmOutput*
   InsertCustomPL();
 
   virtual
index 62daa712287fb06f167822cb752e4ffdda09b2ae..cc2a7613a977e0def542a5d111d2065d7d4013b5 100644 (file)
@@ -135,7 +135,7 @@ void
 VISU_DataSetMapperHolder
 ::SetUnstructuredGridIDMapper(const VISU::PUnstructuredGridIDMapper& theIDMapper)
 {
-  myElnoDisassembleFilter->SetInputData( theIDMapper->GetUnstructuredGridOutput() );
+  myElnoDisassembleFilter->SetInputConnection( theIDMapper->GetOutputPort() );
   myExtractGeometry->SetInputConnection( myElnoDisassembleFilter->GetOutputPort() );
   myUnstructuredGridIDMapper = theIDMapper;
   SetIDMapper( theIDMapper );
@@ -173,6 +173,14 @@ VISU_DataSetMapperHolder
   return myExtractGeometry->GetOutput();
 }
 
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput* 
+VISU_DataSetMapperHolder
+::GetClippedInputPort()
+{
+  return myExtractGeometry->GetOutputPort();
+}
+
 
 //----------------------------------------------------------------------------
 void
index f2faa6fc077c176c62b9bc5235ac607af2b779cd..ae2874684074863e6f759be071585f985f865853 100644 (file)
@@ -162,6 +162,10 @@ protected:
   vtkPointSet* 
   GetClippedInput();
 
+  virtual
+  vtkAlgorithmOutput* 
+  GetClippedInputPort();
+
 private:
   //----------------------------------------------------------------------------
   VISU::PUnstructuredGridIDMapper myUnstructuredGridIDMapper;
index abff88169594d68114ae48bb0996a7ad90f53e01..89417ad12472caed9eb5101959a6f6ae67f8843e 100755 (executable)
@@ -121,24 +121,34 @@ void VISU_DeformationPL::SetWarpVectorInput(vtkDataSet *theInput)
 //----------------------------------------------------------------------------
 vtkDataSet* VISU_DeformationPL::GetWarpVectorOutput()
 {
-  return myOutputPassFiler->GetOutput();
+  vtkDataSet* aDataSet = myOutputPassFiler->GetOutput();
+  myOutputPassFiler->Update();
+  return aDataSet;
+}
+
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput* VISU_DeformationPL::GetWarpVectorOutputPort()
+{
+  return myOutputPassFiler->GetOutputPort();
 }
 
 //----------------------------------------------------------------------------
 void VISU_DeformationPL::SetMergeFilterInput(vtkDataSet* ScalarInput,
                          vtkDataSet* VectorialInput)
 {
-  myVectorMergeFilter->SetScalars(ScalarInput);
+  myVectorMergeFilter->SetScalarsData(ScalarInput);
   myVectorMergeFilter->AddField("VISU_CELLS_MAPPER",ScalarInput);
   myVectorMergeFilter->AddField("VISU_POINTS_MAPPER",ScalarInput);
   
-  myVectorMergeFilter->SetGeometry(VectorialInput);
-  myVectorMergeFilter->SetVectors(VectorialInput);
+  myVectorMergeFilter->SetGeometryData(VectorialInput);
+  myVectorMergeFilter->SetVectorsData(VectorialInput);
 }
 
 //----------------------------------------------------------------------------
 vtkDataSet* VISU_DeformationPL::GetMergeFilterOutput(){
- return myVectorMergeFilter->GetOutput();
+  vtkDataSet* aDataSet = myVectorMergeFilter->GetOutput();
+  myVectorMergeFilter->Update();
+  return aDataSet;
 }
 
 //----------------------------------------------------------------------------
index 8f7bff2c26e7faa2ffd3350dfa8845ee2b61b89d..33fd83db710cca428db20764f93ccede0ac80b07 100755 (executable)
@@ -60,6 +60,7 @@ public:
 
   void SetWarpVectorInput(vtkDataSet *theInput);
   vtkDataSet* GetWarpVectorOutput();
+  vtkAlgorithmOutput* GetWarpVectorOutputPort();
 
   //-----------------------------------------------------------
   void SetMergeFilterInput(vtkDataSet* ScalarInput,
index de42e6a7e023cdbe17ce6f2b43f4d655f4152db3..b9033b26872fb548c8daef39c9be5e7bc342650d 100644 (file)
@@ -123,10 +123,8 @@ VISU_DeformedGridPL
 {
   Superclass::Build();
 
-  //myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
-  myWarpScalar->SetInputConnection( GetFieldTransformFilter()->GetOutputPort() ); // OUV_PORTING: to check
-  //GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
-  GetPolyDataMapper()->SetInputConnection( myWarpScalar->GetOutputPort() ); // OUV_PORTING: to check
+  myWarpScalar->SetInputConnection( GetFieldTransformFilter()->GetOutputPort() );
+  GetPolyDataMapper()->SetInputConnection( myWarpScalar->GetOutputPort() );
 }
 
 
@@ -135,8 +133,7 @@ void
 VISU_DeformedGridPL
 ::Update()
 {
-  //vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
-  vtkAlgorithmOutput* aPointSet = GetFieldTransformFilter()->GetOutputPort(); // OUV_PORTING: to check
+  vtkAlgorithmOutput* aPointSet = GetFieldTransformFilter()->GetOutputPort();
   if ( !myIsContour ) // surface prs
   {
     myWarpScalar->SetInputConnection( aPointSet );
index 460f7cc99affe8c384f1f289f091e6aae8d04837..cc4dec574a4a6781b92e63ac646254beb3fcc361 100644 (file)
@@ -129,7 +129,7 @@ VISU_DeformedShapeAndScalarMapPL
 
 
 //----------------------------------------------------------------------------
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_DeformedShapeAndScalarMapPL
 ::InsertCustomPL()
 {
@@ -138,7 +138,8 @@ VISU_DeformedShapeAndScalarMapPL
 
   VISU::CellDataToPoint(myWarpVector,
                         myCellDataToPointData,
-                        GetMergedInput());
+                        GetMergedInput(),
+                        GetMergedInputPort());
   
   myScalars = vtkUnstructuredGrid::SafeDownCast(GetMergedInput());
 
@@ -147,14 +148,17 @@ VISU_DeformedShapeAndScalarMapPL
   myScalarsFieldTransform->SetInputConnection(myScalarsExtractor->GetOutputPort());
 
   // Sets geometry for merge filter
-  myScalarsMergeFilter->SetGeometry(myWarpVector->GetUnstructuredGridOutput());
+  myScalarsMergeFilter->SetGeometryConnection(myWarpVector->GetOutputPort());
 
   vtkDataSet* aScalarsDataSet = myScalarsFieldTransform->GetOutput();
-  myScalarsMergeFilter->SetScalars(aScalarsDataSet);
+  myScalarsFieldTransform->Update();
+
+  vtkAlgorithmOutput* aScalarsConnection = myScalarsFieldTransform->GetOutputPort();
+  myScalarsMergeFilter->SetScalarsConnection(aScalarsConnection);
   myScalarsMergeFilter->AddField("VISU_CELLS_MAPPER", aScalarsDataSet);
   myScalarsMergeFilter->AddField("VISU_POINTS_MAPPER", aScalarsDataSet);
 
-  return myScalarsMergeFilter->GetOutput();
+  return myScalarsMergeFilter->GetOutputPort();
 }
 
 
@@ -218,7 +222,9 @@ VISU_DeformedShapeAndScalarMapPL
   myExtractGeometry->SetInputConnection(myScalarsElnoDisassembleFilter->GetOutputPort());
   myScalarsExtractor->SetInputConnection(myExtractGeometry->GetOutputPort());
 
-  if(VISU::IsDataOnCells(myScalarsElnoDisassembleFilter->GetOutput()))
+  vtkDataSet* aDataSet = myScalarsElnoDisassembleFilter->GetOutput();
+  myScalarsElnoDisassembleFilter->Update();
+  if(VISU::IsDataOnCells(aDataSet))
     GetMapper()->SetScalarModeToUseCellData();
   else
     GetMapper()->SetScalarModeToUsePointData();
index f9911df9f7f48f372301219baedd8e70906522a2..cf73c042b8fd6103ae428ae0aaf7bd74cd2f278c 100644 (file)
@@ -152,7 +152,7 @@ protected:
   ~VISU_DeformedShapeAndScalarMapPL();
   
   virtual
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index 118395c61c2730b65ae577f656fc6596792973a2..14f70de487bf911547d58dea7d677ec57ab114e0 100644 (file)
@@ -96,8 +96,6 @@ VISU_DeformedShapePL
   if(!theDataSet)
     return 0.0;
 
-  //theDataSet->Update(); // OUV_PORTING
-
   int aNbCells = theDataSet->GetNumberOfCells();
   int aNbPoints = theDataSet->GetNumberOfPoints();
   int aNbElem = aNbCells? aNbCells: aNbPoints;
@@ -183,15 +181,16 @@ VISU_DeformedShapePL
 
 
 //----------------------------------------------------------------------------
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_DeformedShapePL
 ::InsertCustomPL()
 {
   VISU::CellDataToPoint(myWarpVector,
                         myCellDataToPointData,
-                        GetMergedInput());
+                        GetMergedInput(),
+                        GetMergedInputPort());
 
-  return myWarpVector->GetOutput();
+  return myWarpVector->GetOutputPort();
 }
 
 
index 504ee3be99df17eed111b8c90bd3d6bced2e60b8..04462af0e264ea01c2ae3cf9c931ddf7cfcd6e71 100644 (file)
@@ -91,7 +91,7 @@ protected:
   ~VISU_DeformedShapePL();
 
   virtual
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index ef82008431b46324e4df138e8199113494455ca6..2175fc77b4295a4c462adbd683624b6fd9b3d119 100644 (file)
@@ -230,11 +230,11 @@ VISU_GaussPointsPL
 
 
 //----------------------------------------------------------------------------
-vtkPolyData
+vtkAlgorithmOutput
 VISU_GaussPointsPL
 ::GetPickableDataSet()
 {
-  return myPassFilter[1]->GetPolyDataOutput();
+  return myPassFilter[1]->GetOutputPort();
 }
 
 
@@ -269,11 +269,14 @@ VISU_GaussPointsPL
   SetSourceGeometry();
 
   vtkDataSet* aDataSet = GetFieldTransformFilter()->GetOutput();
+  GetFieldTransformFilter()->Update();
+
+  vtkAlgorithmOutput* anAlgorithmOutput = GetFieldTransformFilter()->GetOutputPort();
+
+  myMergeFilter->SetGeometryConnection(myAppendFilter->GetOutputPort());
   
-  myMergeFilter->SetGeometry(myAppendFilter->GetOutput());
-  
-  myMergeFilter->SetScalars(aDataSet);
-  myMergeFilter->SetVectors(aDataSet);
+  myMergeFilter->SetScalarsConnection(anAlgorithmOutput);
+  myMergeFilter->SetVectorsConnection(anAlgorithmOutput);
   
   myMergeFilter->RemoveFields();
   myMergeFilter->AddField("VISU_FIELD", aDataSet);
@@ -282,16 +285,15 @@ VISU_GaussPointsPL
   myMergeFilter->AddField("VISU_CELLS_MAPPER", aDataSet);
 
   myMergeFilter->SetGaussPtsIDMapper(GetGaussPtsIDMapper());
-  
-  myPassFilter[0]->SetInputData(InsertCustomPL());
+
+  myPassFilter[0]->SetInputConnection(InsertCustomPL());
 
   myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
 
   // Geometrical Sphere
   myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
   
-  //GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetPolyDataOutput() );
-  GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetOutputPort() ); // OUV_PORTING: to check
+  GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetOutputPort() );
 
   // Update according the current state
   SetIsDeformed(GetIsDeformed());
@@ -412,8 +414,7 @@ VISU_GaussPointsPL
 ::SetIsDeformed( bool theIsDeformed )
 {
   if(theIsDeformed){ 
-    //myWarpVector->SetInput( myPassFilter[0]->GetPolyDataOutput() );
-    myWarpVector->SetInputConnection( myPassFilter[0]->GetOutputPort() ); // OUV_PORTING: to check
+    myWarpVector->SetInputConnection( myPassFilter[0]->GetOutputPort() );
     myPassFilter[1]->SetInputConnection(myWarpVector->GetOutputPort());
   }else
     myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
@@ -792,7 +793,6 @@ VISU_GaussPointsPL
   }
   aMainReader->Delete();
   anAlphaReader->Delete();
-  //aCompositeImageData->Update(); // OUV_PORTING
 
   return aCompositeImageData;
 }
@@ -841,11 +841,11 @@ VISU_GaussPointsPL
   }
 }
 
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_GaussPointsPL
 ::InsertCustomPL()
 {
-  return GetMergedInput();
+  return GetMergedInputPort();
 }
 
 int
@@ -908,3 +908,10 @@ VISU_GaussPointsPL
     myMergeFilter->Update();
   return myMergeFilter->GetOutput();
 }
+
+vtkAlgorithmOutput*
+VISU_GaussPointsPL
+::GetMergedInputPort()
+{
+  return myMergeFilter->GetOutputPort();
+}
index 667178914d253d239a95a1773a3d1e644d900f5c..085c7933a9ea4926436f47d695c503d575e7afc5 100644 (file)
@@ -91,7 +91,7 @@ public:
   GetParentMesh();
 
   //! Get an intermediate dataset that can be picked  
-  vtkPolyData*
+  vtkAlgorithmOutput*
   GetPickableDataSet();
 
   //----------------------------------------------------------------------------
@@ -322,6 +322,10 @@ public:
   vtkPointSet* 
   GetMergedInput();
 
+  virtual 
+  vtkAlgorithmOutput* 
+  GetMergedInputPort();
+
 protected:
   //----------------------------------------------------------------------------
   VISU_GaussPointsPL();
@@ -338,7 +342,7 @@ protected:
   Build();
 
   virtual
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index 0364aacdc26329cf4af50f8fd0921febfd993975..1f52e0f173a0636d974a0f66c43575d5761fbbf8 100644 (file)
@@ -220,18 +220,19 @@ VISU_IsoSurfacesPL
 
   VISU::CellDataToPoint(myContourFilter,
                         myCellDataToPointData,
-                        GetMergedInput());
+                        GetMergedInput(),
+                        GetMergedInputPort());
 
 }
 
 
 //----------------------------------------------------------------------------
 
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_IsoSurfacesPL
 ::InsertCustomPL()
 {
-  return myContourFilter->GetOutput();
+  return myContourFilter->GetOutputPort();
 }
 
 
index c8936a53fefad94fe07472ce300f03b0b4f47670..97784a86b969bcceaf1379a28b2191713fde2543 100644 (file)
@@ -99,7 +99,7 @@ public:
   GetMemorySize();
 
   virtual
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index 32296da8b7881435b9ca5635133160ca6714664c..39530fb479979125c1ae0d78752a6466b5b9b7a1 100644 (file)
@@ -151,6 +151,10 @@ public:
   vtkPointSet* 
   GetClippedInput() = 0;
 
+  virtual
+  vtkAlgorithmOutput* 
+  GetClippedInputPort() = 0;
+
   //----------------------------------------------------------------------------
   virtual
   void
index 58a5421c2ffec35067f320fe2b1825141dae10d2..39dfd4e1d8f716c4cabf6b3d733b501b09c6e396 100644 (file)
@@ -28,6 +28,7 @@
 #include "VISUPipeline.hxx"
 #include "VISU_Structures.hxx"
 
+class vtkAlgorithmOutput;
 class vtkDataSet;
 class vtkPointSet;
 class VISU_PipeLine;
@@ -64,6 +65,10 @@ struct VISU_PIPELINE_EXPORT VISU_MergedPL
   vtkPointSet* 
   GetMergedInput() = 0;
 
+  virtual 
+  vtkAlgorithmOutput* 
+  GetMergedInputPort() = 0;
+
   virtual
   void
   DoShallowCopy(VISU_PipeLine *thePipeLine,
index 5678337710bee65fc318d4ca2abd0d0c3e156dd7..0f962addb0024d4c13993b01c4ecc00ecf1e67c9 100644 (file)
@@ -61,7 +61,7 @@ void
 VISU_MeshPL
 ::Build()
 {
-  GetDataSetMapper()->SetInputData(GetClippedInput());
+  GetDataSetMapper()->SetInputConnection(GetClippedInputPort());
 }
 
 
index 3fca5834616697bd33bf977ab5afd41c809281c5..aa8ce5a4599c75d93c2c925eaccc60556a90a213 100755 (executable)
@@ -519,7 +519,6 @@ void VISU_OpenGLPointSpriteMapper::RenderPiece(vtkRenderer *ren, vtkActor *act)
   else
   {
     this->InvokeEvent(vtkCommand::StartEvent,NULL);
-    //input->Update(); // OUV_PORTING: to check
     this->Update();
     this->InvokeEvent(vtkCommand::EndEvent,NULL);
 
index 84aa9aa94735b4de402c894ee0b1c26b43be16f4..f840bbe4145ea692f8e48409cca0e7f6fa871006 100644 (file)
@@ -389,6 +389,14 @@ VISU_PipeLine
   return GetMapperHolder()->GetClippedInput();
 }
 
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput* 
+VISU_PipeLine
+::GetClippedInputPort()
+{
+  return GetMapperHolder()->GetClippedInputPort();
+}
+
 
 //----------------------------------------------------------------------------
 void
index 36e5be73e49ddd04d68f032abda035d7a7a8570c..af1eac79cb7b4e85ab3679933f2babef56eb2966 100644 (file)
@@ -222,6 +222,9 @@ protected:
   vtkDataSet* 
   GetClippedInput();
 
+  vtkAlgorithmOutput* 
+  GetClippedInputPort();
+
   void 
   SetIsShrinkable(bool theIsShrinkable);
 
index aad4cb0918c1d1e07330a00451dfc21d224658dc..45df1b7217d6881c3e3059740be0f3911ae31b78 100644 (file)
@@ -77,16 +77,16 @@ namespace VISU
   void
   CellDataToPoint(TOutputFilter* theOutputFilter, 
                   VISU_CellDataToPointData *theCellDataToPointData,
-                  vtkDataSet* theDataSet)
+                  vtkDataSet* theDataSet,
+                  vtkAlgorithmOutput* theAlgorithmOutput)
 
   {
     if(VISU::IsDataOnCells(theDataSet)){
-      theCellDataToPointData->SetInputData(theDataSet);
+      theCellDataToPointData->SetInputConnection(theAlgorithmOutput);
       theCellDataToPointData->PassCellDataOn();
-      //theOutputFilter->SetInput(theCellDataToPointData->GetUnstructuredGridOutput());
-      theOutputFilter->SetInputConnection(theCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
+      theOutputFilter->SetInputConnection(theCellDataToPointData->GetOutputPort());
     }else
-      theOutputFilter->SetInputData(theDataSet);
+      theOutputFilter->SetInputConnection(theAlgorithmOutput);
   }
 
   //----------------------------------------------------------------------------
index d98b6291bd59ba4bae4b75b4156399325b4ac727..59d4f349434cebbc4ccca43f75b3ecc12368c7bf 100644 (file)
@@ -121,8 +121,6 @@ VISU_CutPlanesPL::PlaneOrientation
 VISU_Plot3DPL
 ::GetOrientation(vtkDataSet* theDataSet)
 {
-  //theDataSet->Update(); // OUV_PORTING
-
   double aBounds[6];
   theDataSet->GetBounds(aBounds);
   double aDelta[3] = {aBounds[1] - aBounds[0], aBounds[3] - aBounds[2], aBounds[5] - aBounds[4]};
@@ -155,7 +153,6 @@ VISU_Plot3DPL
 ::GetScaleFactor( VISU_ColoredPL* theColoredPL,
                   vtkDataSet* theDataSet )
 {
-  //theDataSet->Update(); // OUV_PORTING
   double aLength = theDataSet->GetLength(); // diagonal length
 
   double aScalarRange[2];
@@ -183,11 +180,11 @@ VISU_Plot3DPL
 
 
 //----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
 VISU_Plot3DPL
 ::InsertCustomPL()
 {
-  return myAppendPolyData->GetOutput();
+  return myAppendPolyData->GetOutputPort();
 }
 
 
@@ -233,7 +230,6 @@ VISU_Plot3DPL
     if(VISU::IsDataOnCells(aPolyData)) {
       myCellDataToPointData->SetInputData(aPolyData);
       myCellDataToPointData->PassCellDataOn();
-      //myWarpScalar->SetInputConnection(myCellDataToPointData->GetPolyDataOutput()); // OUV_PORTING: to check
       myWarpScalar->SetInputConnection(myCellDataToPointData->GetOutputPort());
     }else
       myWarpScalar->SetInputData(aPolyData);
@@ -255,7 +251,6 @@ VISU_Plot3DPL
   }
 
   VISU_CutPlanesPL::ClearAppendPolyData(myAppendPolyData.GetPointer());
-  //myAppendPolyData->AddInputConnection(myWarpScalar->GetPolyDataOutput()); // OUV_PORTING: to check
   myAppendPolyData->AddInputConnection(myWarpScalar->GetOutputPort());
 
   if ( aCutPlane )
index d1e3422adb1bff80609910f2f3006caf61e71eea..1e76d2aa2239e77591aa4729f9247d58139ab39b 100644 (file)
@@ -137,7 +137,7 @@ protected:
   ~VISU_Plot3DPL();
 
   virtual
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index 400c4252633306dec23ff39faece92197fcdb96f..2958285dfc6f954cd42a0e9614c39692d09ba44a 100644 (file)
@@ -118,7 +118,7 @@ void
 VISU_PolyDataMapperHolder
 ::SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper)
 {
-  myExtractPolyDataGeometry->SetInputData(theIDMapper->GetPolyDataOutput());
+  myExtractPolyDataGeometry->SetInputConnection(theIDMapper->GetOutputPort());
   myPolyDataIDMapper = theIDMapper;
   SetIDMapper(theIDMapper);
 }
@@ -155,6 +155,14 @@ VISU_PolyDataMapperHolder
   return myExtractPolyDataGeometry->GetOutput();
 }
 
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput* 
+VISU_PolyDataMapperHolder
+::GetClippedInputPort()
+{
+  return myExtractPolyDataGeometry->GetOutputPort();
+}
+
 
 //----------------------------------------------------------------------------
 void
index 05ccdfc0ef43338796490ebb410bb7f924247f6c..18bac7789b14e49818ad12eb06cf993facd4fc9a 100644 (file)
@@ -158,6 +158,10 @@ protected:
   vtkPointSet* 
   GetClippedInput();
 
+  virtual
+  vtkAlgorithmOutput* 
+  GetClippedInputPort();
+
 private:
   //----------------------------------------------------------------------------
   VISU::PPolyDataIDMapper myPolyDataIDMapper;
index bf5f22bd887319f58590b01a72542ad2df53d4fb..5c1f332fd36fb2cd945bc93fba99701f4ec8927c 100644 (file)
@@ -108,11 +108,12 @@ VISU_ScalarMapPL
 
   SetSourceGeometry();
 
-  myMergeFilter->SetGeometry(myAppendFilter->GetOutput());
+  myMergeFilter->SetGeometryConnection(myAppendFilter->GetOutputPort());
 
   vtkDataSet* aDataSet = GetClippedInput();
-  myMergeFilter->SetScalars(aDataSet);
-  myMergeFilter->SetVectors(aDataSet);
+  vtkAlgorithmOutput* anAlgorithmOutput = GetClippedInputPort();
+  myMergeFilter->SetScalarsConnection(anAlgorithmOutput);
+  myMergeFilter->SetVectorsConnection(anAlgorithmOutput);
 
   myMergeFilter->RemoveFields();
   myMergeFilter->AddField("VISU_FIELD", aDataSet);
@@ -123,7 +124,7 @@ VISU_ScalarMapPL
   myMergeFilter->AddField("VISU_POINTS_MAPPER", aDataSet);
   myMergeFilter->AddField("ELNO_POINT_COORDS", aDataSet);
 
-  myElnoAssembleFilter->SetInputData( InsertCustomPL() );
+  myElnoAssembleFilter->SetInputConnection( InsertCustomPL() );
 
   GetDataSetMapper()->SetInputConnection( myElnoAssembleFilter->GetOutputPort() );
 }
@@ -181,7 +182,7 @@ VISU_ScalarMapPL
 {
   if(IsExternalGeometryUsed()){
     ClearGeometry();
-    myAppendFilter->AddInputData(GetClippedInput());
+    myAppendFilter->AddInputConnection(GetClippedInputPort());
   }
 }
 
@@ -274,11 +275,11 @@ VISU_ScalarMapPL
 
 
 //----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
 VISU_ScalarMapPL
 ::InsertCustomPL()
 {
-  return GetMergedInput();
+  return GetMergedInputPort();
 }
 
 
@@ -293,4 +294,13 @@ VISU_ScalarMapPL
 }
 
 
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput*
+VISU_ScalarMapPL
+::GetMergedInputPort()
+{
+  return myMergeFilter->GetOutputPort();
+}
+
+
 //----------------------------------------------------------------------------
index 27b9ffdb27b77c4f56ec51d4f8c92c614713d387..47ec79d0259d2ffdb22d961083f7c13b4e5f3615 100644 (file)
@@ -100,6 +100,10 @@ public:
   vtkPointSet* 
   GetMergedInput();
 
+  virtual 
+  vtkAlgorithmOutput* 
+  GetMergedInputPort();
+
 protected:
   //----------------------------------------------------------------------------
   VISU_ScalarMapPL();
@@ -112,7 +116,7 @@ protected:
   OnCreateMapperHolder();
 
   virtual
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index 2171011e4283098f14395abd9e15141a902a123d..6f10122b5eac030e8087a8e056540453159dd3d7 100644 (file)
@@ -216,7 +216,6 @@ VISU_StreamLinesPL
             int theDirection)
 {
   vtkPointSet* aDataSet = theSource? theSource: GetMergedInput();
-  //aDataSet->Update(); // OUV_PORTING
 
   vtkIdType aNbOfPoints = aDataSet->GetNumberOfPoints();
   vtkDataSet* aPointSet = GetExtractorFilter()->GetOutput();
@@ -240,20 +239,20 @@ VISU_StreamLinesPL
                                            thePropogationTime,
                                            thePercents);
 
-  // OUV_PORTING: to do
-  /*
   if (anIsAccepted) {
     mySource = theSource;
     myPercents = thePercents;
     if(VISU::IsDataOnCells(GetMergedInput())){
-      myCenters->SetInput(aDataSet);
+      myCenters->SetInputData(aDataSet);
       myCenters->VertexCellsOn();
       aDataSet = myCenters->GetOutput();
+      myCenters->Update();
     }
-    myPointsFilter->SetInput(aDataSet);
+    myPointsFilter->SetInputData(aDataSet);
     myPointsFilter->SetPercentsOfUsedPoints(thePercents);
     aDataSet = myPointsFilter->GetOutput();
-    myStream->SetSource(aDataSet);
+    myPointsFilter->Update();
+    myStream->SetSourceData(aDataSet);
     myStream->SetIntegrationStepLength(theIntStep);
     myStream->SetMaximumPropagationTime(thePropogationTime);
     myStream->SetStepLength(theStepLength);
@@ -262,7 +261,6 @@ VISU_StreamLinesPL
     myStream->Modified();
     Modified();
   }
-  */
   return anIsAccepted;
 }
 
@@ -384,8 +382,6 @@ VISU_StreamLinesPL
   if(!theDataSet) 
     return -1.0;
 
-  //theDataSet->Update(); // OUV_PORTING
-
   int degree = 0;
   double aVolume = 1.0;
   double* aBounds = theDataSet->GetBounds();
@@ -430,8 +426,6 @@ VISU_StreamLinesPL
   if(!theDataSet) 
     return -1.0;
 
-  //theDataSet->Update(); // OUV_PORTING
-
   double aLength = theDataSet->GetLength();
   double* aBounds = theDataSet->GetBounds();
   double aMaxSizeY = (aBounds[3]-aBounds[2])/aLength;
@@ -460,8 +454,6 @@ VISU_StreamLinesPL
 ::GetBaseIntegrationStep(vtkDataSet* theDataSet, 
                          double thePercents)
 {
-  //theDataSet->Update(); // OUV_PORTING
-
   double aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
   double anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep;
   double aMinMax = theDataSet->GetLength() / theDataSet->GetNumberOfPoints();
@@ -483,8 +475,6 @@ VISU_StreamLinesPL
                          vtkDataSet* theDataSet, 
                          double thePercents)
 {
-  //theDataSet->Update(); // OUV_PORTING
-
   double aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents);
   if(aMinIntegrationStep > theStep)
     theStep = aMinIntegrationStep;
@@ -567,7 +557,6 @@ VISU_StreamLinesPL
   if(!theDataSet) 
     return -1.0;
 
-  //theDataSet->Update(); // OUV_PORTING
   double aPropagationTime = theDataSet->GetLength() / GetVelocityCoeff(theDataSet);
 
   return aPropagationTime;
@@ -696,7 +685,8 @@ VISU_StreamLinesPL
 
   VISU::CellDataToPoint(myStream,
                         myCellDataToPointData,
-                        GetMergedInput());
+                        GetMergedInput(),
+                        GetMergedInputPort());
 
   myGeomFilter->SetInputConnection(myStream->GetOutputPort());
   myGeomFilter->ExtentClippingOn();
@@ -704,11 +694,11 @@ VISU_StreamLinesPL
 
 
 //----------------------------------------------------------------------------
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_StreamLinesPL
 ::InsertCustomPL()
 {
-  return myGeomFilter->GetOutput();
+  return myGeomFilter->GetOutputPort();
 }
 
 
index 1b4c62e42cf5720c32ec537fbb2503592027f62f..d7f4d8b4ce8cc686fca5dbcfaa70131c387a4ff3 100644 (file)
@@ -127,7 +127,7 @@ public:
 
 public:
   virtual
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index 03c3016172361b8ae8269780e95de8d33ae8f18e..5dc2c6758c3de9ea656d3c28cd6b76fe1163f50b 100644 (file)
@@ -253,11 +253,11 @@ VISU_VectorsPL
 
 
 //----------------------------------------------------------------------------
-vtkDataSet* 
+vtkAlgorithmOutput* 
 VISU_VectorsPL
 ::InsertCustomPL()
 {
-  return myGlyph->GetOutput();
+  return myGlyph->GetOutputPort();
 }
 
 
index 1b69f50bdc1d982ec16212c24887669494dfa535..510ea42edc83980ce72fc6df1723ce633626e95a 100644 (file)
@@ -126,7 +126,7 @@ protected:
   ~VISU_VectorsPL();
 
   virtual
-  vtkDataSet* 
+  vtkAlgorithmOutput* 
   InsertCustomPL();
 
   virtual
index fbc001e79fcf804adef20f2e577e17061fcdeef1..46485603ebce4c0e3c78625c45e6135fd0bcdda7 100644 (file)
@@ -490,7 +490,6 @@ int VISU_XYPlotActor::RenderOpaqueGeometry(vtkViewport *viewport)
     for (mtime=0, this->InputList->InitTraversal(dsit); 
          (ds = this->InputList->GetNextDataSet(dsit)); )
       {
-      //ds->Update(); // OUV_PORTING
       dsMtime = ds->GetMTime();
       if ( dsMtime > mtime )
         {
@@ -505,7 +504,6 @@ int VISU_XYPlotActor::RenderOpaqueGeometry(vtkViewport *viewport)
     for (mtime=0, this->DataObjectInputList->InitTraversal(doit); 
          (dobj = this->DataObjectInputList->GetNextDataObject(doit)); )
       {
-      //dobj->Update(); // OUV_PORTING
       dsMtime = dobj->GetMTime();
       if ( dsMtime > mtime )
         {
@@ -2090,7 +2088,6 @@ void VISU_XYPlotActor::GenerateClipPlanes(int *pos, int *pos2)
 double VISU_XYPlotActor::ComputeGlyphScale(int i, int *pos, int *pos2)
 {
   vtkPolyData *pd=this->LegendActor->GetEntrySymbol(i);
-  //pd->Update(); // OUV_PORTING
   double length=pd->GetLength();
   double sf = this->GlyphSize * sqrt((double)(pos[0]-pos2[0])*(pos[0]-pos2[0]) + 
                                     (pos[1]-pos2[1])*(pos[1]-pos2[1])) / length;
index b5f1f6309d8439a838ce3cce0deec8ae681df837..938a204548ee07e35d7097d81595540e179c2bbf 100644 (file)
@@ -263,7 +263,8 @@ void VisuGUI_EvolutionDlg::setVisible( bool theIsVisible )
     VISU::PNamedIDMapper aMapper = aResult->GetInput()->GetMeshOnEntity( myEngine->getMeshName(), myEngine->getEntity() );
 
     vtkDataSetMapper* aPreviewMapper = vtkDataSetMapper::New();
-    aPreviewMapper->SetInputData( aMapper->GetOutput() );
+    aPreviewMapper->SetInputConnection( aMapper->GetOutputPort() );
+    aPreviewMapper->Update();
   
     vtkProperty* aProperty = vtkProperty::New();
     aProperty->SetColor( 1, 1, 1 );