Commit 163dd74d authored by David Cole's avatar David Cole
Browse files

BUG: Reverting yesterday's automatic SetInput --> SetInputConnection change...

BUG: Reverting yesterday's automatic SetInput --> SetInputConnection change where it should not have been done... (actors and widgets only have SetInput and they should still use SetInput)
parent 099dcde4
......@@ -82,7 +82,7 @@ tprop.ShadowOn()
# Create a vtkCubeAxesActor2D. Use the outer edges of the bounding box to
# draw the axes. Add the actor to the renderer.
axes = vtk.vtkCubeAxesActor2D()
axes.SetInputConnection(normals.GetOutputPort())
axes.SetInput(normals.GetOutput())
axes.SetCamera(ren.GetActiveCamera())
axes.SetLabelFormat("%6.4g")
axes.SetFlyModeToOuterEdges()
......
......@@ -76,7 +76,7 @@ def SelectPolygons(object, event):
# Place the interactor initially. The input to a 3D widget is used to
# initially position and scale the widget. The "EndInteractionEvent" is
# observed which invokes the SelectPolygons callback.
boxWidget.SetInputConnection(glyph.GetOutputPort())
boxWidget.SetInput(glyph.GetOutput())
boxWidget.PlaceWidget()
boxWidget.AddObserver("EndInteractionEvent", SelectPolygons)
......
......@@ -58,7 +58,7 @@ picker.SetTolerance(0.005)
# The 3 image plane widgets are used to probe the dataset.
planeWidgetX = vtk.vtkImagePlaneWidget()
planeWidgetX.DisplayTextOn()
planeWidgetX.SetInputConnection(v16.GetOutputPort())
planeWidgetX.SetInput(v16.GetOutput())
planeWidgetX.SetPlaneOrientationToXAxes()
planeWidgetX.SetSliceIndex(32)
planeWidgetX.SetPicker(picker)
......@@ -68,7 +68,7 @@ prop1.SetColor(1, 0, 0)
planeWidgetY = vtk.vtkImagePlaneWidget()
planeWidgetY.DisplayTextOn()
planeWidgetY.SetInputConnection(v16.GetOutputPort())
planeWidgetY.SetInput(v16.GetOutput())
planeWidgetY.SetPlaneOrientationToYAxes()
planeWidgetY.SetSliceIndex(32)
planeWidgetY.SetPicker(picker)
......@@ -82,7 +82,7 @@ planeWidgetY.SetLookupTable(planeWidgetX.GetLookupTable())
# cross-hair cursor snapping to pixel centers
planeWidgetZ = vtk.vtkImagePlaneWidget()
planeWidgetZ.DisplayTextOn()
planeWidgetZ.SetInputConnection(v16.GetOutputPort())
planeWidgetZ.SetInput(v16.GetOutput())
planeWidgetZ.SetPlaneOrientationToZAxes()
planeWidgetZ.SetSliceIndex(46)
planeWidgetZ.SetPicker(picker)
......
......@@ -105,7 +105,7 @@ shifter.Update()
# Display a y-z plane.
#
imageActor = vtk.vtkImageActor()
imageActor.SetInputConnection(shifter.GetOutputPort())
imageActor.SetInput(shifter.GetOutput())
imageActor.VisibilityOn()
imageActor.SetDisplayExtent(31, 31, 0, 63, 0, 92)
imageActor.InterpolateOff()
......@@ -155,7 +155,7 @@ extract.ReleaseDataFlagOff()
#
imageActor2 = vtk.vtkImageActor()
imageActor2.SetInputConnection(extract.GetOutputPort())
imageActor2.SetInput(extract.GetOutput())
imageActor2.VisibilityOn()
imageActor2.SetDisplayExtent(31, 31, 0, 63, 0, 92)
imageActor2.InterpolateOff()
......@@ -184,7 +184,7 @@ itw.ProjectToPlaneOn()
itw.SetProjectionNormalToXAxes()
itw.SetProjectionPosition(pos)
itw.SetViewProp(imageActor)
itw.SetInputConnection(shifter.GetOutputPort())
itw.SetInput(shifter.GetOutput())
itw.SetInteractor(iren)
itw.PlaceWidget()
......@@ -208,7 +208,7 @@ itw.AutoCloseOn()
isw = vtk.vtkSplineWidget()
isw.SetCurrentRenderer(ren2)
isw.SetDefaultRenderer(ren2)
isw.SetInputConnection(extract.GetOutputPort())
isw.SetInput(extract.GetOutput())
isw.SetInteractor(iren)
bnds = imageActor2.GetBounds()
isw.PlaceWidget(bnds[0], bnds[1], bnds[2], bnds[3], bnds[4], bnds[5])
......
......@@ -62,7 +62,7 @@ def myCallback(obj, event):
planeWidget = vtk.vtkImplicitPlaneWidget()
planeWidget.SetInteractor(iren)
planeWidget.SetPlaceFactor(1.25)
planeWidget.SetInputConnection(glyph.GetOutputPort())
planeWidget.SetInput(glyph.GetOutput())
planeWidget.PlaceWidget()
planeWidget.AddObserver("InteractionEvent", myCallback)
......
......@@ -18,7 +18,7 @@ pl3d.Update()
# The plane widget is used probe the dataset.
pointWidget = vtk.vtkPointWidget()
pointWidget.SetInputConnection(pl3d.GetOutputPort())
pointWidget.SetInput(pl3d.GetOutput())
pointWidget.AllOff()
pointWidget.PlaceWidget()
point = vtk.vtkPolyData()
......
......@@ -17,7 +17,7 @@ pl3d.Update()
# The plane widget is used probe the dataset.
planeWidget = vtk.vtkPlaneWidget()
planeWidget.SetInputConnection(pl3d.GetOutputPort())
planeWidget.SetInput(pl3d.GetOutput())
planeWidget.NormalToXAxisOn()
planeWidget.SetResolution(20)
planeWidget.SetRepresentationToOutline()
......
......@@ -20,7 +20,7 @@ pl3d.Update()
# The line widget is used seed the streamlines.
lineWidget = vtk.vtkLineWidget()
seeds = vtk.vtkPolyData()
lineWidget.SetInputConnection(pl3d.GetOutputPort())
lineWidget.SetInput(pl3d.GetOutput())
lineWidget.SetAlignToYAxis()
lineWidget.PlaceWidget()
lineWidget.GetPolyData(seeds)
......@@ -51,7 +51,7 @@ streamline.VisibilityOff()
# The second line widget is used seed more streamlines.
lineWidget2 = vtk.vtkLineWidget()
seeds2 = vtk.vtkPolyData()
lineWidget2.SetInputConnection(pl3d.GetOutputPort())
lineWidget2.SetInput(pl3d.GetOutput())
lineWidget2.PlaceWidget()
lineWidget2.GetPolyData(seeds2)
lineWidget2.SetKeyPressActivationValue('L')
......
......@@ -102,7 +102,7 @@ def ClipVolumeRender(obj, event):
# Place the interactor initially. The output of the reader is used to
# place the box widget.
boxWidget.SetInputConnection(v16.GetOutputPort())
boxWidget.SetInput(v16.GetOutput())
boxWidget.PlaceWidget()
boxWidget.InsideOutOn()
boxWidget.AddObserver("StartInteractionEvent", StartInteraction)
......
......@@ -22,7 +22,7 @@ shiftScale.SetScale(0.07)
shiftScale.SetOutputScalarTypeToUnsignedChar()
ia = vtk.vtkImageActor()
ia.SetInputConnection(shiftScale.GetOutputPort())
ia.SetInput(shiftScale.GetOutput())
# Create the RenderWindow, Renderer and both Actors
ren = vtk.vtkRenderer()
......
......@@ -124,7 +124,7 @@ saggitalColors = vtk.vtkImageMapToColors()
saggitalColors.SetInputConnection(v16.GetOutputPort())
saggitalColors.SetLookupTable(bwLut)
saggital = vtk.vtkImageActor()
saggital.SetInputConnection(saggitalColors.GetOutputPort())
saggital.SetInput(saggitalColors.GetOutput())
saggital.SetDisplayExtent(32, 32, 0, 63, 0, 92)
# Create the second (axial) plane of the three planes. We use the same
......@@ -133,7 +133,7 @@ axialColors = vtk.vtkImageMapToColors()
axialColors.SetInputConnection(v16.GetOutputPort())
axialColors.SetLookupTable(hueLut)
axial = vtk.vtkImageActor()
axial.SetInputConnection(axialColors.GetOutputPort())
axial.SetInput(axialColors.GetOutput())
axial.SetDisplayExtent(0, 63, 0, 63, 46, 46)
# Create the third (coronal) plane of the three planes. We use the same
......@@ -142,7 +142,7 @@ coronalColors = vtk.vtkImageMapToColors()
coronalColors.SetInputConnection(v16.GetOutputPort())
coronalColors.SetLookupTable(satLut)
coronal = vtk.vtkImageActor()
coronal.SetInputConnection(coronalColors.GetOutputPort())
coronal.SetInput(coronalColors.GetOutput())
coronal.SetDisplayExtent(0, 63, 32, 32, 0, 92)
# It is convenient to create an initial view of the data. The FocalPoint
......
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