From 48328b896e01f5abda305cbd24654a19d1db843f Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 12 Mar 2013 15:48:48 +0000 Subject: [PATCH] Porting to VTK 6. Debug. --- src/SVTK/SVTK_Actor.cxx | 4 ++-- src/SVTK/SVTK_DeviceActor.cxx | 15 +++++++++++++-- src/SVTK/SVTK_DeviceActor.h | 8 +++++++- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/SVTK/SVTK_Actor.cxx b/src/SVTK/SVTK_Actor.cxx index 3180a5c60..396bae23d 100644 --- a/src/SVTK/SVTK_Actor.cxx +++ b/src/SVTK/SVTK_Actor.cxx @@ -65,7 +65,7 @@ void SVTK_Actor ::Initialize() { - SetInput(GetSource()); + SetInputData(GetSource()); } void @@ -77,7 +77,7 @@ SVTK_Actor myUnstructuredGrid = theUnstructuredGrid; - SetInput(theUnstructuredGrid); + SetInputData(theUnstructuredGrid); } vtkUnstructuredGrid* diff --git a/src/SVTK/SVTK_DeviceActor.cxx b/src/SVTK/SVTK_DeviceActor.cxx index 9b15c76f5..e9587b501 100644 --- a/src/SVTK/SVTK_DeviceActor.cxx +++ b/src/SVTK/SVTK_DeviceActor.cxx @@ -120,7 +120,7 @@ SVTK_DeviceActor { if(theMapper){ int anId = 0; - myPassFilter[ anId ]->SetInputData( theMapper->GetInput() ); + myPassFilter[ anId ]->SetInputConnection( theMapper->GetInputConnection( 0, 0 ) ); myPassFilter[ anId + 1]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 1 @@ -158,12 +158,23 @@ SVTK_DeviceActor */ void SVTK_DeviceActor -::SetInput(vtkDataSet* theDataSet) +::SetInputData(vtkDataSet* theDataSet) { myMapper->SetInputData(theDataSet); InitPipeLine(myMapper); } +/*! + Allows to set initial vtkDataSet +*/ +void +SVTK_DeviceActor +::SetInputConnection(vtkAlgorithmOutput* theAlgorithmOutput) +{ + myMapper->SetInputConnection(theAlgorithmOutput); + InitPipeLine(myMapper); +} + /*! To provide VTK to Object and backward mapping */ diff --git a/src/SVTK/SVTK_DeviceActor.h b/src/SVTK/SVTK_DeviceActor.h index 366ed9ae4..ef5579015 100644 --- a/src/SVTK/SVTK_DeviceActor.h +++ b/src/SVTK/SVTK_DeviceActor.h @@ -47,6 +47,7 @@ class vtkShrinkFilter; class vtkFeatureEdges; class VTKViewer_DataSetMapper; class vtkPassThroughFilter; +class vtkAlgorithmOutput; #ifdef WIN32 #pragma warning ( disable:4251 ) @@ -79,7 +80,12 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor //! Allows to set initial #vtkDataSet virtual void - SetInput(vtkDataSet* theDataSet); + SetInputData(vtkDataSet* theDataSet); + + //! Allows to set initial #vtkAlgorithmOutput + virtual + void + SetInputConnection(vtkAlgorithmOutput* theAlgorithmOutput); /** @name For selection mapping purpose */ //@{ -- 2.39.2