From: ouv Date: Mon, 25 Feb 2013 15:39:29 +0000 (+0000) Subject: Porting to VTK 6. X-Git-Tag: mergeto_V7_main_01Mar13~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4cf8cde67a2bf5a8066813e170e92527b69d6415;p=modules%2Fvisu.git Porting to VTK 6. --- diff --git a/src/CONVERTOR/VISU_CommonCellsFilter.cxx b/src/CONVERTOR/VISU_CommonCellsFilter.cxx index d50f5bf0..be5237af 100644 --- a/src/CONVERTOR/VISU_CommonCellsFilter.cxx +++ b/src/CONVERTOR/VISU_CommonCellsFilter.cxx @@ -35,6 +35,8 @@ #include #include #include +#include +#include // STL #include @@ -218,43 +220,57 @@ void VISU_CommonCellsFilter ::SetProfileUG(vtkUnstructuredGrid *input) { - this->SetInput(input); + this->SetInputData(0, input); } vtkUnstructuredGrid* VISU_CommonCellsFilter ::GetProfileUG() { - return dynamic_cast(this->GetInput()); + return dynamic_cast(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(this->Inputs[1]); + return dynamic_cast(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; } diff --git a/src/CONVERTOR/VISU_CommonCellsFilter.hxx b/src/CONVERTOR/VISU_CommonCellsFilter.hxx index aa473c57..1d3ec82d 100644 --- a/src/CONVERTOR/VISU_CommonCellsFilter.hxx +++ b/src/CONVERTOR/VISU_CommonCellsFilter.hxx @@ -24,13 +24,13 @@ #ifndef VISU_CommonCellsFilter_HeaderFile #define VISU_CommonCellsFilter_HeaderFile -#include +#include -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 diff --git a/src/CONVERTOR/VISU_ConvertorUtils.cxx b/src/CONVERTOR/VISU_ConvertorUtils.cxx index 86a41d5a..c9b7b0bb 100644 --- a/src/CONVERTOR/VISU_ConvertorUtils.cxx +++ b/src/CONVERTOR/VISU_ConvertorUtils.cxx @@ -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(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(aDataArray)){ diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index a5b7250a..8104dc3b 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -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 - "<GetNumberOfPoints()<Update(); + //theDataSet->Update(); // OUV_PORTING BEGMSG(1,"GetPoints() = "<GetPoints()->GetActualMemorySize()*1000)< + #include #include diff --git a/src/CONVERTOR/VISU_MergeFilter.cxx b/src/CONVERTOR/VISU_MergeFilter.cxx index 539d50a6..44fdf075 100644 --- a/src/CONVERTOR/VISU_MergeFilter.cxx +++ b/src/CONVERTOR/VISU_MergeFilter.cxx @@ -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); } //------------------------------------------------------------------------------ diff --git a/src/CONVERTOR/VISU_MergeFilterUtilities.cxx b/src/CONVERTOR/VISU_MergeFilterUtilities.cxx index 15c036c7..cd80e81e 100644 --- a/src/CONVERTOR/VISU_MergeFilterUtilities.cxx +++ b/src/CONVERTOR/VISU_MergeFilterUtilities.cxx @@ -37,6 +37,7 @@ #include #include +#include #include #include diff --git a/src/CONVERTOR/VISU_Structures_impl.cxx b/src/CONVERTOR/VISU_Structures_impl.cxx index 2d36ef98..dea7c4aa 100644 --- a/src/CONVERTOR/VISU_Structures_impl.cxx +++ b/src/CONVERTOR/VISU_Structures_impl.cxx @@ -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; } } diff --git a/src/CONVERTOR/VISU_TableReader.cxx b/src/CONVERTOR/VISU_TableReader.cxx index bca89e5a..050a20d7 100644 --- a/src/CONVERTOR/VISU_TableReader.cxx +++ b/src/CONVERTOR/VISU_TableReader.cxx @@ -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(); diff --git a/src/CONVERTOR/VISU_UsedPointsFilter.cxx b/src/CONVERTOR/VISU_UsedPointsFilter.cxx index bf48857c..9d6b30ba 100644 --- a/src/CONVERTOR/VISU_UsedPointsFilter.cxx +++ b/src/CONVERTOR/VISU_UsedPointsFilter.cxx @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include @@ -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 TId2IdMap; TId2IdMap aId2IdMap; @@ -101,5 +115,6 @@ void VISU_UsedPointsFilter::Execute(){ anOldPointsIds->Delete(); aNewPointsIds->Delete(); anOutput->Squeeze(); + return 1; } diff --git a/src/CONVERTOR/VISU_UsedPointsFilter.hxx b/src/CONVERTOR/VISU_UsedPointsFilter.hxx index de4db72a..3150a792 100644 --- a/src/CONVERTOR/VISU_UsedPointsFilter.hxx +++ b/src/CONVERTOR/VISU_UsedPointsFilter.hxx @@ -25,21 +25,22 @@ #ifndef VISU_UsedPointsFilter_HeaderFile #define VISU_UsedPointsFilter_HeaderFile -#include +#include #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 diff --git a/src/OBJECT/VISU_Actor.cxx b/src/OBJECT/VISU_Actor.cxx index 884560cb..958d9bb5 100644 --- a/src/OBJECT/VISU_Actor.cxx +++ b/src/OBJECT/VISU_Actor.cxx @@ -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() ); diff --git a/src/OBJECT/VISU_ActorBase.cxx b/src/OBJECT/VISU_ActorBase.cxx index 0f68c79c..2b27c922 100644 --- a/src/OBJECT/VISU_ActorBase.cxx +++ b/src/OBJECT/VISU_ActorBase.cxx @@ -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(); diff --git a/src/OBJECT/VISU_DataSetActor.cxx b/src/OBJECT/VISU_DataSetActor.cxx index 67095edf..00e3100d 100644 --- a/src/OBJECT/VISU_DataSetActor.cxx +++ b/src/OBJECT/VISU_DataSetActor.cxx @@ -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()); } diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index ce386598..046c2586 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -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 diff --git a/src/OBJECT/VISU_GaussPtsDeviceActor.cxx b/src/OBJECT/VISU_GaussPtsDeviceActor.cxx index 6e133494..2ca74452 100644 --- a/src/OBJECT/VISU_GaussPtsDeviceActor.cxx +++ b/src/OBJECT/VISU_GaussPtsDeviceActor.cxx @@ -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(); diff --git a/src/OBJECT/VISU_IsoSurfActor.cxx b/src/OBJECT/VISU_IsoSurfActor.cxx index 7117f502..f8b544c4 100644 --- a/src/OBJECT/VISU_IsoSurfActor.cxx +++ b/src/OBJECT/VISU_IsoSurfActor.cxx @@ -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(); diff --git a/src/OBJECT/VISU_MeshAct.h b/src/OBJECT/VISU_MeshAct.h index fd61bb26..cbaa2ff7 100644 --- a/src/OBJECT/VISU_MeshAct.h +++ b/src/OBJECT/VISU_MeshAct.h @@ -33,6 +33,7 @@ #include "VISU_DataSetActor.h" #include "SVTK_DeviceActor.h" +#include class VISU_OBJECT_EXPORT VISU_MeshAct : public VISU_DataSetActor { diff --git a/src/OBJECT/VISU_ScalarMapAct.cxx b/src/OBJECT/VISU_ScalarMapAct.cxx index 754b0bb7..7ac2774f 100644 --- a/src/OBJECT/VISU_ScalarMapAct.cxx +++ b/src/OBJECT/VISU_ScalarMapAct.cxx @@ -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"; diff --git a/src/OBJECT/VISU_ScalarMapAct.h b/src/OBJECT/VISU_ScalarMapAct.h index 6ab2c7f4..60b8ddc9 100644 --- a/src/OBJECT/VISU_ScalarMapAct.h +++ b/src/OBJECT/VISU_ScalarMapAct.h @@ -33,6 +33,8 @@ #include "VISU_DataSetActor.h" #include "SVTK_DeviceActor.h" +#include + namespace VTK { const MarkerType MT_POINT_SPRITE = MT_USER + 1; diff --git a/src/OBJECT/VISU_VectorsAct.cxx b/src/OBJECT/VISU_VectorsAct.cxx index e3e0bc35..76e0f234 100644 --- a/src/OBJECT/VISU_VectorsAct.cxx +++ b/src/OBJECT/VISU_VectorsAct.cxx @@ -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(theMapper)) aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput()); else if(vtkPolyDataMapper* aMapper = dynamic_cast(theMapper)) aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput()); + */ + theMapper->SetInputConnection(myPassFilter[3]->GetOutputPort()); } vtkLODActor::SetMapper(theMapper); diff --git a/src/PIPELINE/Makefile.am b/src/PIPELINE/Makefile.am index 62dae64a..ad58fd62 100644 --- a/src/PIPELINE/Makefile.am +++ b/src/PIPELINE/Makefile.am @@ -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 diff --git a/src/PIPELINE/VISUPipeLine.cxx b/src/PIPELINE/VISUPipeLine.cxx index 9a3f9854..485ab2f8 100644 --- a/src/PIPELINE/VISUPipeLine.cxx +++ b/src/PIPELINE/VISUPipeLine.cxx @@ -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); diff --git a/src/PIPELINE/VISU_ColoredPL.cxx b/src/PIPELINE/VISU_ColoredPL.cxx index fdced45e..ae532735 100644 --- a/src/PIPELINE/VISU_ColoredPL.cxx +++ b/src/PIPELINE/VISU_ColoredPL.cxx @@ -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(); diff --git a/src/PIPELINE/VISU_CutLinesPL.cxx b/src/PIPELINE/VISU_CutLinesPL.cxx index 0b9c2bfe..e298113b 100644 --- a/src/PIPELINE/VISU_CutLinesPL.cxx +++ b/src/PIPELINE/VISU_CutLinesPL.cxx @@ -187,7 +187,7 @@ VISU_CutLinesPL myDisplacement[0]); //Build lines vtkDataSet *aDataSet = anAppendPolyData->GetOutput(); - aDataSet->Update(); + anAppendPolyData->Update(); if(aDataSet->GetNumberOfCells() == 0) aDataSet = GetMergedInput(); diff --git a/src/PIPELINE/VISU_CutPlanesPL.cxx b/src/PIPELINE/VISU_CutPlanesPL.cxx index 3398fa9c..b485c5da 100644 --- a/src/PIPELINE/VISU_CutPlanesPL.cxx +++ b/src/PIPELINE/VISU_CutPlanesPL.cxx @@ -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(); } diff --git a/src/PIPELINE/VISU_CutSegmentPL.cxx b/src/PIPELINE/VISU_CutSegmentPL.cxx index 96c18248..75cdff5a 100644 --- a/src/PIPELINE/VISU_CutSegmentPL.cxx +++ b/src/PIPELINE/VISU_CutSegmentPL.cxx @@ -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(); diff --git a/src/PIPELINE/VISU_DataSetMapperHolder.cxx b/src/PIPELINE/VISU_DataSetMapperHolder.cxx index 155e7309..62daa712 100644 --- a/src/PIPELINE/VISU_DataSetMapperHolder.cxx +++ b/src/PIPELINE/VISU_DataSetMapperHolder.cxx @@ -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 ); } diff --git a/src/PIPELINE/VISU_DeformationPL.cxx b/src/PIPELINE/VISU_DeformationPL.cxx index e913626d..abff8816 100755 --- a/src/PIPELINE/VISU_DeformationPL.cxx +++ b/src/PIPELINE/VISU_DeformationPL.cxx @@ -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); } //---------------------------------------------------------------------------- diff --git a/src/PIPELINE/VISU_DeformedGridPL.cxx b/src/PIPELINE/VISU_DeformedGridPL.cxx index 97702146..de42e6a7 100644 --- a/src/PIPELINE/VISU_DeformedGridPL.cxx +++ b/src/PIPELINE/VISU_DeformedGridPL.cxx @@ -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(); diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx index ccac365f..460f7cc9 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx @@ -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(); diff --git a/src/PIPELINE/VISU_DeformedShapePL.cxx b/src/PIPELINE/VISU_DeformedShapePL.cxx index 5185778b..118395c6 100644 --- a/src/PIPELINE/VISU_DeformedShapePL.cxx +++ b/src/PIPELINE/VISU_DeformedShapePL.cxx @@ -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(); diff --git a/src/PIPELINE/VISU_Extractor.cxx b/src/PIPELINE/VISU_Extractor.cxx index 455e284a..8488e681 100644 --- a/src/PIPELINE/VISU_Extractor.cxx +++ b/src/PIPELINE/VISU_Extractor.cxx @@ -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; } diff --git a/src/PIPELINE/VISU_FieldTransform.cxx b/src/PIPELINE/VISU_FieldTransform.cxx index e881a36f..19f58c17 100644 --- a/src/PIPELINE/VISU_FieldTransform.cxx +++ b/src/PIPELINE/VISU_FieldTransform.cxx @@ -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; } diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index 0cd861dd..ef820084 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -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(); } diff --git a/src/PIPELINE/VISU_MaskPointsFilter.cxx b/src/PIPELINE/VISU_MaskPointsFilter.cxx index d7ad8dbc..3ea620ff 100644 --- a/src/PIPELINE/VISU_MaskPointsFilter.cxx +++ b/src/PIPELINE/VISU_MaskPointsFilter.cxx @@ -30,6 +30,8 @@ #include #include #include +#include +#include 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; } diff --git a/src/PIPELINE/VISU_MaskPointsFilter.hxx b/src/PIPELINE/VISU_MaskPointsFilter.hxx index 1b9bd256..48411b88 100644 --- a/src/PIPELINE/VISU_MaskPointsFilter.hxx +++ b/src/PIPELINE/VISU_MaskPointsFilter.hxx @@ -25,18 +25,18 @@ #ifndef VISU_MaskPointsFilter_HeaderFile #define VISU_MaskPointsFilter_HeaderFile -#include +#include -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(); diff --git a/src/PIPELINE/VISU_MeshPL.cxx b/src/PIPELINE/VISU_MeshPL.cxx index be0bd0ce..56783377 100644 --- a/src/PIPELINE/VISU_MeshPL.cxx +++ b/src/PIPELINE/VISU_MeshPL.cxx @@ -61,7 +61,7 @@ void VISU_MeshPL ::Build() { - GetDataSetMapper()->SetInput(GetClippedInput()); + GetDataSetMapper()->SetInputData(GetClippedInput()); } diff --git a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx index 27e3cbfa..3fca5834 100755 --- a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx +++ b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx @@ -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(); diff --git a/src/PIPELINE/VISU_OptionalDeformationPL.cxx b/src/PIPELINE/VISU_OptionalDeformationPL.cxx index 6daa2df5..182ee812 100755 --- a/src/PIPELINE/VISU_OptionalDeformationPL.cxx +++ b/src/PIPELINE/VISU_OptionalDeformationPL.cxx @@ -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()); } diff --git a/src/PIPELINE/VISU_PipeLineUtils.hxx b/src/PIPELINE/VISU_PipeLineUtils.hxx index c71c0e4e..aad4cb09 100644 --- a/src/PIPELINE/VISU_PipeLineUtils.hxx +++ b/src/PIPELINE/VISU_PipeLineUtils.hxx @@ -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); } //---------------------------------------------------------------------------- diff --git a/src/PIPELINE/VISU_PlanesWidget.cxx b/src/PIPELINE/VISU_PlanesWidget.cxx index b44a4dc7..6e9b1c7a 100644 --- a/src/PIPELINE/VISU_PlanesWidget.cxx +++ b/src/PIPELINE/VISU_PlanesWidget.cxx @@ -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()); } //================================================================== diff --git a/src/PIPELINE/VISU_Plot3DPL.cxx b/src/PIPELINE/VISU_Plot3DPL.cxx index 9fb59429..d98b6291 100644 --- a/src/PIPELINE/VISU_Plot3DPL.cxx +++ b/src/PIPELINE/VISU_Plot3DPL.cxx @@ -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(); diff --git a/src/PIPELINE/VISU_PolyDataMapperHolder.cxx b/src/PIPELINE/VISU_PolyDataMapperHolder.cxx index f1616404..400c4252 100644 --- a/src/PIPELINE/VISU_PolyDataMapperHolder.cxx +++ b/src/PIPELINE/VISU_PolyDataMapperHolder.cxx @@ -118,7 +118,7 @@ void VISU_PolyDataMapperHolder ::SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper) { - myExtractPolyDataGeometry->SetInput(theIDMapper->GetPolyDataOutput()); + myExtractPolyDataGeometry->SetInputData(theIDMapper->GetPolyDataOutput()); myPolyDataIDMapper = theIDMapper; SetIDMapper(theIDMapper); } diff --git a/src/PIPELINE/VISU_ScalarBarActor.cxx b/src/PIPELINE/VISU_ScalarBarActor.cxx index a81c5d62..31bd0c93 100644 --- a/src/PIPELINE/VISU_ScalarBarActor.cxx +++ b/src/PIPELINE/VISU_ScalarBarActor.cxx @@ -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()-> diff --git a/src/PIPELINE/VISU_ScalarMapPL.cxx b/src/PIPELINE/VISU_ScalarMapPL.cxx index fe6549c7..bf5f22bd 100644 --- a/src/PIPELINE/VISU_ScalarMapPL.cxx +++ b/src/PIPELINE/VISU_ScalarMapPL.cxx @@ -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(); } diff --git a/src/PIPELINE/VISU_SphereWidget.cxx b/src/PIPELINE/VISU_SphereWidget.cxx index 93a440b9..c0d883ea 100755 --- a/src/PIPELINE/VISU_SphereWidget.cxx +++ b/src/PIPELINE/VISU_SphereWidget.cxx @@ -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); // diff --git a/src/PIPELINE/VISU_StreamLinesPL.cxx b/src/PIPELINE/VISU_StreamLinesPL.cxx index 7083fc37..2171011e 100644 --- a/src/PIPELINE/VISU_StreamLinesPL.cxx +++ b/src/PIPELINE/VISU_StreamLinesPL.cxx @@ -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(); } diff --git a/src/PIPELINE/VISU_VectorsPL.cxx b/src/PIPELINE/VISU_VectorsPL.cxx index 09a4184f..03c30161 100644 --- a/src/PIPELINE/VISU_VectorsPL.cxx +++ b/src/PIPELINE/VISU_VectorsPL.cxx @@ -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()); } } diff --git a/src/PIPELINE/VISU_XYPlotActor.cxx b/src/PIPELINE/VISU_XYPlotActor.cxx index 41f834a1..fbc001e7 100644 --- a/src/PIPELINE/VISU_XYPlotActor.cxx +++ b/src/PIPELINE/VISU_XYPlotActor.cxx @@ -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; diff --git a/src/PIPELINE/VISU_img2vti.cxx b/src/PIPELINE/VISU_img2vti.cxx index 1ee7c967..bbcda053 100644 --- a/src/PIPELINE/VISU_img2vti.cxx +++ b/src/PIPELINE/VISU_img2vti.cxx @@ -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(); diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.cxx b/src/VISUGUI/VisuGUI_ClippingDlg.cxx index 57c864c3..b3ce6127 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingDlg.cxx @@ -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; } diff --git a/src/VISUGUI/VisuGUI_ClippingPanel.cxx b/src/VISUGUI/VisuGUI_ClippingPanel.cxx index a58a2b5a..3de75240 100644 --- a/src/VISUGUI/VisuGUI_ClippingPanel.cxx +++ b/src/VISUGUI/VisuGUI_ClippingPanel.cxx @@ -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(); diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index 415ddc42..1d9ce5d7 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -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); diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index 689d8be1..f412c95e 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -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(); diff --git a/src/VISUGUI/VisuGUI_CutSegmentDlg.cxx b/src/VISUGUI/VisuGUI_CutSegmentDlg.cxx index 5c4d9462..ac660a02 100644 --- a/src/VISUGUI/VisuGUI_CutSegmentDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutSegmentDlg.cxx @@ -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(); diff --git a/src/VISUGUI/VisuGUI_EvolutionDlg.cxx b/src/VISUGUI/VisuGUI_EvolutionDlg.cxx index 98353718..b5f1f630 100644 --- a/src/VISUGUI/VisuGUI_EvolutionDlg.cxx +++ b/src/VISUGUI/VisuGUI_EvolutionDlg.cxx @@ -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 ); diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx index 12eebfb4..5c67ce81 100644 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx +++ b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx @@ -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(); diff --git a/src/VISUGUI/VisuGUI_SelectionPanel.cxx b/src/VISUGUI/VisuGUI_SelectionPanel.cxx index d7f0fe8a..57163259 100644 --- a/src/VISUGUI/VisuGUI_SelectionPanel.cxx +++ b/src/VISUGUI/VisuGUI_SelectionPanel.cxx @@ -97,6 +97,7 @@ #include #include #include +#include // STL Includes #include diff --git a/src/VISU_I/VISU_CutLinesBase_i.cc b/src/VISU_I/VISU_CutLinesBase_i.cc index f6784012..d2f9814c 100644 --- a/src/VISU_I/VISU_CutLinesBase_i.cc +++ b/src/VISU_I/VISU_CutLinesBase_i.cc @@ -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(); diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index fa25e542..9b550025 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -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"); diff --git a/src/VISU_I/VISU_StreamLines_i.cc b/src/VISU_I/VISU_StreamLines_i.cc index fa464432..e499b64f 100644 --- a/src/VISU_I/VISU_StreamLines_i.cc +++ b/src/VISU_I/VISU_StreamLines_i.cc @@ -263,7 +263,7 @@ VISU::StreamLines_i myPrs3dServant = dynamic_cast(VISU::GetServant(myPrs3d).in()); if(myPrs3dServant){ myAppendFilter->RemoveAllInputs(); - myAppendFilter->AddInput(myPrs3dServant->GetPipeLine()->GetMapper()->GetInput()); + myAppendFilter->AddInputData(myPrs3dServant->GetPipeLine()->GetMapper()->GetInput()); aSource = myAppendFilter->GetOutput(); } }