Commit 1ece67f0 authored by David Gobbi's avatar David Gobbi
Browse files

ENH: Make python vtk module use Connection for inputs.

In VTK 6, the SetInput method will be gone.  In commit 0061b2d5,
the SetInput calls were replaced by SetInputConnection.
The purpose of this commit is to backport all VTK-5 compatible
parts of that commit to the VTK 5.10 release.

Change-Id: I2ca67735e29ea3ff41b2af095f3cf891caca0421
parent bee52a20
...@@ -521,7 +521,7 @@ def main(): ...@@ -521,7 +521,7 @@ def main():
cone = vtk.vtkConeSource() cone = vtk.vtkConeSource()
cone.SetResolution(80) cone.SetResolution(80)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
#coneActor = vtk.vtkLODActor() #coneActor = vtk.vtkLODActor()
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -280,7 +280,7 @@ def main(): ...@@ -280,7 +280,7 @@ def main():
cone = vtk.vtkConeSource() cone = vtk.vtkConeSource()
cone.SetResolution(80) cone.SetResolution(80)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
#coneActor = vtk.vtkLODActor() #coneActor = vtk.vtkLODActor()
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -505,7 +505,7 @@ def main(): ...@@ -505,7 +505,7 @@ def main():
cone = vtk.vtkConeSource() cone = vtk.vtkConeSource()
cone.SetResolution(80) cone.SetResolution(80)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
#coneActor = vtk.vtkLODActor() #coneActor = vtk.vtkLODActor()
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -273,7 +273,7 @@ def main(): ...@@ -273,7 +273,7 @@ def main():
cone = vtk.vtkConeSource() cone = vtk.vtkConeSource()
cone.SetResolution(80) cone.SetResolution(80)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
#coneActor = vtk.vtkLODActor() #coneActor = vtk.vtkLODActor()
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -457,7 +457,7 @@ def QVTKRenderWidgetConeExample(): ...@@ -457,7 +457,7 @@ def QVTKRenderWidgetConeExample():
cone.SetResolution(8) cone.SetResolution(8)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -330,7 +330,7 @@ def QVTKRenderWidgetConeExample(): ...@@ -330,7 +330,7 @@ def QVTKRenderWidgetConeExample():
cone.SetResolution(8) cone.SetResolution(8)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -368,7 +368,7 @@ def QVTKRenderWidgetConeExample(): ...@@ -368,7 +368,7 @@ def QVTKRenderWidgetConeExample():
cone.SetResolution(8) cone.SetResolution(8)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -450,7 +450,7 @@ def vtkRenderWidgetConeExample(): ...@@ -450,7 +450,7 @@ def vtkRenderWidgetConeExample():
cone.SetResolution(8) cone.SetResolution(8)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -377,7 +377,7 @@ def vtkRenderWindowInteractorConeExample(): ...@@ -377,7 +377,7 @@ def vtkRenderWindowInteractorConeExample():
cone.SetResolution(8) cone.SetResolution(8)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -748,7 +748,7 @@ def wxVTKRenderWindowConeExample(): ...@@ -748,7 +748,7 @@ def wxVTKRenderWindowConeExample():
cone.SetResolution(8) cone.SetResolution(8)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
...@@ -695,7 +695,7 @@ def wxVTKRenderWindowInteractorConeExample(): ...@@ -695,7 +695,7 @@ def wxVTKRenderWindowInteractorConeExample():
cone.SetResolution(8) cone.SetResolution(8)
coneMapper = vtk.vtkPolyDataMapper() coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput()) coneMapper.SetInputConnection(cone.GetOutputPort())
coneActor = vtk.vtkActor() coneActor = vtk.vtkActor()
coneActor.SetMapper(coneMapper) coneActor.SetMapper(coneMapper)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment