]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Porting to VTK 6.
authorouv <ouv@opencascade.com>
Mon, 25 Feb 2013 15:39:29 +0000 (15:39 +0000)
committerouv <ouv@opencascade.com>
Mon, 25 Feb 2013 15:39:29 +0000 (15:39 +0000)
64 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_ExtractUnstructuredGrid.hxx
src/CONVERTOR/VISU_GaussMergeFilter.cxx
src/CONVERTOR/VISU_IDMapper.hxx
src/CONVERTOR/VISU_MergeFilter.cxx
src/CONVERTOR/VISU_MergeFilterUtilities.cxx
src/CONVERTOR/VISU_Structures_impl.cxx
src/CONVERTOR/VISU_TableReader.cxx
src/CONVERTOR/VISU_UsedPointsFilter.cxx
src/CONVERTOR/VISU_UsedPointsFilter.hxx
src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_ActorBase.cxx
src/OBJECT/VISU_DataSetActor.cxx
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsDeviceActor.cxx
src/OBJECT/VISU_IsoSurfActor.cxx
src/OBJECT/VISU_MeshAct.h
src/OBJECT/VISU_ScalarMapAct.cxx
src/OBJECT/VISU_ScalarMapAct.h
src/OBJECT/VISU_VectorsAct.cxx
src/PIPELINE/Makefile.am
src/PIPELINE/VISUPipeLine.cxx
src/PIPELINE/VISU_ColoredPL.cxx
src/PIPELINE/VISU_CutLinesPL.cxx
src/PIPELINE/VISU_CutPlanesPL.cxx
src/PIPELINE/VISU_CutSegmentPL.cxx
src/PIPELINE/VISU_DataSetMapperHolder.cxx
src/PIPELINE/VISU_DeformationPL.cxx
src/PIPELINE/VISU_DeformedGridPL.cxx
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx
src/PIPELINE/VISU_DeformedShapePL.cxx
src/PIPELINE/VISU_Extractor.cxx
src/PIPELINE/VISU_FieldTransform.cxx
src/PIPELINE/VISU_GaussPointsPL.cxx
src/PIPELINE/VISU_MaskPointsFilter.cxx
src/PIPELINE/VISU_MaskPointsFilter.hxx
src/PIPELINE/VISU_MeshPL.cxx
src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx
src/PIPELINE/VISU_OptionalDeformationPL.cxx
src/PIPELINE/VISU_PipeLineUtils.hxx
src/PIPELINE/VISU_PlanesWidget.cxx
src/PIPELINE/VISU_Plot3DPL.cxx
src/PIPELINE/VISU_PolyDataMapperHolder.cxx
src/PIPELINE/VISU_ScalarBarActor.cxx
src/PIPELINE/VISU_ScalarMapPL.cxx
src/PIPELINE/VISU_SphereWidget.cxx
src/PIPELINE/VISU_StreamLinesPL.cxx
src/PIPELINE/VISU_VectorsPL.cxx
src/PIPELINE/VISU_XYPlotActor.cxx
src/PIPELINE/VISU_img2vti.cxx
src/VISUGUI/VisuGUI_ClippingDlg.cxx
src/VISUGUI/VisuGUI_ClippingPanel.cxx
src/VISUGUI/VisuGUI_CutLinesDlg.cxx
src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
src/VISUGUI/VisuGUI_CutSegmentDlg.cxx
src/VISUGUI/VisuGUI_EvolutionDlg.cxx
src/VISUGUI/VisuGUI_Plot3DDlg.cxx
src/VISUGUI/VisuGUI_SelectionPanel.cxx
src/VISU_I/VISU_CutLinesBase_i.cc
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_StreamLines_i.cc

index d50f5bf0bd5afbe51c39a444738b2478f68b9cd8..be5237afcceea1a59963a594309b6e841ed5f9d7 100644 (file)
@@ -35,6 +35,8 @@
 #include <vtkIdList.h>
 #include <vtkFloatArray.h>
 #include <vtkCell.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
 
 // STL
 #include <algorithm>
@@ -218,43 +220,57 @@ void
 VISU_CommonCellsFilter
 ::SetProfileUG(vtkUnstructuredGrid *input)
 {
-  this->SetInput(input);
+  this->SetInputData(0, input);
 }
 
 vtkUnstructuredGrid*
 VISU_CommonCellsFilter
 ::GetProfileUG()
 {
-  return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput());
+  return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(0));
 }
 
 void
 VISU_CommonCellsFilter
 ::SetCellsUG(vtkUnstructuredGrid *input)
 {
-  this->vtkProcessObject::SetNthInput(1, input);
+  this->SetInputData(1, input);
 }
 
 vtkUnstructuredGrid*
 VISU_CommonCellsFilter
 ::GetCellsUG()
 {
-  if (this->NumberOfInputs < 2)
-  {
-    return NULL;
-  }
-  return dynamic_cast<vtkUnstructuredGrid*>(this->Inputs[1]);
+  return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(1));
 }
 
-void
+int
 VISU_CommonCellsFilter
-::Execute()
+::RequestData(
+  vtkInformation *vtkNotUsed(request),
+  vtkInformationVector **inputVector,
+  vtkInformationVector *outputVector)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"VISU_CommonCellsFilter::Execute");
-  vtkUnstructuredGrid* anInputProfileUG = this->GetProfileUG();
-  vtkUnstructuredGrid* anInputCellsUG   = this->GetCellsUG();
 
-  vtkUnstructuredGrid* anOutput         = this->GetOutput();
+  // 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);
+
+  // get the input and ouptut
+  vtkUnstructuredGrid *anInputProfileUG = vtkUnstructuredGrid::SafeDownCast(
+    inInfo1->Get(vtkDataObject::DATA_OBJECT()));
+  vtkUnstructuredGrid *anInputCellsUG = vtkUnstructuredGrid::SafeDownCast(
+    inInfo2->Get(vtkDataObject::DATA_OBJECT()));
+  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);
@@ -353,4 +369,5 @@ VISU_CommonCellsFilter
     else
       anOutput->ShallowCopy(anInputProfileUG);
   }
+  return 1;
 }
index aa473c5798d790d9488916e972c6f11d918149d6..1d3ec82d91b020196257ec52ebe3d464cf0e2e3a 100644 (file)
 #ifndef VISU_CommonCellsFilter_HeaderFile
 #define VISU_CommonCellsFilter_HeaderFile
 
-#include <vtkUnstructuredGridToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
 
-class VISU_CommonCellsFilter: public vtkUnstructuredGridToUnstructuredGridFilter
+class VISU_CommonCellsFilter: public vtkUnstructuredGridAlgorithm
 {
 public:
   static VISU_CommonCellsFilter *New();
-  vtkTypeMacro(VISU_CommonCellsFilter,vtkUnstructuredGridToUnstructuredGridFilter);
+  vtkTypeMacro(VISU_CommonCellsFilter,vtkUnstructuredGridAlgorithm);
 
   // Description:
   // Specify the Unstructured Grid which overview
@@ -48,7 +48,7 @@ protected:
   VISU_CommonCellsFilter();
   ~VISU_CommonCellsFilter();
 
-  void Execute(); //generate output data
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data
 
 private:
   VISU_CommonCellsFilter(const VISU_CommonCellsFilter&); // Lock copy
index 86a41d5a82c6f3c551216f5727d53ed818493a53..c9b7b0bb94815a15018e93d9d8762915590bb021 100644 (file)
@@ -219,7 +219,7 @@ namespace VISU
     vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
     //aWriter->SetFileType(VTK_BINARY);
     aWriter->SetFileName(theFileName.c_str());
-    aWriter->SetInput(theDataSet);
+    aWriter->SetInputData(theDataSet);
     aWriter->Write();
     aWriter->Delete();
   }
@@ -233,7 +233,7 @@ namespace VISU
     vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New();
     //aWriter->SetFileType(VTK_BINARY);
     aWriter->SetFileName(theFileName.c_str());
-    aWriter->SetInput(theDataSet);
+    aWriter->SetInputData(theDataSet);
     aWriter->Write();
     aWriter->Delete();
   }
@@ -243,7 +243,7 @@ namespace VISU
   bool 
   IsDataOnPoints(vtkDataSet* theDataSet)
   {
-    theDataSet->Update();
+    //theDataSet->Update(); // OUV_PORTING (see the same below)
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
     return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
   }
@@ -253,7 +253,7 @@ namespace VISU
   bool 
   IsDataOnCells(vtkDataSet* theDataSet)
   {
-    theDataSet->Update();
+    //theDataSet->Update();
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
     return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
   }
@@ -262,7 +262,7 @@ namespace VISU
   bool 
   IsElnoData(vtkDataSet* theDataSet)
   {
-    theDataSet->Update();
+    //theDataSet->Update();
 
     if ( vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData() )
       if ( aDataSetAttributes->GetArray( "ELNO_FIELD" )  != NULL )
@@ -311,7 +311,7 @@ namespace VISU
   vtkIdType
   GetElemVTKID(vtkDataSet *theDataSet, vtkIdType theID, int theEntity)
   {
-    theDataSet->Update();
+    //theDataSet->Update();
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
     if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER")){
       if(theEntity < 0){
@@ -346,7 +346,7 @@ namespace VISU
   vtkIdType
   GetElemObjID(vtkDataSet *theDataSet, vtkIdType theID)
   {
-    theDataSet->Update();
+    //theDataSet->Update();
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
     if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER"))
       return GetObjectID(aDataArray, theID);
@@ -368,7 +368,7 @@ namespace VISU
   vtkIdType
   GetNodeVTKID(vtkDataSet *theDataSet, vtkIdType theID)
   {
-    theDataSet->Update();
+    //theDataSet->Update();
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
     if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER"))
       return GetVTKID(aDataArray, theID, VISU::NODE_ENTITY);
@@ -381,7 +381,7 @@ namespace VISU
   vtkIdType
   GetNodeObjID(vtkDataSet *theDataSet, vtkIdType theID)
   {
-    theDataSet->Update();
+    //theDataSet->Update();
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
     if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER"))
       return GetObjectID(aDataArray, theID);
@@ -404,7 +404,7 @@ namespace VISU
   TGaussPointID
   GetObjID(vtkDataSet *theDataSet, vtkIdType theID)
   {
-    theDataSet->Update();
+    //theDataSet->Update();
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
     if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER")){
       if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
@@ -422,7 +422,7 @@ namespace VISU
   TInputCellID
   GetInputCellID(vtkDataSet *theDataSet, vtkIdType theObjID)
   {
-    theDataSet->Update();
+    //theDataSet->Update();
     vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
     if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_INPUTS_MAPPER")){
       if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
index a5b7250ae8f47a3dc5b67b6fa0d09a267f236b12..8104dc3be57eb36d6ad2fe6d2e6a03df2f50f47f 100644 (file)
@@ -390,7 +390,7 @@ namespace
 
     if(theProfile->myIsAll){
       vtkUnstructuredGrid* aDataSet = theMeshOnEntity->GetUnstructuredGridOutput();
-      anAppendFilter->AddInput(aDataSet);
+      anAppendFilter->AddInputData(aDataSet);
     }else{
       const VISU::TGeom2SubProfile& aGeom2SubProfile = theProfile->myGeom2SubProfile;
 
@@ -412,7 +412,7 @@ namespace
                             checkEntity);
         
         const VISU::PUnstructuredGrid& aSource = aSubProfile->GetSource();
-        anAppendFilter->AddInput(aSource.GetPointer());
+        anAppendFilter->AddInputData(aSource.GetPointer());
 
         vtkIdType aNbCells = aSource->GetNumberOfCells();
         for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){
@@ -549,11 +549,11 @@ namespace
       const VISU::PPolyData& aSource = aGaussSubMesh->GetSource();
       aStartID += aSource->GetNumberOfCells();
 
-      anAppendFilter->AddInput(aSource.GetPointer());
+      anAppendFilter->AddInputData(aSource.GetPointer());
     }
     anAppendFilter->Update(); // Fix on VTK
 
-    theMeshOnEntity->GetOutput()->Update();
+    //theMeshOnEntity->GetOutput()->Update(); // OUV_PORTING
 
     vtkDataSet* aSource = anAppendFilter->GetOutput();
     INITMSGA(MYDEBUG,0,"aNbPoints - "<<aSource->GetNumberOfPoints()<<endl);
@@ -567,7 +567,7 @@ namespace
   void
   PrintMemorySize(vtkUnstructuredGrid* theDataSet)
   {
-    theDataSet->Update();
+    //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);
@@ -687,7 +687,7 @@ VISU_Convertor_impl
 
         const VISU::PUnstructuredGrid& aSource = aSubMesh->GetSource();
         GetCellsOnSubMesh(aSource, aMeshOnEntity, aSubMesh, aVGeom);
-        anAppendFilter->AddInput(aSource.GetPointer());
+        anAppendFilter->AddInputData(aSource.GetPointer());
         
         vtkIdType aNbCells = aSource->GetNumberOfCells();
         for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){
@@ -827,7 +827,7 @@ VISU_Convertor_impl
 
         VISU::PIDMapper anIDMapper = GetFamilyOnEntity(theMeshName,anEntity,aFamilyName);
         vtkDataSet* anOutput = anIDMapper->GetOutput();
-        anAppendFilter->AddInput(anOutput);
+        anAppendFilter->AddInputData(anOutput);
 
         vtkIdType aStartID = anElemObj2VTKID.size();
         vtkIdType aNbCells = anOutput->GetNumberOfCells();
@@ -982,7 +982,7 @@ VISU_Convertor_impl
       }
       if(MYVTKDEBUG){
         GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
-        anOutput->Update();
+        //anOutput->Update(); // OUV_PORTING
         if(theEntity == VISU::NODE_ENTITY)
           BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
         else
@@ -1071,7 +1071,7 @@ VISU_Convertor_impl
       }
       if(MYVTKDEBUG){
         GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
-        anOutput->Update();
+        //anOutput->Update(); // OUV_PORTING
         if(theEntity == VISU::NODE_ENTITY)
           BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
         else
index 9075a9e10c07cfd08d421b3c6553c3d688278f89..c893468d6c464203d134be1cefb642c1eac4fa00 100644 (file)
 #ifndef VISU_ExtractUnstructuredGrid_HeaderFile
 #define VISU_ExtractUnstructuredGrid_HeaderFile
 
-#include <vtkUnstructuredGridToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
 
 #include <set>
 
-class VISU_ExtractUnstructuredGrid : public vtkUnstructuredGridToUnstructuredGridFilter{
+class VISU_ExtractUnstructuredGrid : public vtkUnstructuredGridAlgorithm{
 public:
-  vtkTypeMacro(VISU_ExtractUnstructuredGrid,vtkUnstructuredGridToUnstructuredGridFilter);
+  vtkTypeMacro(VISU_ExtractUnstructuredGrid,vtkUnstructuredGridAlgorithm);
 
   // Description:
   // Construct with all types of clipping turned off.
index 735bc710257ba1de751bcbee8a5a231b1e692880..810cae8760b3d043201b86c29b35aae6bf735d2b 100644 (file)
@@ -62,7 +62,7 @@ VISU_GaussMergeFilter::~VISU_GaussMergeFilter()
 //------------------------------------------------------------------------------
 void VISU_GaussMergeFilter::SetGeometry(vtkDataSet *input)
 {
-  this->Superclass::SetInput(input);
+  this->Superclass::SetInputData(input);
 }
 
 //------------------------------------------------------------------------------
@@ -79,7 +79,7 @@ vtkDataSet *VISU_GaussMergeFilter::GetGeometry()
 //------------------------------------------------------------------------------
 void VISU_GaussMergeFilter::SetScalars(vtkDataSet *input)
 {
-  this->SetInput(1, input);
+  this->SetInputData(1, input);
 }
 
 //------------------------------------------------------------------------------
@@ -96,7 +96,7 @@ vtkDataSet *VISU_GaussMergeFilter::GetScalars()
 //------------------------------------------------------------------------------
 void VISU_GaussMergeFilter::SetVectors(vtkDataSet *input)
 {
-  this->SetInput(2, input);
+  this->SetInputData(2, input);
 }
 
 //------------------------------------------------------------------------------
@@ -113,7 +113,7 @@ vtkDataSet *VISU_GaussMergeFilter::GetVectors()
 //------------------------------------------------------------------------------
 void VISU_GaussMergeFilter::SetNormals(vtkDataSet *input)
 {
-  this->SetInput(3, input);
+  this->SetInputData(3, input);
 }
 
 //------------------------------------------------------------------------------
@@ -130,7 +130,7 @@ vtkDataSet *VISU_GaussMergeFilter::GetNormals()
 //------------------------------------------------------------------------------
 void VISU_GaussMergeFilter::SetTCoords(vtkDataSet *input)
 {
-  this->SetInput(4, input);
+  this->SetInputData(4, input);
 }
 
 //------------------------------------------------------------------------------
@@ -147,7 +147,7 @@ vtkDataSet *VISU_GaussMergeFilter::GetTCoords()
 //------------------------------------------------------------------------------
 void VISU_GaussMergeFilter::SetTensors(vtkDataSet *input)
 {
-  this->SetInput(5, input);
+  this->SetInputData(5, input);
 }
 
 //------------------------------------------------------------------------------
index 6f839f13794fe3a5f5753ea1834a91e22e2d1ee4..8e7f30ef47bb6af0eb7c50aea8757797e88a5325 100644 (file)
@@ -39,6 +39,8 @@
 #include "MED_Vector.hxx"
 #include "VTKViewer.h"
 
+#include <vtkType.h>
+
 #include <string>
 #include <map>
 
index 539d50a61fd10472341a49ec9c01a5893d7ab8ac..44fdf07573121d53dd3ab0b28cebc0f4ffa84304 100644 (file)
@@ -60,7 +60,7 @@ VISU_MergeFilter::~VISU_MergeFilter()
 //------------------------------------------------------------------------------
 void VISU_MergeFilter::SetGeometry(vtkDataSet *input)
 {
-  this->Superclass::SetInput(input);
+  this->Superclass::SetInputData(input);
 }
 
 //------------------------------------------------------------------------------
@@ -77,7 +77,7 @@ vtkDataSet *VISU_MergeFilter::GetGeometry()
 //------------------------------------------------------------------------------
 void VISU_MergeFilter::SetScalars(vtkDataSet *input)
 {
-  this->SetInput(1, input);
+  this->SetInputData(1, input);
 }
 
 //------------------------------------------------------------------------------
@@ -94,7 +94,7 @@ vtkDataSet *VISU_MergeFilter::GetScalars()
 //------------------------------------------------------------------------------
 void VISU_MergeFilter::SetVectors(vtkDataSet *input)
 {
-  this->SetInput(2, input);
+  this->SetInputData(2, input);
 }
 
 //------------------------------------------------------------------------------
@@ -111,7 +111,7 @@ vtkDataSet *VISU_MergeFilter::GetVectors()
 //------------------------------------------------------------------------------
 void VISU_MergeFilter::SetNormals(vtkDataSet *input)
 {
-  this->SetInput(3, input);
+  this->SetInputData(3, input);
 }
 
 //------------------------------------------------------------------------------
@@ -128,7 +128,7 @@ vtkDataSet *VISU_MergeFilter::GetNormals()
 //------------------------------------------------------------------------------
 void VISU_MergeFilter::SetTCoords(vtkDataSet *input)
 {
-  this->SetInput(4, input);
+  this->SetInputData(4, input);
 }
 
 //------------------------------------------------------------------------------
@@ -145,7 +145,7 @@ vtkDataSet *VISU_MergeFilter::GetTCoords()
 //------------------------------------------------------------------------------
 void VISU_MergeFilter::SetTensors(vtkDataSet *input)
 {
-  this->SetInput(5, input);
+  this->SetInputData(5, input);
 }
 
 //------------------------------------------------------------------------------
index 15c036c720db9f2ff983f7b08d18a39438d67e56..cd80e81e8940ed08566551705f5003512203ff4a 100644 (file)
@@ -37,6 +37,7 @@
 
 #include <vtkIdList.h>
 #include <vtkCell.h>
+#include <vtkVersion.h>
 
 #include <algorithm>
 #include <vector>
index 2d36ef986d1dffe050558582bcef094f4b1e346b..dea7c4aa423deaf4fc1ac3c186a395318e2740ec 100644 (file)
@@ -303,7 +303,7 @@ namespace VISU
   ::GetMemorySize()
   {
     if(vtkDataSet* anOutput = GetPolyDataOutput()){
-      anOutput->Update();
+      //anOutput->Update(); // OUV_PORTING
       return anOutput->GetActualMemorySize() * 1024;
     }
     if(myIsDone){
@@ -342,7 +342,7 @@ namespace VISU
   ::GetMemorySize()
   {
     if(vtkDataSet* anOutput = GetUnstructuredGridOutput()){
-      anOutput->Update();
+      //anOutput->Update(); // OUV_PORTING
       return anOutput->GetActualMemorySize() * 1024;
     }
     if(myIsDone){
@@ -360,7 +360,7 @@ namespace VISU
   {
     if(myIsVTKDone){
       if(vtkDataSet* anOutput = GetOutput()){
-        anOutput->Update();
+        //anOutput->Update(); // OUV_PORTING
         return anOutput->GetActualMemorySize() * 1024;
       }
     }
index bca89e5a2f7c9cfc4ffb05b936d1fa8cb5b357e7..050a20d7fc8e50a3b554cecc84d21b2ee3cb99eb 100644 (file)
@@ -573,7 +573,7 @@ VISU::TTableIDMapper
   aScalars->Delete();
 
   vtkStructuredGridGeometryFilter* aFilter = vtkStructuredGridGeometryFilter::New();
-  aFilter->SetInput( aStructuredGrid );
+  aFilter->SetInputData( aStructuredGrid );
   aFilter->Update();
   myOutput->ShallowCopy( aFilter->GetOutput() );
   aFilter->Delete();
index bf48857c3725966863b3b7b7aa0184e19c546757..9d6b30ba6e34e208d1ee3812767b973b8bd0fc4f 100644 (file)
@@ -30,6 +30,8 @@
 #include <vtkCellData.h>
 #include <vtkCell.h>
 #include <vtkIdList.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
 
 #include <map>
 
@@ -44,9 +46,21 @@ VISU_UsedPointsFilter::~VISU_UsedPointsFilter()
 {
 }
 
-void VISU_UsedPointsFilter::Execute(){
-  vtkDataSet *anInput = this->GetInput();
-  vtkUnstructuredGrid *anOutput = this->GetOutput();
+
+int VISU_UsedPointsFilter::RequestData(
+  vtkInformation *vtkNotUsed(request),
+  vtkInformationVector **inputVector,
+  vtkInformationVector *outputVector)
+{
+  // get the info objects
+  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+  // get the input and ouptut
+  vtkDataSet *anInput = vtkDataSet::SafeDownCast(
+    inInfo->Get(vtkDataObject::DATA_OBJECT()));
+  vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
 
   typedef std::map<vtkIdType, vtkIdType> TId2IdMap;
   TId2IdMap aId2IdMap;
@@ -101,5 +115,6 @@ void VISU_UsedPointsFilter::Execute(){
   anOldPointsIds->Delete();
   aNewPointsIds->Delete();
   anOutput->Squeeze();
+  return 1;
 }
 
index de4db72a8ae1e09d53f364dac3c6a5c2d3e8250b..3150a792fa60c0b9d94f96a3ff218ac20b06f23c 100644 (file)
 #ifndef VISU_UsedPointsFilter_HeaderFile
 #define VISU_UsedPointsFilter_HeaderFile
 
-#include <vtkDataSetToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
 
 #include "VISUConvertor.hxx"
 
-class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkDataSetToUnstructuredGridFilter
+//class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkDataSetToUnstructuredGridFilter
+class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkUnstructuredGridAlgorithm // OUV_PORTING: to check
 {
 public:
-  vtkTypeMacro(VISU_UsedPointsFilter,vtkDataSetToUnstructuredGridFilter);
+  vtkTypeMacro(VISU_UsedPointsFilter,vtkUnstructuredGridAlgorithm);
   static VISU_UsedPointsFilter *New();
 
 protected:
   VISU_UsedPointsFilter();
   ~VISU_UsedPointsFilter();
   
-  virtual void Execute();
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
 };
 
 #endif
index 884560cb756a01d2138de340cc34d7dec9a0d2ce..958d9bb50feeacc4da3c48daaea4f4c309b7b99f 100644 (file)
@@ -139,7 +139,7 @@ VISU_Actor
   myShrinkFilter->SetStoreMapping(true);
 
   myAnnotationMapper->Delete();
-  myAnnotationActor->SetMapper(myAnnotationMapper.GetPointer());
+  myAnnotationActor->vtkActor2D::SetMapper(myAnnotationMapper.GetPointer()); // OUV_PORTING: to check
 
   myAnnotationActor->Delete();
   myAnnotationActor->SetVisibility(0);
@@ -164,17 +164,17 @@ VISU_Actor
   myValLblDataSet = vtkUnstructuredGrid::New();
 
   myValCellCenters = VTKViewer_CellCenters::New();
-  myValCellCenters->SetInput(myValLblDataSet);
+  myValCellCenters->SetInputData(myValLblDataSet);
 
   myValUsedPoints = VISU_UsedPointsFilter::New();
-  myValUsedPoints->SetInput(myValLblDataSet);
+  myValUsedPoints->SetInputData(myValLblDataSet);
 
   myValMaskPoints = vtkMaskPoints::New();
-  myValMaskPoints->SetInput(myValCellCenters->GetOutput());
+  myValMaskPoints->SetInputConnection(myValCellCenters->GetOutputPort());
   myValMaskPoints->SetOnRatio(1);
 
   myValSelectVisiblePoints = VISU_SelectVisiblePoints::New();
-  myValSelectVisiblePoints->SetInput(myValMaskPoints->GetOutput());
+  myValSelectVisiblePoints->SetInputConnection(myValMaskPoints->GetOutputPort());
   myValSelectVisiblePoints->SelectInvisibleOff();
   myValSelectVisiblePoints->SetTolerance(0.1);
 
@@ -188,7 +188,7 @@ VISU_Actor
   }
 
   myValLabeledDataMapper = vtkLabeledDataMapper::New();
-  myValLabeledDataMapper->SetInput(myValSelectVisiblePoints->GetOutput());
+  myValLabeledDataMapper->SetInputConnection(myValSelectVisiblePoints->GetOutputPort());
   //myValLabeledDataMapper->SetLabelFormat("%g");
   //myValLabeledDataMapper->SetLabelFormat("%.20g");
   myValLabeledDataMapper->SetLabelFormat(aFormat);
@@ -351,9 +351,9 @@ VISU_Actor
 {
   if(!myIsShrinkable)
     return;
-  if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
-    myShrinkFilter->SetInput(aDataSet);
-    myPassFilter[1]->SetInput(myShrinkFilter->GetOutput());
+  if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+    myShrinkFilter->SetInputConnection(aDataSet);
+    myPassFilter[1]->SetInputConnection(myShrinkFilter->GetOutputPort());
     myIsShrunk = true;
   }
 }
@@ -364,8 +364,8 @@ VISU_Actor
 {
   if(!myIsShrunk)
     return;
-  if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
-    myPassFilter[1]->SetInput(aDataSet);
+  if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+    myPassFilter[1]->SetInputConnection(aDataSet);
     myPassFilter[1]->Modified();
     myIsShrunk = false;
     Modified();
@@ -438,17 +438,18 @@ VISU_Actor
   if ( !myIsFeatureEdgesAllowed || myIsFeatureEdgesEnabled == theIsFeatureEdgesEnabled )
     return;
 
-  if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
+  //if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
+  if ( vtkAlgorithmOutput* aPolyData = myPassFilter[ 2 ]->GetOutputPort() ) // OUV_PORTING: to check
   {
     if( theIsFeatureEdgesEnabled )
     {
-      myFeatureEdges->SetInput( aPolyData );
-      myPassFilter[ 3 ]->SetInput( myFeatureEdges->GetOutput() );
+      myFeatureEdges->SetInputConnection( aPolyData );
+      myPassFilter[ 3 ]->SetInputConnection( myFeatureEdges->GetOutputPort() );
       myIsFeatureEdgesEnabled = true;
     }
     else
     {
-      myPassFilter[3]->SetInput( aPolyData );
+      myPassFilter[3]->SetInputConnection( aPolyData );
       myPassFilter[3]->Modified();
       myIsFeatureEdgesEnabled = false;
       Modified();
@@ -1279,13 +1280,13 @@ void VISU_Actor::SetValuesLabeled( const bool theIsValLabeled )
 
     if ( isOnCell )
     {
-      myValCellCenters->SetInput( aDataSet );
-      myValMaskPoints->SetInput( myValCellCenters->GetOutput() );
+      myValCellCenters->SetInputData( aDataSet );
+      myValMaskPoints->SetInputConnection( myValCellCenters->GetOutputPort() );
     }
     else if ( isOnPnt )
     {
-      myValUsedPoints->SetInput( aDataSet );
-      myValMaskPoints->SetInput( myValUsedPoints->GetOutput() );
+      myValUsedPoints->SetInputData( aDataSet );
+      myValMaskPoints->SetInputConnection( myValUsedPoints->GetOutputPort() );
     }
 
     myValLabels->SetVisibility( GetVisibility() );
index 0f68c79cd61c15cb03ee88d01ae28c2fcdcd56c0..2b27c922b473ab50509b50eb0177ef204f374834 100644 (file)
@@ -145,9 +145,9 @@ void VISU_ActorBase::SetShrink()
 {
   if(!myIsShrinkable) 
     return;
-  if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
-    myShrinkFilter->SetInput(aDataSet);
-    myPassFilter[1]->SetInput(myShrinkFilter->GetOutput());
+  if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+    myShrinkFilter->SetInputConnection(aDataSet);
+    myPassFilter[1]->SetInputConnection(myShrinkFilter->GetOutputPort());
     myIsShrunk = true;
   }
 }
@@ -156,8 +156,8 @@ void VISU_ActorBase::UnShrink()
 {
   if(!myIsShrunk) 
     return;
-  if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
-    myPassFilter[1]->SetInput(aDataSet);
+  if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+    myPassFilter[1]->SetInputConnection(aDataSet);
     myPassFilter[1]->Modified();
     myIsShrunk = false;
     Modified();
index 67095edf278d9ea56da97c1eea1259bcf244f568..00e3100d2afb8474124e56054db31d1b7006fe2d 100644 (file)
@@ -101,13 +101,13 @@ VISU_DataSetActor
 ::SetMapperInput(vtkDataSet* theDataSet) 
 {
   if (theDataSet->IsA("vtkPolyData")) {
-    myPolyDataExtractor->SetInput(theDataSet);
-    myMapper->SetInput(myPolyDataExtractor->GetOutput());
+    myPolyDataExtractor->SetInputData(theDataSet);
+    myMapper->SetInputConnection(myPolyDataExtractor->GetOutputPort());
   } else {
-    myExtractor->SetInput(theDataSet);
-    myMapper->SetInput(myExtractor->GetOutput());
+    myExtractor->SetInputData(theDataSet);
+    myMapper->SetInputConnection(myExtractor->GetOutputPort());
   }
-  //  myMapper->SetInput(theDataSet);
+  //  myMapper->SetInputData(theDataSet);
   SetMapper(myMapper.GetPointer());
 }
 
index ce386598e371ff16ae467af8a9586cf527f0d1c4..046c2586cb60962f393e0e32ab20a7e0683e1059 100644 (file)
@@ -450,7 +450,7 @@ VISU_GaussPtsAct
 
   //  myPolyDataExtractor->SetInput(myCurrentPL->GetPickableDataSet());
   //myMapper->SetInput(myPolyDataExtractor->GetOutput());
-  myMapper->SetInput(myCurrentPL->GetPickableDataSet());
+  myMapper->SetInputData(myCurrentPL->GetPickableDataSet());
   SetMapper(myMapper.GetPointer());
 }
 
@@ -701,7 +701,7 @@ VISU_GaussPtsAct
 {
   if(vtkMapper* aMapper = myDeviceActor->GetMapper()){
     if(vtkDataSet* aDataSet= aMapper->GetInput()){
-      aDataSet->Update();
+      aMapper->Update();
       myIsInfinite = aDataSet->GetNumberOfCells() < 2;
     }
   }
@@ -716,7 +716,7 @@ VISU_GaussPtsAct
   if(Superclass::GetPickable()){
     if(vtkMapper* aMapper = GetMapper()){
       if(vtkDataSet* aDataSet= aMapper->GetInput()){
-        aDataSet->Update();
+        aMapper->Update();
         return aDataSet->GetNumberOfCells() > 0;
       }
     }
@@ -1277,13 +1277,14 @@ VISU_GaussPtsAct
       // warp
       myWarpVector->SetScaleFactor(myGaussPointsPL->GetScale());
       
-      myCellDataToPointData->SetInput(aCellsToWarp);
+      myCellDataToPointData->SetInputData(aCellsToWarp);
       myCellDataToPointData->PassCellDataOn();
       aCellsToWarp->Delete();
              
-      myWarpVector->SetInput(myCellDataToPointData->GetUnstructuredGridOutput());
+      //myWarpVector->SetInput(myCellDataToPointData->GetUnstructuredGridOutput());
+      myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
       vtkUnstructuredGrid* aWarpedDataSet = myWarpVector->GetUnstructuredGridOutput();
-      aWarpedDataSet->Update();
+      myWarpVector->Update();
       myCellSource->SetPoints(aWarpedDataSet->GetPoints());
     }
     else
index 6e133494f193e46b1a1c82d78b1f6aeac5ea5138..2ca74452cf72374fef04fcd4907c1e30ac4007c8 100644 (file)
@@ -216,20 +216,22 @@ VISU_GaussDeviceActorBase
 
   int anId = 0;
   if (myPolyDataExtractor) {
-    myPolyDataExtractor->SetInput(aDataSet);
-    myPassFilter[ anId ]->SetInput( myPolyDataExtractor->GetOutput() ); 
+    myPolyDataExtractor->SetInputData(aDataSet);
+    myPassFilter[ anId ]->SetInputConnection( myPolyDataExtractor->GetOutputPort() ); 
   } else {
-    myPassFilter[ anId ]->SetInput( aDataSet ); 
+    myPassFilter[ anId ]->SetInputData( aDataSet ); 
   }
-  myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+  myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
 
   anId++;
-  myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+  //myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+  myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
   
   anId++;
-  myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
+  myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
   
-  myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+  //myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+  myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
   
   Superclass::SetMapper( theMapper );
 }
@@ -323,7 +325,7 @@ VISU_GaussPtsDeviceActor
   if(Superclass::GetPickable()){
     if(vtkMapper* aMapper = GetMapper()){
       if(vtkDataSet* aDataSet= aMapper->GetInput()){
-        aDataSet->Update();
+        aMapper->Update();
         return aDataSet->GetNumberOfCells() > 0;
       }
     }
@@ -372,11 +374,11 @@ VISU_CursorPyramid
   myAppendFilter->Delete();
   myMapper->Delete();
 
-  myMapper->SetInput(myAppendFilter->GetOutput());
+  myMapper->SetInputConnection(myAppendFilter->GetOutputPort());
 
   for(int i = 0; i < myNbCones; i++){
     vtkConeSource* aConeSource = vtkConeSource::New();
-    myAppendFilter->AddInput(aConeSource->GetOutput());
+    myAppendFilter->AddInputConnection(aConeSource->GetOutputPort());
     aConeSource->SetResolution(4);
     mySources[i] = aConeSource;
     aConeSource->Delete();
index 7117f5028cf6aa305ada0e5323861bf63761d82b..f8b544c44af0edce9bdeff8939240d3d3c825ceb 100644 (file)
@@ -56,10 +56,10 @@ VISU_IsoSurfActor::VISU_IsoSurfActor():
 //   myMaskPoints->SetOnRatio(100);
 
   myMaskPoints = VISU_LabelPointsFilter::New();
-  myMaskPoints->SetInput(myLabelsDataSet);
+  myMaskPoints->SetInputData(myLabelsDataSet);
 
   myLabeledDataMapper = vtkLabeledDataMapper::New();
-  myLabeledDataMapper->SetInput(myMaskPoints->GetOutput());
+  myLabeledDataMapper->SetInputConnection(myMaskPoints->GetOutputPort());
   //myLabeledDataMapper->SetLabelFormat("%e");
   myLabeledDataMapper->SetLabelModeToLabelScalars();
     
index fd61bb2651efcf4a68e69a2f78b20072023a4cbe..cbaa2ff77ee98c37727f66c40382e0ce06071167 100644 (file)
@@ -33,6 +33,7 @@
 #include "VISU_DataSetActor.h"
 #include "SVTK_DeviceActor.h"
 
+#include <vtkVersion.h>
 
 class VISU_OBJECT_EXPORT VISU_MeshAct : public VISU_DataSetActor 
 {
index 754b0bb70e8902ab8cee05a8d67d0e88e80dbe15..7ac2774f5a0a3903a245ef04394df8ed847554aa 100644 (file)
@@ -72,7 +72,7 @@ class VISU_PointsDeviceActor: public VISU_GaussDeviceActorBase
   void
   SetInput(vtkDataSet* theDataSet)
   {
-    myGeomFilter->SetInput( theDataSet );
+    myGeomFilter->SetInputData( theDataSet );
   }
 
 
@@ -126,7 +126,7 @@ class VISU_PointsDeviceActor: public VISU_GaussDeviceActorBase
     myGeomFilter->SetInside(true);
 
     VISU_OpenGLPointSpriteMapper* aMapper = VISU_OpenGLPointSpriteMapper::New();
-    aMapper->SetInput( myGeomFilter->GetOutput() );
+    aMapper->SetInputConnection( myGeomFilter->GetOutputPort() );
 
     std::string aRootDir( getenv( "VISU_ROOT_DIR") );
     std::string aMainTexture = aRootDir + "/share/salome/resources/visu/sprite_texture.bmp";
index 6ab2c7f43ed6a2d66d20dd69b13143d8b479f2c8..60b8ddc9a3fde2fcc234a079e1ef0ed0a88ee49b 100644 (file)
@@ -33,6 +33,8 @@
 #include "VISU_DataSetActor.h"
 #include "SVTK_DeviceActor.h"
 
+#include <vtkVersion.h>
+
 namespace VTK
 {
   const MarkerType MT_POINT_SPRITE = MT_USER + 1;
index e3e0bc35c9b86e835506addeb8a2bb256aa8c12e..76e0f234e4c2ddd288ab2f5a30ad165a4f80ba55 100644 (file)
@@ -93,18 +93,25 @@ VISU_VectorsAct
 ::SetMapper(vtkMapper* theMapper)
 {
   if(theMapper){
-    myPassFilter[0]->SetInput(theMapper->GetInput());
+    myPassFilter[0]->SetInputData(theMapper->GetInput());
     
-    myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput());
+    //myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput());
+    myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort()); // OUV_PORTING: to check
 
-    myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput());
+    //myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput());
+    myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort()); // OUV_PORTING: to check
 
-    myPassFilter[3]->SetInput(myPassFilter[2]->GetPolyDataOutput());
+    //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());
+    */
+    theMapper->SetInputConnection(myPassFilter[3]->GetOutputPort());
   }
 
   vtkLODActor::SetMapper(theMapper);
index 62dae64a35162ad31f3cd2dde087edba8e8f5e45..ad58fd621296cbd3c9a48af6e101ef9013a8221c 100644 (file)
@@ -145,4 +145,4 @@ dist_VISU_img2vti_SOURCES= VISU_img2vti.cxx
 
 AM_CPPFLAGS+=$(libVisuPipeLine_la_CPPFLAGS)
 LDADD=$(libVisuPipeLine_la_LDFLAGS) libVisuPipeLine.la \
-       -lOpUtil -lMEDWrapper -lMEDWrapper_V2_2  -lMEDWrapper_V2_1 -lMEDWrapperBase -lsuit -lqtx -lSALOMEBasics -lvtkWidgets
+       -lOpUtil -lMEDWrapper -lMEDWrapper_V2_2  -lMEDWrapper_V2_1 -lMEDWrapperBase -lsuit -lqtx -lSALOMEBasics
index 9a3f98542837281c39ed37a10ff000e74509b799..485ab2f8276436e10296497f118f2ce9a0c2c531 100644 (file)
@@ -438,11 +438,11 @@ main(int argc, char** argv)
                                                  aTimeStamp);
 
             VTKViewer_GeometryFilter* aGeometryFilter = VTKViewer_GeometryFilter::New();
-            aGeometryFilter->SetInput(aPresent->GetOutput());
+            aGeometryFilter->SetInputData(aPresent->GetOutput());
             aGeometryFilter->SetInside(true);
 
             vtkMaskPoints* aMaskPoints = vtkMaskPoints::New();
-            aMaskPoints->SetInput(aGeometryFilter->GetOutput());
+            aMaskPoints->SetInputConnection(aGeometryFilter->GetOutputPort());
             aMaskPoints->SetGenerateVertices(true);
             aMaskPoints->SetOnRatio(1);
 
@@ -467,7 +467,7 @@ main(int argc, char** argv)
             aMapper->SetColorModeToMapScalars();
             aMapper->SetScalarVisibility(true);
 
-            aMapper->SetInput(aMaskPoints->GetOutput());
+            aMapper->SetInputConnection(aMaskPoints->GetOutputPort());
             aGeometryFilter->Delete();
 
             anActor->SetMapper(aMapper);
index fdced45e0909422d48423593f58769e799d8ece8..ae5327354677bbe8b71113f1cdc5014360aeb30d 100644 (file)
@@ -230,10 +230,10 @@ VISU_ColoredPL
 {
   if ( theUseScalarFilter ) {
     // Include threshold filter between the transform and the pass filters. 
-    myPassFilter->SetInput( myThreshold->GetOutput() );
+    myPassFilter->SetInputConnection( myThreshold->GetOutputPort() );
   } else {
     // Exclude threshold filter before the pass filter. 
-    myPassFilter->SetInput( myFieldTransform->GetOutput() );
+    myPassFilter->SetInputConnection( myFieldTransform->GetOutputPort() );
   }
 }
 
@@ -389,13 +389,13 @@ void
 VISU_ColoredPL
 ::Build() 
 {
-  myExtractor->SetInput( Superclass::GetClippedInput() );
-  myFieldTransform->SetInput(myExtractor->GetOutput());
+  myExtractor->SetInputData( Superclass::GetClippedInput() );
+  myFieldTransform->SetInputConnection(myExtractor->GetOutputPort());
 
-  myThreshold->SetInput( myFieldTransform->GetOutput() );
+  myThreshold->SetInputConnection( myFieldTransform->GetOutputPort() );
   // The pass filter is used here for possibility to include/exclude 
   // threshold filter before it.
-  myPassFilter->SetInput( myFieldTransform->GetOutput() );
+  myPassFilter->SetInputConnection( myFieldTransform->GetOutputPort() );
 
   GetMapperHolder()->SetLookupTable(GetMapperTable());
   //GetMapper()->InterpolateScalarsBeforeMappingOn();
index 0b9c2bfe8e8cc52f76a3f1b8f38f777266fdeb9a..e298113bd83740804e81133df37608119c08edd8 100644 (file)
@@ -187,7 +187,7 @@ VISU_CutLinesPL
                 myDisplacement[0]);
   //Build lines
   vtkDataSet *aDataSet = anAppendPolyData->GetOutput();
-  aDataSet->Update();
+  anAppendPolyData->Update();
 
   if(aDataSet->GetNumberOfCells() == 0)
     aDataSet = GetMergedInput();
index 3398fa9c0c73dc3972f3fb77d814257a8f237128..b485c5da89969d20428bfc65708d6769d4452c08 100644 (file)
@@ -560,14 +560,14 @@ VISU_CutPlanesPL
                double theOrig[3])
 {
   vtkEDFCutter *aCutPlane = vtkEDFCutter::New();
-  aCutPlane->SetInput(theDataSet);
+  aCutPlane->SetInputData(theDataSet);
   vtkPlane *aPlane = vtkPlane::New();
   aPlane->SetOrigin(theOrig);
 
   aPlane->SetNormal(theDir);
   aCutPlane->SetCutFunction(aPlane);
   aPlane->Delete();
-  theAppendPolyData->AddInput(aCutPlane->GetOutput());
+  theAppendPolyData->AddInputConnection(aCutPlane->GetOutputPort());
   aCutPlane->Delete();
 }
 
@@ -608,7 +608,6 @@ VISU_CutPlanesPL
     CutWithPlane(theAppendPolyData,theDataSet,theDir,aOrig);
   }
   vtkPolyData *aPolyData = theAppendPolyData->GetOutput();
-  aPolyData->Update();
   theAppendPolyData->Update();
 }
 
index 96c182484ed21c533a5f779220c08a32a900ceb7..75cdff5af604cd7e482efba0f3b425ff5901e474 100644 (file)
@@ -184,7 +184,7 @@ VISU_CutSegmentPL
 
     VISU_CutPlanesPL::CutWithPlane(anAppendPolyData, GetMergedInput(), aVector1, myPoint1);
     vtkDataSet *aDataSet = anAppendPolyData->GetOutput();
-    aDataSet->Update();
+    anAppendPolyData->Update();
 
     VISU_CutPlanesPL::CutWithPlane(myAppendPolyData, aDataSet, aVector2, myPoint1);
     myAppendPolyData->Update();
index 155e7309f67c3489db1eae4218674c84877ae55e..62daa712287fb06f167822cb752e4ffdda09b2ae 100644 (file)
@@ -135,8 +135,8 @@ void
 VISU_DataSetMapperHolder
 ::SetUnstructuredGridIDMapper(const VISU::PUnstructuredGridIDMapper& theIDMapper)
 {
-  myElnoDisassembleFilter->SetInput( theIDMapper->GetUnstructuredGridOutput() );
-  myExtractGeometry->SetInput( myElnoDisassembleFilter->GetOutput() );
+  myElnoDisassembleFilter->SetInputData( theIDMapper->GetUnstructuredGridOutput() );
+  myExtractGeometry->SetInputConnection( myElnoDisassembleFilter->GetOutputPort() );
   myUnstructuredGridIDMapper = theIDMapper;
   SetIDMapper( theIDMapper );
 }
index e913626d14b4a0cc9913c502dc0c7f2215cbce5d..abff88169594d68114ae48bb0996a7ad90f53e01 100755 (executable)
@@ -55,13 +55,13 @@ VISU_DeformationPL::VISU_DeformationPL():
   myCellDataToPointData = VISU_CellDataToPointData::New();
   myCellDataToPointData->PassCellDataOn();
 
-  myInputPassFilter->SetInput(vtkUnstructuredGrid::New());
+  myInputPassFilter->SetInputData(vtkUnstructuredGrid::New());
 
-  myCellDataToPointData->SetInput(myInputPassFilter->GetOutput());
+  myCellDataToPointData->SetInputConnection(myInputPassFilter->GetOutputPort());
 
-  myWarpVector->SetInput(myCellDataToPointData->GetOutput());
+  myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort());
   
-  myOutputPassFiler->SetInput(myWarpVector->GetOutput());
+  myOutputPassFiler->SetInputConnection(myWarpVector->GetOutputPort());
 }
 
 //----------------------------------------------------------------------------
@@ -115,7 +115,7 @@ double VISU_DeformationPL::GetScale()
 //----------------------------------------------------------------------------
 void VISU_DeformationPL::SetWarpVectorInput(vtkDataSet *theInput)
 {
-  myInputPassFilter->SetInput(theInput);
+  myInputPassFilter->SetInputData(theInput);
 }
 
 //----------------------------------------------------------------------------
index 9770214660d4756fa7f6e66c87aa7b95f9196649..de42e6a7e023cdbe17ce6f2b43f4d655f4152db3 100644 (file)
@@ -123,8 +123,10 @@ VISU_DeformedGridPL
 {
   Superclass::Build();
 
-  myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
-  GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
+  //myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
+  myWarpScalar->SetInputConnection( GetFieldTransformFilter()->GetOutputPort() ); // OUV_PORTING: to check
+  //GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
+  GetPolyDataMapper()->SetInputConnection( myWarpScalar->GetOutputPort() ); // OUV_PORTING: to check
 }
 
 
@@ -133,20 +135,21 @@ void
 VISU_DeformedGridPL
 ::Update()
 {
-  vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
+  //vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
+  vtkAlgorithmOutput* aPointSet = GetFieldTransformFilter()->GetOutputPort(); // OUV_PORTING: to check
   if ( !myIsContour ) // surface prs
   {
-    myWarpScalar->SetInput( aPointSet );
+    myWarpScalar->SetInputConnection( aPointSet );
   }
   else // contour prs
   {
-    myContourFilter->SetInput( aPointSet );
+    myContourFilter->SetInputConnection( aPointSet );
 
     double aScalarRange[2];
     GetSourceRange( aScalarRange );
 
     myContourFilter->GenerateValues( GetNumberOfContours(), aScalarRange );
-    myWarpScalar->SetInput( myContourFilter->GetOutput() );
+    myWarpScalar->SetInputConnection( myContourFilter->GetOutputPort() );
   }
 
   Superclass::Update();
index ccac365f757fbcbb6c9520780351c644e04e0d03..460f7cc99affe8c384f1f289f091e6aae8d04837 100644 (file)
@@ -144,7 +144,7 @@ VISU_DeformedShapeAndScalarMapPL
 
   UpdateScalars();
 
-  myScalarsFieldTransform->SetInput(myScalarsExtractor->GetOutput());
+  myScalarsFieldTransform->SetInputConnection(myScalarsExtractor->GetOutputPort());
 
   // Sets geometry for merge filter
   myScalarsMergeFilter->SetGeometry(myWarpVector->GetUnstructuredGridOutput());
@@ -214,9 +214,9 @@ VISU_DeformedShapeAndScalarMapPL
 ::UpdateScalars()
 {
   vtkDataSet* aScalars = GetScalars();
-  myScalarsElnoDisassembleFilter->SetInput(aScalars);
-  myExtractGeometry->SetInput(myScalarsElnoDisassembleFilter->GetOutput());
-  myScalarsExtractor->SetInput(myExtractGeometry->GetOutput());
+  myScalarsElnoDisassembleFilter->SetInputData(aScalars);
+  myExtractGeometry->SetInputConnection(myScalarsElnoDisassembleFilter->GetOutputPort());
+  myScalarsExtractor->SetInputConnection(myExtractGeometry->GetOutputPort());
 
   if(VISU::IsDataOnCells(myScalarsElnoDisassembleFilter->GetOutput()))
     GetMapper()->SetScalarModeToUseCellData();
index 5185778bd846d420cb109a8bf56b25c6610bc714..118395c61c2730b65ae577f656fc6596792973a2 100644 (file)
@@ -96,7 +96,7 @@ VISU_DeformedShapePL
   if(!theDataSet)
     return 0.0;
 
-  theDataSet->Update();
+  //theDataSet->Update(); // OUV_PORTING
 
   int aNbCells = theDataSet->GetNumberOfCells();
   int aNbPoints = theDataSet->GetNumberOfPoints();
index 455e284a29440dc7de4040185fb103f8308c36bb..8488e6818811413924458cea2c0dff37310ba958 100644 (file)
@@ -264,33 +264,33 @@ ExecuteScalars(vtkIdType theNbOfTuples,
     vtkDataArray* aFieldArrayMOD = theInputData->GetArray("VISU_FIELD_GAUSS_MOD");
     if (aFieldArrayMOD) {
       switch (anInputDataType) {
-        vtkTemplateMacro4(Module2ScalarsMOD,
+        vtkTemplateMacro(Module2ScalarsMOD(
                           aFieldArrayMOD,
                           (VTK_TT *)(anOutputPtr),
                           theNbOfTuples,
-                          theGaussMetric);
+                          theGaussMetric));
       default:
         break;
       }
     }
     else {
       switch (anInputDataType) {
-        vtkTemplateMacro3(Module2Scalars,
+        vtkTemplateMacro(Module2Scalars(
                           aFieldArray,
                           (VTK_TT *)(anOutputPtr),
-                          theNbOfTuples);
+                          theNbOfTuples));
       default:
         break;
       }
     }
   } else {
     switch (anInputDataType) {
-      vtkTemplateMacro5(Component2Scalars,
+      vtkTemplateMacro(Component2Scalars(
                         aFieldArray,
                         (VTK_TT *)(anInputPtr),
                         (VTK_TT *)(anOutputPtr),
                         theNbOfTuples,
-                        theScalarMode - 1);
+                        theScalarMode - 1));
     default:
       break;
     }
@@ -320,10 +320,10 @@ CutScalars(vtkIdType theNbOfTuples,
   int aDecimals = std::abs( aResourceMgr->integerValue("VISU", "visual_data_precision", 6) );
 
   switch(aDataType) {
-    vtkTemplateMacro3(CutScalarsTempl,
+    vtkTemplateMacro(CutScalarsTempl(
                       (VTK_TT *)(aPtr),
                       theNbOfTuples,
-                      aDecimals);
+                      aDecimals));
   default:
     break;
   }
index e881a36fc505032fde6b3e56f4bae648a23823f3..19f58c176f08a2cf1ccbe650411163dc1b4c0013 100644 (file)
@@ -246,17 +246,17 @@ ExecuteVectors(VISU_FieldTransform::TTransformFun theFunction,
 
   if(theFunction == &(VISU_FieldTransform::Ident)){
     switch(anInputDataType){
-      vtkTemplateMacro4(LinearTransformVectors,
+      vtkTemplateMacro(LinearTransformVectors(
                         (VTK_TT *)(anInputPtr), 
                         (VTK_TT *)(anOutputPtr), 
                         theNbOfTuples,
-                        aScale);
+                        aScale));
     default:
       break;
     }  
   }else{
     switch(anInputDataType){
-      vtkTemplateMacro9(NonLinearTransformVectors,
+      vtkTemplateMacro(NonLinearTransformVectors(
                         anInputVectors,
                         (VTK_TT *)(anInputPtr), 
                         (VTK_TT *)(anOutputPtr), 
@@ -265,7 +265,7 @@ ExecuteVectors(VISU_FieldTransform::TTransformFun theFunction,
                         theFunction,
                         aScalarRange[0],
                         aScalarDelta,
-                        theScalarRange[1]);
+                        theScalarRange[1]));
     default:
       break;
     }  
@@ -323,13 +323,13 @@ ExecuteScalars(VISU_FieldTransform::TTransformFun theFunction,
   void *anOutputPtr = anOutputScalars->GetVoidPointer(0);
 
   switch(anInputDataType){
-    vtkTemplateMacro6(NonLinearTransformScalars,
+    vtkTemplateMacro(NonLinearTransformScalars(
                       anInputScalars,
                       (VTK_TT *)(anInputPtr), 
                       (VTK_TT *)(anOutputPtr), 
                       theNbOfTuples,
                       theFunction,
-                      aScalarRange[0]);
+                      aScalarRange[0]));
   default:
     break;
   }  
index 0cd861ddb79531081a64acefff739f75d05db272..ef82008431b46324e4df138e8199113494455ca6 100644 (file)
@@ -71,7 +71,7 @@ VISU_GaussPointsPL
   mySphereSource = vtkSphereSource::New();
   mySphereSource->SetThetaResolution( 8 );
   mySphereSource->SetPhiResolution( 8 );
-  myGlyph->SetSource( mySphereSource->GetOutput() );
+  myGlyph->SetSourceConnection( mySphereSource->GetOutputPort() );
 
   for(int i = 0; i < 3; i++)
     myPassFilter.push_back(vtkPassThroughFilter::New());
@@ -283,14 +283,15 @@ VISU_GaussPointsPL
 
   myMergeFilter->SetGaussPtsIDMapper(GetGaussPtsIDMapper());
   
-  myPassFilter[0]->SetInput(InsertCustomPL());
+  myPassFilter[0]->SetInputData(InsertCustomPL());
 
-  myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput());
+  myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
 
   // Geometrical Sphere
-  myPassFilter[2]->SetInput(myPassFilter[1]->GetOutput());
+  myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
   
-  GetPointSpriteMapper()->SetInput( myPassFilter[2]->GetPolyDataOutput() );
+  //GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetPolyDataOutput() );
+  GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetOutputPort() ); // OUV_PORTING: to check
 
   // Update according the current state
   SetIsDeformed(GetIsDeformed());
@@ -306,10 +307,10 @@ VISU_GaussPointsPL
 {
   if(IsExternalGeometryUsed() || GetNumberOfGeometry() > 1 ){
     myMergeFilter->Update();
-    myPassFilter[0]->SetInput(myMergeFilter->GetOutput());
+    myPassFilter[0]->SetInputConnection(myMergeFilter->GetOutputPort());
   }
   else{
-    myPassFilter[0]->SetInput(GetFieldTransformFilter()->GetOutput());
+    myPassFilter[0]->SetInputConnection(GetFieldTransformFilter()->GetOutputPort());
   }
 
   SetAverageCellSize( VISU_DeformedShapePL::GetScaleFactor( GetParentMesh() ) );
@@ -410,11 +411,12 @@ void
 VISU_GaussPointsPL
 ::SetIsDeformed( bool theIsDeformed )
 {
-  if(theIsDeformed){
-    myWarpVector->SetInput( myPassFilter[0]->GetPolyDataOutput() );
-    myPassFilter[1]->SetInput(myWarpVector->GetOutput());
+  if(theIsDeformed){ 
+    //myWarpVector->SetInput( myPassFilter[0]->GetPolyDataOutput() );
+    myWarpVector->SetInputConnection( myPassFilter[0]->GetOutputPort() ); // OUV_PORTING: to check
+    myPassFilter[1]->SetInputConnection(myWarpVector->GetOutputPort());
   }else
-    myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput());
+    myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
 }
 
 //----------------------------------------------------------------------------
@@ -468,11 +470,11 @@ VISU_GaussPointsPL
 {
   if( thePrimitiveType == VISU_OpenGLPointSpriteMapper::GeomSphere )
   {
-    myGlyph->SetInput( myPassFilter[1]->GetOutput() );
-    myPassFilter[2]->SetInput(myGlyph->GetOutput());
+    myGlyph->SetInputConnection( myPassFilter[1]->GetOutputPort() );
+    myPassFilter[2]->SetInputConnection(myGlyph->GetOutputPort());
   }
   else
-    myPassFilter[2]->SetInput(myPassFilter[1]->GetOutput());
+    myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
 
   GetPointSpriteMapper()->SetPrimitiveType( thePrimitiveType );
   
@@ -766,9 +768,7 @@ VISU_GaussPointsPL
 
   int aNbCompositeComponents = 4;
   aCompositeImageData->SetDimensions(aMainImageSize);
-  aCompositeImageData->SetScalarTypeToUnsignedChar();        
-  aCompositeImageData->SetNumberOfScalarComponents(aNbCompositeComponents);
-  aCompositeImageData->AllocateScalars();
+  aCompositeImageData->AllocateScalars( VTK_UNSIGNED_CHAR, aNbCompositeComponents );
 
   unsigned char* aMainDataPtr = (unsigned char*)aMainImageData->GetScalarPointer();
   unsigned char* anAlphaDataPtr = (unsigned char*)anAlphaImageData->GetScalarPointer();
@@ -792,7 +792,7 @@ VISU_GaussPointsPL
   }
   aMainReader->Delete();
   anAlphaReader->Delete();
-  aCompositeImageData->Update();
+  //aCompositeImageData->Update(); // OUV_PORTING
 
   return aCompositeImageData;
 }
@@ -837,7 +837,7 @@ VISU_GaussPointsPL
 {
   if(IsExternalGeometryUsed()){
     ClearGeometry();
-    myAppendFilter->AddInput(GetFieldTransformFilter()->GetOutput());
+    myAppendFilter->AddInputConnection(GetFieldTransformFilter()->GetOutputPort());
   }
 }
 
@@ -856,7 +856,7 @@ VISU_GaussPointsPL
   if(!IsExternalGeometryUsed())
     ClearGeometry();
   AddGeometryName(theGeomName);
-  myAppendFilter->AddInput(theGeometry);
+  myAppendFilter->AddInputData(theGeometry);
   return GetNumberOfGeometry();
 }
 
index d7ad8dbc3971bb2860f9416d5671f631ca4e02b8..3ea620ff81fbe74dd948f6c42e7af2d85635a79b 100644 (file)
@@ -30,6 +30,8 @@
 #include <vtkCellData.h>
 #include <vtkPoints.h>
 #include <vtkIdList.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
 
 vtkStandardNewMacro(VISU_MaskPointsFilter);
 
@@ -39,8 +41,21 @@ VISU_MaskPointsFilter::VISU_MaskPointsFilter(){
 
 VISU_MaskPointsFilter::~VISU_MaskPointsFilter(){}
 
-void VISU_MaskPointsFilter::Execute(){
-  vtkPointSet *anInput = this->GetInput(), *anOutput = this->GetOutput();
+int VISU_MaskPointsFilter::RequestData(
+  vtkInformation *vtkNotUsed(request),
+  vtkInformationVector **inputVector,
+  vtkInformationVector *outputVector)
+{
+  // get the info objects
+  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+  // get the input and ouptut
+  vtkPointSet *anInput = vtkPointSet::SafeDownCast(
+    inInfo->Get(vtkDataObject::DATA_OBJECT()));
+  vtkPointSet *anOutput = vtkPointSet::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
   anOutput->GetPointData()->CopyAllOff();
   anOutput->GetCellData()->CopyAllOff();
   anOutput->CopyStructure(anInput);
@@ -64,4 +79,5 @@ void VISU_MaskPointsFilter::Execute(){
   anOutput->SetPoints(aNewPoints);
   aNewPoints->Delete();
   aPoints->Delete();
+  return 1;
 }
index 1b9bd2561145897d1f6a7a76058cf33e8b564c76..48411b88cab795cda91ed5da757c377adf5c64bf 100644 (file)
 #ifndef VISU_MaskPointsFilter_HeaderFile
 #define VISU_MaskPointsFilter_HeaderFile
 
-#include <vtkPointSetToPointSetFilter.h>
+#include <vtkPointSetAlgorithm.h>
 
-class VISU_MaskPointsFilter : public vtkPointSetToPointSetFilter{
+class VISU_MaskPointsFilter : public vtkPointSetAlgorithm{
 protected:
   VISU_MaskPointsFilter();
   VISU_MaskPointsFilter(const VISU_MaskPointsFilter&);
 
-  virtual void Execute();
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
   float PercentsOfUsedPoints;
 
 public:
-  vtkTypeMacro(VISU_MaskPointsFilter,vtkPointSetToPointSetFilter);
+  vtkTypeMacro(VISU_MaskPointsFilter,vtkPointSetAlgorithm);
   static VISU_MaskPointsFilter* New();
   virtual ~VISU_MaskPointsFilter();
 
index be0bd0cedf54a5969cd63efff6b7248d5e44a11c..5678337710bee65fc318d4ca2abd0d0c3e156dd7 100644 (file)
@@ -61,7 +61,7 @@ void
 VISU_MeshPL
 ::Build()
 {
-  GetDataSetMapper()->SetInput(GetClippedInput());
+  GetDataSetMapper()->SetInputData(GetClippedInput());
 }
 
 
index 27e3cbfae1a65c1f26c9698369725c23489ca8a5..3fca5834616697bd33bf977ab5afd41c809281c5 100755 (executable)
@@ -519,7 +519,8 @@ void VISU_OpenGLPointSpriteMapper::RenderPiece(vtkRenderer *ren, vtkActor *act)
   else
   {
     this->InvokeEvent(vtkCommand::StartEvent,NULL);
-    input->Update();
+    //input->Update(); // OUV_PORTING: to check
+    this->Update();
     this->InvokeEvent(vtkCommand::EndEvent,NULL);
 
     numPts = input->GetNumberOfPoints();
index 6daa2df51f0965ed973c6597dc7a26d7a9109435..182ee812cf5cfec361ca8bb9b9fde1ca7cd93a51 100755 (executable)
@@ -75,14 +75,14 @@ bool VISU_OptionalDeformationPL::IsDeformed(){
 //----------------------------------------------------------------------------
 void VISU_OptionalDeformationPL::OnDeformation(){
 
-  myCellDataToPointData->SetInput(myInputPassFilter->GetOutput());
-  myWarpVector->SetInput(myCellDataToPointData->GetOutput());
-  myOutputPassFiler->SetInput(myWarpVector->GetOutput());
+  myCellDataToPointData->SetInputConnection(myInputPassFilter->GetOutputPort());
+  myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort());
+  myOutputPassFiler->SetInputConnection(myWarpVector->GetOutputPort());
 }
 
 //----------------------------------------------------------------------------
 void VISU_OptionalDeformationPL::OffDeformation(){
-  myOutputPassFiler->SetInput(myInputPassFilter->GetOutput());
+  myOutputPassFiler->SetInputConnection(myInputPassFilter->GetOutputPort());
 }
 
 
index c71c0e4ebd7006295eacfbbdb89dfd8056bf1b8f..aad4cb0918c1d1e07330a00451dfc21d224658dc 100644 (file)
@@ -81,11 +81,12 @@ namespace VISU
 
   {
     if(VISU::IsDataOnCells(theDataSet)){
-      theCellDataToPointData->SetInput(theDataSet);
+      theCellDataToPointData->SetInputData(theDataSet);
       theCellDataToPointData->PassCellDataOn();
-      theOutputFilter->SetInput(theCellDataToPointData->GetUnstructuredGridOutput());
+      //theOutputFilter->SetInput(theCellDataToPointData->GetUnstructuredGridOutput());
+      theOutputFilter->SetInputConnection(theCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
     }else
-      theOutputFilter->SetInput(theDataSet);
+      theOutputFilter->SetInputData(theDataSet);
   }
 
   //----------------------------------------------------------------------------
index b44a4dc75afbac976e9686f5af65cb2f971b3429..6e9b1c7ae772db65922c328505d32a26251c496d 100644 (file)
@@ -109,51 +109,51 @@ VISU_PlanesWidget::VISU_PlanesWidget()
   myPlane2->SetOrigin(0,0,myDistance);
   //
   myImplicitFunction = vtkImplicitBoolean::New();
-  myImplicitFunction->SetOperationType(VTK_UNION);  
+  myImplicitFunction->SetOperationTypeToUnion();  
   //
   myBox = vtkImageData::New();
   myBox->SetDimensions(2,2,2);
   myOutline = vtkOutlineFilter::New();
-  myOutline->SetInput(myBox);
+  myOutline->SetInputData(myBox);
   myOutlineMapper = vtkPolyDataMapper::New();
-  myOutlineMapper->SetInput(myOutline->GetOutput());
+  myOutlineMapper->SetInputConnection(myOutline->GetOutputPort());
   myOutlineActor = vtkActor::New();
   this->myOutlineActor->SetMapper(this->myOutlineMapper);
   this->myOutlineActor->PickableOff();
   this->OutlineTranslation = 0;
   
   this->myCutter1 = vtkEDFCutter::New();
-  this->myCutter1->SetInput(myBox);
+  this->myCutter1->SetInputData(myBox);
   this->myCutter1->SetCutFunction(myPlane1);
   this->myCutMapper1 = vtkPolyDataMapper::New();
-  this->myCutMapper1->SetInput(this->myCutter1->GetOutput());
+  this->myCutMapper1->SetInputConnection(this->myCutter1->GetOutputPort());
   this->myCutActor1 = vtkActor::New();
   this->myCutActor1->SetMapper(this->myCutMapper1);
   this->myDrawPlane = 1;
 
   this->myEdges1 = vtkFeatureEdges::New();
   myEdges1->SetColoring(0); 
-  this->myEdges1->SetInput(this->myCutter1->GetOutput());
+  this->myEdges1->SetInputConnection(this->myCutter1->GetOutputPort());
   this->myEdgesMapper1 = vtkPolyDataMapper::New();
-  this->myEdgesMapper1->SetInput(this->myEdges1->GetOutput());
+  this->myEdgesMapper1->SetInputConnection(this->myEdges1->GetOutputPort());
   this->myEdgesActor1 = vtkActor::New();
   this->myEdgesActor1->SetMapper(this->myEdgesMapper1);
   myEdgesActor1->GetProperty()->SetLineWidth(4.); 
   myEdgesActor1->GetProperty()->SetColor(0., .5, .7); 
 
   this->myCutter2 = vtkEDFCutter::New();
-  this->myCutter2->SetInput(myBox);
+  this->myCutter2->SetInputData(myBox);
   this->myCutter2->SetCutFunction(this->myPlane2);
   this->myCutMapper2 = vtkPolyDataMapper::New();
-  this->myCutMapper2->SetInput(this->myCutter2->GetOutput());
+  this->myCutMapper2->SetInputConnection(this->myCutter2->GetOutputPort());
   this->myCutActor2 = vtkActor::New();
   this->myCutActor2->SetMapper(this->myCutMapper2);
 
   myEdges2 = vtkFeatureEdges::New();
   myEdges2->SetColoring(0); 
-  myEdges2->SetInput(myCutter2->GetOutput());
+  myEdges2->SetInputConnection(myCutter2->GetOutputPort());
   myEdgesMapper2 = vtkPolyDataMapper::New();
-  myEdgesMapper2->SetInput(myEdges2->GetOutput());
+  myEdgesMapper2->SetInputConnection(myEdges2->GetOutputPort());
   myEdgesActor2 = vtkActor::New();
   myEdgesActor2->SetMapper(myEdgesMapper2);
   myEdgesActor2->GetProperty()->SetLineWidth(4.); 
@@ -163,7 +163,7 @@ VISU_PlanesWidget::VISU_PlanesWidget()
   this->LineSource = vtkLineSource::New();
   this->LineSource->SetResolution(1);
   this->LineMapper = vtkPolyDataMapper::New();
-  this->LineMapper->SetInput(this->LineSource->GetOutput());
+  this->LineMapper->SetInputConnection(this->LineSource->GetOutputPort());
   this->LineActor = vtkActor::New();
   this->LineActor->SetMapper(this->LineMapper);
 
@@ -171,7 +171,7 @@ VISU_PlanesWidget::VISU_PlanesWidget()
   this->ConeSource->SetResolution(12);
   this->ConeSource->SetAngle(20.);
   this->ConeMapper = vtkPolyDataMapper::New();
-  this->ConeMapper->SetInput(this->ConeSource->GetOutput());
+  this->ConeMapper->SetInputConnection(this->ConeSource->GetOutputPort());
   this->ConeActor = VISU_UnScaledActor::New();
   this->ConeActor->SetMapper(this->ConeMapper);
   ConeActor->SetSize(36);
@@ -181,7 +181,7 @@ VISU_PlanesWidget::VISU_PlanesWidget()
   this->LineSource2 = vtkLineSource::New();
   this->LineSource2->SetResolution(1);
   this->LineMapper2 = vtkPolyDataMapper::New();
-  this->LineMapper2->SetInput(this->LineSource2->GetOutput());
+  this->LineMapper2->SetInputConnection(this->LineSource2->GetOutputPort());
   this->LineActor2 = vtkActor::New();
   this->LineActor2->SetMapper(this->LineMapper2);
 
@@ -189,7 +189,7 @@ VISU_PlanesWidget::VISU_PlanesWidget()
   this->ConeSource2->SetResolution(12);
   this->ConeSource2->SetAngle(20.);
   this->ConeMapper2 = vtkPolyDataMapper::New();
-  this->ConeMapper2->SetInput(this->ConeSource2->GetOutput());
+  this->ConeMapper2->SetInputConnection(this->ConeSource2->GetOutputPort());
   this->ConeActor2 = VISU_UnScaledActor::New();
   this->ConeActor2->SetMapper(this->ConeMapper2);
   ConeActor2->SetSize(36);
@@ -200,7 +200,7 @@ VISU_PlanesWidget::VISU_PlanesWidget()
   this->Sphere->SetThetaResolution(16);
   this->Sphere->SetPhiResolution(8);
   this->SphereMapper = vtkPolyDataMapper::New();
-  this->SphereMapper->SetInput(this->Sphere->GetOutput());
+  this->SphereMapper->SetInputConnection(this->Sphere->GetOutputPort());
   this->SphereActor = VISU_UnScaledActor::New();
   this->SphereActor->SetMapper(this->SphereMapper);
   SphereActor->SetSize(36);
@@ -1254,7 +1254,7 @@ void VISU_PlanesWidget::PlaceWidget(double bds[6])
                         (bounds[5]-bounds[4]));
   this->myOutline->Update();
 
-  if (this->Input || this->Prop3D)    {
+  if (this->GetInput() || this->Prop3D)    {
     this->LineSource->SetPoint1(myPlane1->GetOrigin());
     if ( this->NormalToYAxis )      {
       myPlane1->SetNormal(0,1,0);
@@ -1529,7 +1529,7 @@ void VISU_PlanesWidget::UpdateRepresentation()
   this->Sphere->SetCenter(origin);
   SphereActor->SetCenter(origin);
 
-  this->myEdgesMapper1->SetInput(this->myEdges1->GetOutput());
+  this->myEdgesMapper1->SetInputConnection(this->myEdges1->GetOutputPort());
 }
 
 //==================================================================
index 9fb59429e1d6b031a7f7a5ac5d22df5350c333cb..d98b6291bd59ba4bae4b75b4156399325b4ac727 100644 (file)
@@ -121,7 +121,7 @@ VISU_CutPlanesPL::PlaneOrientation
 VISU_Plot3DPL
 ::GetOrientation(vtkDataSet* theDataSet)
 {
-  theDataSet->Update();
+  //theDataSet->Update(); // OUV_PORTING
 
   double aBounds[6];
   theDataSet->GetBounds(aBounds);
@@ -155,7 +155,7 @@ VISU_Plot3DPL
 ::GetScaleFactor( VISU_ColoredPL* theColoredPL,
                   vtkDataSet* theDataSet )
 {
-  theDataSet->Update();
+  //theDataSet->Update(); // OUV_PORTING
   double aLength = theDataSet->GetLength(); // diagonal length
 
   double aScalarRange[2];
@@ -210,7 +210,7 @@ VISU_Plot3DPL
   if ( !IsPlanarInput() )
   {
     aCutPlane = vtkEDFCutter::New();
-    aCutPlane->SetInput(aMergedInput);
+    aCutPlane->SetInputData(aMergedInput);
 
     vtkPlane *aPlane = vtkPlane::New();
     aPlane->SetOrigin(anOrigin);
@@ -220,41 +220,43 @@ VISU_Plot3DPL
     aPlane->Delete();
 
     aPolyData = aCutPlane->GetOutput();
-    aPolyData->Update();
+    aCutPlane->Update();
   }
 
   if ( !aPolyData || aPolyData->GetNumberOfCells() == 0 ) {
-    myGeometryFilter->SetInput(aMergedInput);
+    myGeometryFilter->SetInputData(aMergedInput);
     aPolyData = myGeometryFilter->GetOutput();
-    aPolyData->Update();
+    myGeometryFilter->Update();
   }
   if ( !myIsContour ) // surface prs
   {
     if(VISU::IsDataOnCells(aPolyData)) {
-      myCellDataToPointData->SetInput(aPolyData);
+      myCellDataToPointData->SetInputData(aPolyData);
       myCellDataToPointData->PassCellDataOn();
-      myWarpScalar->SetInput(myCellDataToPointData->GetPolyDataOutput());
+      //myWarpScalar->SetInputConnection(myCellDataToPointData->GetPolyDataOutput()); // OUV_PORTING: to check
+      myWarpScalar->SetInputConnection(myCellDataToPointData->GetOutputPort());
     }else
-      myWarpScalar->SetInput(aPolyData);
+      myWarpScalar->SetInputData(aPolyData);
   }
   else // contour prs
   {
     if(VISU::IsDataOnCells(aPolyData)) {
-      myCellDataToPointData->SetInput(aPolyData);
+      myCellDataToPointData->SetInputData(aPolyData);
       myCellDataToPointData->PassCellDataOn();
-      myContourFilter->SetInput(myCellDataToPointData->GetOutput());
+      myContourFilter->SetInputConnection(myCellDataToPointData->GetOutputPort());
     }else
-      myContourFilter->SetInput(aPolyData);
+      myContourFilter->SetInputData(aPolyData);
 
     double aScalarRange[2];
     GetSourceRange(aScalarRange);
 
     myContourFilter->GenerateValues(GetNumberOfContours(),aScalarRange);
-    myWarpScalar->SetInput(myContourFilter->GetOutput());
+    myWarpScalar->SetInputConnection(myContourFilter->GetOutputPort());
   }
 
   VISU_CutPlanesPL::ClearAppendPolyData(myAppendPolyData.GetPointer());
-  myAppendPolyData->AddInput(myWarpScalar->GetPolyDataOutput());
+  //myAppendPolyData->AddInputConnection(myWarpScalar->GetPolyDataOutput()); // OUV_PORTING: to check
+  myAppendPolyData->AddInputConnection(myWarpScalar->GetOutputPort());
 
   if ( aCutPlane )
     aCutPlane->Delete();
index f1616404cf9816f29d034d480d122aff270c3cb2..400c4252633306dec23ff39faece92197fcdb96f 100644 (file)
@@ -118,7 +118,7 @@ void
 VISU_PolyDataMapperHolder
 ::SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper)
 {
-  myExtractPolyDataGeometry->SetInput(theIDMapper->GetPolyDataOutput());
+  myExtractPolyDataGeometry->SetInputData(theIDMapper->GetPolyDataOutput());
   myPolyDataIDMapper = theIDMapper;
   SetIDMapper(theIDMapper);
 }
index a81c5d628182b4006508df60627dc9e47fd66f91..31bd0c933383636e4b92722ed06db883591b871e 100644 (file)
@@ -94,7 +94,7 @@ VISU_ScalarBarActor::VISU_ScalarBarActor()
 
   this->ScalarBar = vtkPolyData::New();
   this->ScalarBarMapper = vtkPolyDataMapper2D::New();
-  this->ScalarBarMapper->SetInput(this->ScalarBar);
+  this->ScalarBarMapper->SetInputData(this->ScalarBar);
   this->ScalarBarActor = vtkActor2D::New();
   this->ScalarBarActor->SetMapper(this->ScalarBarMapper);
   this->ScalarBarActor->GetPositionCoordinate()->
index fe6549c7e1bf6f522ef364351ab93e18ca48e89f..bf5f22bd887319f58590b01a72542ad2df53d4fb 100644 (file)
@@ -123,9 +123,9 @@ VISU_ScalarMapPL
   myMergeFilter->AddField("VISU_POINTS_MAPPER", aDataSet);
   myMergeFilter->AddField("ELNO_POINT_COORDS", aDataSet);
 
-  myElnoAssembleFilter->SetInput( InsertCustomPL() );
+  myElnoAssembleFilter->SetInputData( InsertCustomPL() );
 
-  GetDataSetMapper()->SetInput( myElnoAssembleFilter->GetOutput() );
+  GetDataSetMapper()->SetInputConnection( myElnoAssembleFilter->GetOutputPort() );
 }
 
 
@@ -181,7 +181,7 @@ VISU_ScalarMapPL
 {
   if(IsExternalGeometryUsed()){
     ClearGeometry();
-    myAppendFilter->AddInput(GetClippedInput());
+    myAppendFilter->AddInputData(GetClippedInput());
   }
 }
 
@@ -197,7 +197,7 @@ VISU_ScalarMapPL
   if(!IsExternalGeometryUsed())
     ClearGeometry();
   AddGeometryName(theGeomName);
-  myAppendFilter->AddInput(theGeometry);
+  myAppendFilter->AddInputData(theGeometry);
   return GetNumberOfGeometry();
 }
 
index 93a440b933d74fc941fa6ca620fb2170a6a2317e..c0d883ea17711f9012c93e26e2ad33917549c3d2 100755 (executable)
@@ -59,7 +59,7 @@ VISU_SphereWidget::VISU_SphereWidget()
   mySphereSource->SetPhiResolution(15);
   mySphereSource->LatLongTessellationOn();
   mySphereMapper = vtkPolyDataMapper::New();
-  mySphereMapper->SetInput(mySphereSource->GetOutput());
+  mySphereMapper->SetInputConnection(mySphereSource->GetOutputPort());
   mySphereActor = vtkActor::New();
   mySphereActor->SetMapper(mySphereMapper);
   //
index 7083fc37e45c9612566028c269157a646b5da492..2171011e4283098f14395abd9e15141a902a123d 100644 (file)
@@ -216,7 +216,7 @@ VISU_StreamLinesPL
             int theDirection)
 {
   vtkPointSet* aDataSet = theSource? theSource: GetMergedInput();
-  aDataSet->Update();
+  //aDataSet->Update(); // OUV_PORTING
 
   vtkIdType aNbOfPoints = aDataSet->GetNumberOfPoints();
   vtkDataSet* aPointSet = GetExtractorFilter()->GetOutput();
@@ -240,6 +240,8 @@ VISU_StreamLinesPL
                                            thePropogationTime,
                                            thePercents);
 
+  // OUV_PORTING: to do
+  /*
   if (anIsAccepted) {
     mySource = theSource;
     myPercents = thePercents;
@@ -260,6 +262,7 @@ VISU_StreamLinesPL
     myStream->Modified();
     Modified();
   }
+  */
   return anIsAccepted;
 }
 
@@ -324,9 +327,9 @@ VISU_StreamLinesPL
                                                        aPercents);
   double aBasePropTime = GetBasePropagationTime(theDataSet);
   VISU_MaskPointsFilter *aPointsFilter = VISU_MaskPointsFilter::New();
-  aPointsFilter->SetInput(theDataSet);
+  aPointsFilter->SetInputData(theDataSet);
   vtkDataSet* aDataSet = aPointsFilter->GetOutput();
-  aDataSet->Update();
+  aPointsFilter->Update();
   size_t aRes = FindPossibleParams(aDataSet,
                                    aStepLength,
                                    aBasePropTime,
@@ -381,7 +384,7 @@ VISU_StreamLinesPL
   if(!theDataSet) 
     return -1.0;
 
-  theDataSet->Update();
+  //theDataSet->Update(); // OUV_PORTING
 
   int degree = 0;
   double aVolume = 1.0;
@@ -427,7 +430,7 @@ VISU_StreamLinesPL
   if(!theDataSet) 
     return -1.0;
 
-  theDataSet->Update();
+  //theDataSet->Update(); // OUV_PORTING
 
   double aLength = theDataSet->GetLength();
   double* aBounds = theDataSet->GetBounds();
@@ -457,7 +460,7 @@ VISU_StreamLinesPL
 ::GetBaseIntegrationStep(vtkDataSet* theDataSet, 
                          double thePercents)
 {
-  theDataSet->Update();
+  //theDataSet->Update(); // OUV_PORTING
 
   double aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
   double anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep;
@@ -480,7 +483,7 @@ VISU_StreamLinesPL
                          vtkDataSet* theDataSet, 
                          double thePercents)
 {
-  theDataSet->Update();
+  //theDataSet->Update(); // OUV_PORTING
 
   double aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents);
   if(aMinIntegrationStep > theStep)
@@ -564,7 +567,7 @@ VISU_StreamLinesPL
   if(!theDataSet) 
     return -1.0;
 
-  theDataSet->Update();
+  //theDataSet->Update(); // OUV_PORTING
   double aPropagationTime = theDataSet->GetLength() / GetVelocityCoeff(theDataSet);
 
   return aPropagationTime;
@@ -695,7 +698,7 @@ VISU_StreamLinesPL
                         myCellDataToPointData,
                         GetMergedInput());
 
-  myGeomFilter->SetInput(myStream->GetOutput());
+  myGeomFilter->SetInputConnection(myStream->GetOutputPort());
   myGeomFilter->ExtentClippingOn();
 }
 
index 09a4184fc82e7da9dae5e8b67a62a2273c4819d2..03c3016172361b8ae8269780e95de8d33ae8f18e 100644 (file)
@@ -51,12 +51,12 @@ void ToCellCenters( TOutputFilter *theOutputFilter,
                     VISU_UsedPointsFilter* theUsedPointsFilter )
 {
   if ( VISU::IsDataOnCells( theDataSet ) ) {
-    theCellCenters->SetInput( theDataSet );
+    theCellCenters->SetInputData( theDataSet );
     theCellCenters->VertexCellsOn();
-    theOutputFilter->SetInput( theCellCenters->GetOutput() );
+    theOutputFilter->SetInputConnection( theCellCenters->GetOutputPort() );
   }else {
-    theUsedPointsFilter->SetInput( theDataSet );
-    theOutputFilter->SetInput( theUsedPointsFilter->GetOutput() );
+    theUsedPointsFilter->SetInputData( theDataSet );
+    theOutputFilter->SetInputConnection( theUsedPointsFilter->GetOutputPort() );
   }
 }
 
@@ -245,7 +245,7 @@ VISU_VectorsPL
                  GetMergedInput(),
                  myUsedPointsFilter );
 
-  myGlyph->SetInput( myTransformFilter->GetOutput() );
+  myGlyph->SetInputConnection( myTransformFilter->GetOutputPort() );
   myGlyph->SetVectorModeToUseVector();
   myGlyph->SetScaleModeToScaleByVector();
   myGlyph->SetColorModeToColorByScalar();
@@ -280,7 +280,7 @@ VISU_VectorsPL
     case CENTER:
       myGlyphSource->SetCenter(0.0, 0.0, 0.0);
     }
-    myGlyph->SetSource(myGlyphSource->GetOutput());
+    myGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
   }
     break;
   case CONE2:
@@ -302,12 +302,12 @@ VISU_VectorsPL
     case CENTER:
       myConeSource->SetCenter(0.0, 0.0, 0.0);
     }
-    myGlyph->SetSource(myConeSource->GetOutput());
+    myGlyph->SetSourceConnection(myConeSource->GetOutputPort());
   }
     break;
   case NONE:
   default: {
-    myGlyph->SetSource(myLineSource->GetOutput());
+    myGlyph->SetSourceConnection(myLineSource->GetOutputPort());
   }
   }
 
index 41f834a11a3f66b76c42db4e0ffa6f419d5d9f9b..fbc001e79fcf804adef20f2e577e17061fcdeef1 100644 (file)
@@ -37,6 +37,7 @@
 #include "vtkProperty2D.h"
 #include "vtkTextMapper.h"
 #include "vtkTextProperty.h"
+#include "vtkVersion.h"
 #include "vtkViewport.h"
 #include "vtkTransformPolyDataFilter.h" // RKV
 #include "vtkTransform.h" // RKV
@@ -489,7 +490,7 @@ int VISU_XYPlotActor::RenderOpaqueGeometry(vtkViewport *viewport)
     for (mtime=0, this->InputList->InitTraversal(dsit); 
          (ds = this->InputList->GetNextDataSet(dsit)); )
       {
-      ds->Update();
+      //ds->Update(); // OUV_PORTING
       dsMtime = ds->GetMTime();
       if ( dsMtime > mtime )
         {
@@ -504,7 +505,7 @@ int VISU_XYPlotActor::RenderOpaqueGeometry(vtkViewport *viewport)
     for (mtime=0, this->DataObjectInputList->InitTraversal(doit); 
          (dobj = this->DataObjectInputList->GetNextDataObject(doit)); )
       {
-      dobj->Update();
+      //dobj->Update(); // OUV_PORTING
       dsMtime = dobj->GetMTime();
       if ( dsMtime > mtime )
         {
@@ -1411,16 +1412,16 @@ void VISU_XYPlotActor::CreatePlotData(int *pos, int *pos2Extern, double xRange[2
     {
     this->PlotData[i] = vtkPolyData::New();
     this->PlotGlyph[i] = vtkGlyph2D::New();
-    this->PlotGlyph[i]->SetInput(this->PlotData[i]);
+    this->PlotGlyph[i]->SetInputData(this->PlotData[i]);
     this->PlotGlyph[i]->SetScaleModeToDataScalingOff();
     this->PlotAppend[i] = vtkAppendPolyData::New();
-    this->PlotAppend[i]->AddInput(this->PlotData[i]);
+    this->PlotAppend[i]->AddInputData(this->PlotData[i]);
     if ( this->LegendActor->GetEntrySymbol(i) != NULL &&
          this->LegendActor->GetEntrySymbol(i) != this->GlyphSource->GetOutput() )
       {
-      this->PlotGlyph[i]->SetSource(this->LegendActor->GetEntrySymbol(i));
+      this->PlotGlyph[i]->SetSourceData(this->LegendActor->GetEntrySymbol(i));
       this->PlotGlyph[i]->SetScaleFactor(this->ComputeGlyphScale(i,pos,pos2));
-      this->PlotAppend[i]->AddInput(this->PlotGlyph[i]->GetOutput());
+      this->PlotAppend[i]->AddInputConnection(this->PlotGlyph[i]->GetOutputPort());
       }
     this->PlotMapper[i] = vtkPolyDataMapper2D::New();
     
@@ -1428,12 +1429,12 @@ void VISU_XYPlotActor::CreatePlotData(int *pos, int *pos2Extern, double xRange[2
     // Insert a transformation filter into the pipeline to 
     // take into account a plot location.
     this->PlotTransform[i] = vtkTransformPolyDataFilter::New();
-    this->PlotTransform[i]->SetInput(this->PlotAppend[i]->GetOutput());
+    this->PlotTransform[i]->SetInputConnection(this->PlotAppend[i]->GetOutputPort());
     this->PlotTransform[i]->SetTransform(tf); 
-    this->PlotMapper[i]->SetInput(this->PlotTransform[i]->GetOutput());
+    this->PlotMapper[i]->SetInputConnection(this->PlotTransform[i]->GetOutputPort());
     // RKV : End
     
-// RKV    this->PlotMapper[i]->SetInput(this->PlotAppend[i]->GetOutput());
+// RKV    this->PlotMapper[i]->SetInputConnection(this->PlotAppend[i]->GetOutputPort());
     this->PlotMapper[i]->ScalarVisibilityOff();
     this->PlotActor[i] = vtkActor2D::New();
     this->PlotActor[i]->SetMapper(this->PlotMapper[i]);
@@ -2089,7 +2090,7 @@ 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();
+  //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 1ee7c967a1529c4a7b23477734e72db05180e45a..bbcda0532f7675dedecf4902a9c3aed7edce34f4 100644 (file)
@@ -78,7 +78,7 @@ int main( int argc, char** argv )
   aReader->Update();
 
   vtkXMLImageDataWriter* aWriter = vtkXMLImageDataWriter::New();
-  aWriter->SetInput( aReader->GetOutput() );
+  aWriter->SetInputConnection( aReader->GetOutputPort() );
   aWriter->SetFileName( argv[3] );
   aWriter->Write();
 
index 57c864c31c1c033d154c2d20432280252d3a469d..b3ce61275c72e59762765d6d0da01108ee5c2965 100644 (file)
@@ -182,7 +182,7 @@ void OrientedPlane::Init()
 
   // Create and display actor
   myMapper = vtkDataSetMapper::New();
-  myMapper->SetInput(myPlaneSource->GetOutput());
+  myMapper->SetInputConnection(myPlaneSource->GetOutputPort());
 
   myActor = SALOME_Actor::New();
   myActor->VisibilityOff();
@@ -551,7 +551,7 @@ void VisuGUI_ClippingDlg::applyLocalPlanes()
       VISU_PipeLine* aPL = myPrs3d->GetPipeLine();
       vtkMapper* aMapper = aPL->GetMapper();
       vtkDataSet* aPrsData = aMapper->GetInput();
-      aPrsData->Update();
+      aMapper->Update();
       if (aPrsData->GetNumberOfCells() < 1) {
         isFailed = true;
       }
index a58a2b5a890bd6b150ef9bd0708ae96ff76e968e..3de75240522a1de120e2f8ebe51e4f6cea179db3 100644 (file)
@@ -108,11 +108,11 @@ PreviewPlane::PreviewPlane(SVTK_ViewWindow* theWindow,
                     (aBound[5]-aBound[4]));
 
   myCutter = vtkEDFCutter::New();
-  myCutter->SetInput(myBox);
+  myCutter->SetInputData(myBox);
   myCutter->SetCutFunction(myPlane);
 
   myMapper = vtkPolyDataMapper::New();
-  myMapper->SetInput(myCutter->GetOutput());
+  myMapper->SetInputConnection(myCutter->GetOutputPort());
 
   myActor = vtkActor::New();
   myActor->VisibilityOff();
index 415ddc4216927752defb83d209eb17b66d3f69fd..1d9ce5d7bab2583bc7992fa3e4bbccc1ef721d3c 100644 (file)
@@ -456,7 +456,7 @@ void VisuGUI_CutLinesDlg::createPlanes()
   myCutLines->GetPipeLine()->Update();
   vtkAppendPolyData* aPolyData = myCutLines->GetSpecificPL()->GetAppendPolyData();
   vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
-  aPlaneMapper->SetInput(aPolyData->GetOutput());
+  aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
   aPlaneMapper->ScalarVisibilityOff();
   
   myPreviewActorGlyphs = SALOME_Actor::New();
@@ -679,7 +679,7 @@ void VisuGUI_CutLinesDlg::updateGlyphs(bool update){
 
   vtkAppendPolyData* aPolyData = myCutLines->GetSpecificPL()->GetAppendPolyData();
   vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
-  aPlaneMapper->SetInput(aPolyData->GetOutput());
+  aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
   double bounds[6];
   aPlaneMapper->GetBounds(bounds);
 
@@ -719,12 +719,12 @@ void VisuGUI_CutLinesDlg::updateGlyphs(bool update){
   glyphs->SetScaleFactor(0.25*max_bound);
   glyphs->SetVectorModeToUseVector();
   glyphs->SetScaleModeToScaleByVector();
-  glyphs->SetInput(profile);
-  glyphs->SetSource(source->GetOutput());
+  glyphs->SetInputData(profile);
+  glyphs->SetSourceConnection(source->GetOutputPort());
 
   vtkPolyDataMapper* aGlyphsMapper = vtkPolyDataMapper::New();
   aGlyphsMapper->ScalarVisibilityOff();
-  aGlyphsMapper->SetInput(glyphs->GetOutput());
+  aGlyphsMapper->SetInputConnection(glyphs->GetOutputPort());
   
   myPreviewActorGlyphs->SetMapper(aGlyphsMapper);
 
index 689d8be1adb60f813d3aed149fd09aa4822b66ea..f412c95ede5e67bb8e78ddece8c2896734a9702b 100644 (file)
@@ -344,7 +344,7 @@ void VisuGUI_CutPlanesPane::createPlanes()
     return;
   }
   vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
-  aPlaneMapper->SetInput(aDataSet);
+  aPlaneMapper->SetInputData(aDataSet);
   aPlaneMapper->ScalarVisibilityOff();
 
   myPreviewActor = SALOME_Actor::New();
index 5c4d9462c108757095c311c66fe8cbc32967aee2..ac660a02c8bcb1377ed58d54cfa73ff64de7613a 100644 (file)
@@ -227,7 +227,7 @@ void VisuGUI_CutSegmentDlg::initFromPrsObject ( VISU::ColoredPrs3d_i* thePrs,
   myUseAbsoluteLengthCheck->setChecked( myCutSegment->IsUseAbsoluteLength() );
 
   vtkDataSet* anInput = myCutSegment->GetPipeLine()->GetInput();
-  anInput->Update();
+  myCutSegment->GetPipeLine()->Update();
 
   double bounds[6];
   anInput->GetBounds( bounds );
@@ -299,7 +299,7 @@ void VisuGUI_CutSegmentDlg::createPlanes()
   myCutSegment->GetPipeLine()->Update();
   vtkAppendPolyData* aPolyData = myCutSegment->GetSpecificPL()->GetAppendPolyData();
   vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
-  aPlaneMapper->SetInput(aPolyData->GetOutput());
+  aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
   aPlaneMapper->ScalarVisibilityOff();
   
   myPreviewActorGlyphs = SALOME_Actor::New();
@@ -356,7 +356,7 @@ void VisuGUI_CutSegmentDlg::updateGlyphs(bool update){
 
   vtkAppendPolyData* aPolyData = myCutSegment->GetSpecificPL()->GetAppendPolyData();
   vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
-  aPlaneMapper->SetInput(aPolyData->GetOutput());
+  aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
   double bounds[6];
   aPlaneMapper->GetBounds(bounds);
 
@@ -396,12 +396,12 @@ void VisuGUI_CutSegmentDlg::updateGlyphs(bool update){
   glyphs->SetScaleFactor(0.25*max_bound);
   glyphs->SetVectorModeToUseVector();
   glyphs->SetScaleModeToScaleByVector();
-  glyphs->SetInput(profile);
-  glyphs->SetSource(source->GetOutput());
+  glyphs->SetInputData(profile);
+  glyphs->SetSourceConnection(source->GetOutputPort());
 
   vtkPolyDataMapper* aGlyphsMapper = vtkPolyDataMapper::New();
   aGlyphsMapper->ScalarVisibilityOff();
-  aGlyphsMapper->SetInput(glyphs->GetOutput());
+  aGlyphsMapper->SetInputConnection(glyphs->GetOutputPort());
   
   myPreviewActorGlyphs->SetMapper(aGlyphsMapper);
 
@@ -442,7 +442,7 @@ void VisuGUI_CutSegmentDlg::updatePoints( bool update )
 
   vtkPolyDataMapper* aPointsMapper = vtkPolyDataMapper::New();
   aPointsMapper->ScalarVisibilityOff();
-  aPointsMapper->SetInput( aProfile );
+  aPointsMapper->SetInputData( aProfile );
   
   myPreviewActorPoints->SetMapper( aPointsMapper );
   myPreviewActorPoints->GetProperty()->SetRepresentationToPoints();
index 983537187de53e1771a5f486d953a3b5c3d796d4..b5f1f6309d8439a838ce3cce0deec8ae681df837 100644 (file)
@@ -263,7 +263,7 @@ void VisuGUI_EvolutionDlg::setVisible( bool theIsVisible )
     VISU::PNamedIDMapper aMapper = aResult->GetInput()->GetMeshOnEntity( myEngine->getMeshName(), myEngine->getEntity() );
 
     vtkDataSetMapper* aPreviewMapper = vtkDataSetMapper::New();
-    aPreviewMapper->SetInput( aMapper->GetOutput() );
+    aPreviewMapper->SetInputData( aMapper->GetOutput() );
   
     vtkProperty* aProperty = vtkProperty::New();
     aProperty->SetColor( 1, 1, 1 );
index 12eebfb4c8e9b9f763da8ec51be627a3a013a55b..5c67ce81a958e438d369aa591f90706a198b8e27 100644 (file)
@@ -120,7 +120,7 @@ class TPlane : public SALOME_Actor
   void Init() {
     myPlaneSource = vtkPlaneSource::New();
     myMapper = vtkDataSetMapper::New();
-    myMapper->SetInput(myPlaneSource->GetOutput());
+    myMapper->SetInputConnection(myPlaneSource->GetOutputPort());
     // actor methods
     VisibilityOff();
     PickableOff();
index d7f0fe8a8228221f0c1654ab12c95427dc3e8e2a..571632596e927f459e1f80a04477a420c0becc57 100644 (file)
@@ -97,6 +97,7 @@
 #include <vtkPointData.h>
 #include <vtkCellData.h>
 #include <vtkCell.h>
+#include <vtkDataArray.h>
 
 // STL Includes
 #include <map>
index f6784012c975e081eff91eb6dcbb3adf7f2dd524..d2f9814ce256c149c004abac43e03e64c10b460b 100644 (file)
@@ -317,7 +317,7 @@ VISU::CutLinesBase_i
     const double *aBoundPrjLn = myCutLinesBasePL->GetBoundPrjLn();
     for(int iLine = 0, jLine = 0; iLine < iLineEnd; iLine++){
       vtkDataSet *aDataSet = myCutLinesBasePL->GetAppendPolyData()->GetInput(iLine);
-      aDataSet->Update();
+      myCutLinesBasePL->GetAppendPolyData()->Update();
       int aNbPoints = aDataSet->GetNumberOfPoints();
       if(!aNbPoints) continue;
       vtkPointData *aPointData = aDataSet->GetPointData();
@@ -325,10 +325,10 @@ VISU::CutLinesBase_i
       VISU_CellDataToPointData *aFilter = NULL;
       if(!aScalars) {
         aFilter = VISU_CellDataToPointData::New();
-        aFilter->SetInput(aDataSet);
+        aFilter->SetInputData(aDataSet);
         aFilter->PassCellDataOn();
         aDataSet = aFilter->GetOutput();
-        aDataSet->Update();
+        aFilter->Update();
       }
       aPointData = aDataSet->GetPointData();
       aScalars = aPointData->GetScalars();
index fa25e5422a715b95b6514df39e1a5d3517f999d5..9b5500251e823d625c8e8991293ef5554502cafd 100644 (file)
@@ -395,7 +395,7 @@ VISU::Prs3d_i
   if (!aDataSet)
     throw std::runtime_error("There is no input data !!!");
 
-  aDataSet->Update();
+  aMapper->Update();
   static float eps = VTK_LARGE_FLOAT * 0.1 ;
   if (!aDataSet->GetNumberOfCells())
     throw std::runtime_error("There are no visible elements");
index fa464432a54e01f6b0a5995db383dc9130f65448..e499b64f25a668a6939de69e047d99db5b63aa84 100644 (file)
@@ -263,7 +263,7 @@ VISU::StreamLines_i
        myPrs3dServant = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(myPrs3d).in());
        if(myPrs3dServant){
          myAppendFilter->RemoveAllInputs();
-         myAppendFilter->AddInput(myPrs3dServant->GetPipeLine()->GetMapper()->GetInput());
+         myAppendFilter->AddInputData(myPrs3dServant->GetPipeLine()->GetMapper()->GetInput());
          aSource = myAppendFilter->GetOutput();
        }
       }