Commit fd3c2180 authored by David Cole's avatar David Cole

ENH: Change pipeline usage pattern (under Examples and */Testing only) from...

ENH: Change pipeline usage pattern (under Examples and */Testing only) from old style a.SetInput(b.GetOutput()) to a.SetInputConnection(b.GetOutputPort())... Changes were made by automatic replacement via regular expression matching in tcl, py, cxx and java files. Files under Examples (especially tcl and py scripts) need more review since they don't automatically run on any dashboards. Additionally, some SetInput calls may still remain. Reason for making these changes: consistency, to be good examples to people trying to learn the new pipeline.
parent f604bfa9
......@@ -8,7 +8,7 @@ import vtk
sphere = vtk.vtkSphereSource()
sphereMapper = vtk.vtkPolyDataMapper()
sphereMapper.SetInput(sphere.GetOutput())
sphereMapper.SetInputConnection(sphere.GetOutputPort())
sphereMapper.GlobalImmediateModeRenderingOn()
sphereActor = vtk.vtkLODActor()
sphereActor.SetMapper(sphereMapper)
......
......@@ -9,7 +9,7 @@ import vtk
sphere = vtk.vtkSphereSource()
sphereMapper = vtk.vtkPolyDataMapper()
sphereMapper.SetInput(sphere.GetOutput())
sphereMapper.SetInputConnection(sphere.GetOutputPort())
sphereMapper.GlobalImmediateModeRenderingOn()
sphereActor = vtk.vtkLODActor()
sphereActor.SetMapper(sphereMapper)
......
......@@ -8,7 +8,7 @@ import vtk
# create a sphere source, mapper, and actor
sphere = vtk.vtkSphereSource()
sphereMapper = vtk.vtkPolyDataMapper()
sphereMapper.SetInput(sphere.GetOutput())
sphereMapper.SetInputConnection(sphere.GetOutputPort())
sphereMapper.GlobalImmediateModeRenderingOn()
sphereActor = vtk.vtkLODActor()
sphereActor.SetMapper(sphereMapper)
......@@ -17,13 +17,13 @@ sphereActor.SetMapper(sphereMapper)
# mapper and actor for the glyphs.
cone = vtk.vtkConeSource()
glyph = vtk.vtkGlyph3D()
glyph.SetInput(sphere.GetOutput())
glyph.SetInputConnection(sphere.GetOutputPort())
glyph.SetSource(cone.GetOutput())
glyph.SetVectorModeToUseNormal()
glyph.SetScaleModeToScaleByVector()
glyph.SetScaleFactor(0.25)
spikeMapper = vtk.vtkPolyDataMapper()
spikeMapper.SetInput(glyph.GetOutput())
spikeMapper.SetInputConnection(glyph.GetOutputPort())
spikeActor = vtk.vtkLODActor()
spikeActor.SetMapper(spikeMapper)
......
......@@ -16,19 +16,19 @@ fohe.SetGeometryFileName(VTK_DATA_ROOT + "/Data/teapot.g")
# Create a vtkPolyDataNormals filter to calculate the normals of the
# data set.
normals = vtk.vtkPolyDataNormals()
normals.SetInput(fohe.GetOutput())
normals.SetInputConnection(fohe.GetOutputPort())
# Set up the associated mapper and actor.
foheMapper = vtk.vtkPolyDataMapper()
foheMapper.SetInput(normals.GetOutput())
foheMapper.SetInputConnection(normals.GetOutputPort())
foheActor = vtk.vtkLODActor()
foheActor.SetMapper(foheMapper)
# Create a vtkOutlineFilter to draw the bounding box of the data set.
# Also create the associated mapper and actor.
outline = vtk.vtkOutlineFilter()
outline.SetInput(normals.GetOutput())
outline.SetInputConnection(normals.GetOutputPort())
mapOutline = vtk.vtkPolyDataMapper()
mapOutline.SetInput(outline.GetOutput())
mapOutline.SetInputConnection(outline.GetOutputPort())
outlineActor = vtk.vtkActor()
outlineActor.SetMapper(mapOutline)
outlineActor.GetProperty().SetColor(0, 0, 0)
......@@ -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.SetInput(normals.GetOutput())
axes.SetInputConnection(normals.GetOutputPort())
axes.SetCamera(ren.GetActiveCamera())
axes.SetLabelFormat("%6.4g")
axes.SetFlyModeToOuterEdges()
......
......@@ -39,14 +39,14 @@ rectActor.SetMapper(rectMapper)
# Create a sphere and its associated mapper and actor.
sphere = vtk.vtkSphereSource()
sphereMapper = vtk.vtkPolyDataMapper()
sphereMapper.SetInput(sphere.GetOutput())
sphereMapper.SetInputConnection(sphere.GetOutputPort())
sphereMapper.GlobalImmediateModeRenderingOn()
sphereActor = vtk.vtkActor()
sphereActor.SetMapper(sphereMapper)
# Generate data arrays containing point and cell ids
ids = vtk.vtkIdFilter()
ids.SetInput(sphere.GetOutput())
ids.SetInputConnection(sphere.GetOutputPort())
ids.PointIdsOn()
ids.CellIdsOn()
ids.FieldDataOn()
......@@ -56,7 +56,7 @@ ren = vtk.vtkRenderer()
# Create labels for points
visPts = vtk.vtkSelectVisiblePoints()
visPts.SetInput(ids.GetOutput())
visPts.SetInputConnection(ids.GetOutputPort())
visPts.SetRenderer(ren)
visPts.SelectionWindowOn()
visPts.SetSelection(xmin, xmin + xLength, ymin, ymin + yLength)
......@@ -64,7 +64,7 @@ visPts.SetSelection(xmin, xmin + xLength, ymin, ymin + yLength)
# Create the mapper to display the point ids. Specify the format to
# use for the labels. Also create the associated actor.
ldm = vtk.vtkLabeledDataMapper()
ldm.SetInput(visPts.GetOutput())
ldm.SetInputConnection(visPts.GetOutputPort())
ldm.SetLabelFormat("%g")
ldm.SetLabelModeToLabelFieldData()
pointLabels = vtk.vtkActor2D()
......@@ -72,9 +72,9 @@ pointLabels.SetMapper(ldm)
# Create labels for cells
cc = vtk.vtkCellCenters()
cc.SetInput(ids.GetOutput())
cc.SetInputConnection(ids.GetOutputPort())
visCells = vtk.vtkSelectVisiblePoints()
visCells.SetInput(cc.GetOutput())
visCells.SetInputConnection(cc.GetOutputPort())
visCells.SetRenderer(ren)
visCells.SelectionWindowOn()
visCells.SetSelection(xmin, xmin + xLength, ymin, ymin + yLength)
......@@ -82,7 +82,7 @@ visCells.SetSelection(xmin, xmin + xLength, ymin, ymin + yLength)
# Create the mapper to display the cell ids. Specify the format to
# use for the labels. Also create the associated actor.
cellMapper = vtk.vtkLabeledDataMapper()
cellMapper.SetInput(visCells.GetOutput())
cellMapper.SetInputConnection(visCells.GetOutputPort())
cellMapper.SetLabelFormat("%g")
cellMapper.SetLabelModeToLabelFieldData()
cellMapper.GetLabelTextProperty().SetColor(0, 1, 0)
......
......@@ -11,7 +11,7 @@ import vtk
axes = vtk.vtkAxes()
axes.SetOrigin(0, 0, 0)
axesMapper = vtk.vtkPolyDataMapper()
axesMapper.SetInput(axes.GetOutput())
axesMapper.SetInputConnection(axes.GetOutputPort())
axesActor = vtk.vtkActor()
axesActor.SetMapper(axesMapper)
......@@ -21,7 +21,7 @@ axesActor.SetMapper(axesMapper)
atext = vtk.vtkVectorText()
atext.SetText("Origin")
textMapper = vtk.vtkPolyDataMapper()
textMapper.SetInput(atext.GetOutput())
textMapper.SetInputConnection(atext.GetOutputPort())
textActor = vtk.vtkFollower()
textActor.SetMapper(textMapper)
textActor.SetScale(0.2, 0.2, 0.2)
......
......@@ -30,10 +30,10 @@ transL1.Translate(3.7, 0.0, 28.37)
transL1.Scale(5, 5, 5)
transL1.RotateY(90)
tf = vtk.vtkTransformPolyDataFilter()
tf.SetInput(line.GetOutput())
tf.SetInputConnection(line.GetOutputPort())
tf.SetTransform(transL1)
probe = vtk.vtkProbeFilter()
probe.SetInput(tf.GetOutput())
probe.SetInputConnection(tf.GetOutputPort())
probe.SetSource(pl3d.GetOutput())
# Move the line again and create another probe filter.
......@@ -42,10 +42,10 @@ transL2.Translate(9.2, 0.0, 31.20)
transL2.Scale(5, 5, 5)
transL2.RotateY(90)
tf2 = vtk.vtkTransformPolyDataFilter()
tf2.SetInput(line.GetOutput())
tf2.SetInputConnection(line.GetOutputPort())
tf2.SetTransform(transL2)
probe2 = vtk.vtkProbeFilter()
probe2.SetInput(tf2.GetOutput())
probe2.SetInputConnection(tf2.GetOutputPort())
probe2.SetSource(pl3d.GetOutput())
# Move the line again and create a third probe filter.
......@@ -54,10 +54,10 @@ transL3.Translate(13.27, 0.0, 33.40)
transL3.Scale(4.5, 4.5, 4.5)
transL3.RotateY(90)
tf3 = vtk.vtkTransformPolyDataFilter()
tf3.SetInput(line.GetOutput())
tf3.SetInputConnection(line.GetOutputPort())
tf3.SetTransform(transL3)
probe3 = vtk.vtkProbeFilter()
probe3.SetInput(tf3.GetOutput())
probe3.SetInputConnection(tf3.GetOutputPort())
probe3.SetSource(pl3d.GetOutput())
# Create a vtkAppendPolyData to merge the output of the three probe
......@@ -70,10 +70,10 @@ appendF.AddInput(probe3.GetPolyDataOutput())
# Create a tube filter to represent the lines as tubes. Set up the
# associated mapper and actor.
tuber = vtk.vtkTubeFilter()
tuber.SetInput(appendF.GetOutput())
tuber.SetInputConnection(appendF.GetOutputPort())
tuber.SetRadius(0.1)
lineMapper = vtk.vtkPolyDataMapper()
lineMapper.SetInput(tuber.GetOutput())
lineMapper.SetInputConnection(tuber.GetOutputPort())
lineActor = vtk.vtkActor()
lineActor.SetMapper(lineMapper)
......@@ -150,9 +150,9 @@ xyplot3.SetAxisLabelTextProperty(tprop)
# Draw an outline of the PLOT3D data set.
outline = vtk.vtkStructuredGridOutlineFilter()
outline.SetInput(pl3d.GetOutput())
outline.SetInputConnection(pl3d.GetOutputPort())
outlineMapper = vtk.vtkPolyDataMapper()
outlineMapper.SetInput(outline.GetOutput())
outlineMapper.SetInputConnection(outline.GetOutputPort())
outlineActor = vtk.vtkActor()
outlineActor.SetMapper(outlineMapper)
outlineActor.GetProperty().SetColor(0, 0, 0)
......
......@@ -11,7 +11,7 @@ package require vtkinteraction
vtkSphereSource sphere
vtkPolyDataMapper sphereMapper
sphereMapper SetInput [sphere GetOutput]
sphereMapper SetInputConnection [sphere GetOutputPort]
sphereMapper GlobalImmediateModeRenderingOn
vtkLODActor sphereActor
sphereActor SetMapper sphereMapper
......
......@@ -11,7 +11,7 @@ package require vtkinteraction
vtkSphereSource sphere
vtkPolyDataMapper sphereMapper
sphereMapper SetInput [sphere GetOutput]
sphereMapper SetInputConnection [sphere GetOutputPort]
sphereMapper GlobalImmediateModeRenderingOn
vtkLODActor sphereActor
sphereActor SetMapper sphereMapper
......
......@@ -13,7 +13,7 @@ package require vtkinteraction
vtkSphereSource sphere
vtkPolyDataMapper sphereMapper
sphereMapper SetInput [sphere GetOutput]
sphereMapper SetInputConnection [sphere GetOutputPort]
sphereMapper GlobalImmediateModeRenderingOn
vtkLODActor sphereActor
sphereActor SetMapper sphereMapper
......@@ -22,13 +22,13 @@ vtkLODActor sphereActor
# and actor for the glyphs.
vtkConeSource cone
vtkGlyph3D glyph
glyph SetInput [sphere GetOutput]
glyph SetInputConnection [sphere GetOutputPort]
glyph SetSource [cone GetOutput]
glyph SetVectorModeToUseNormal
glyph SetScaleModeToScaleByVector
glyph SetScaleFactor 0.25
vtkPolyDataMapper spikeMapper
spikeMapper SetInput [glyph GetOutput]
spikeMapper SetInputConnection [glyph GetOutputPort]
vtkLODActor spikeActor
spikeActor SetMapper spikeMapper
......
......@@ -16,19 +16,19 @@ vtkBYUReader fohe
fohe SetGeometryFileName "$VTK_DATA_ROOT/Data/teapot.g"
# Create a vtkPolyDataNormals filter to calculate the normals of the data set.
vtkPolyDataNormals normals
normals SetInput [fohe GetOutput]
normals SetInputConnection [fohe GetOutputPort]
# Set up the associated mapper and actor.
vtkPolyDataMapper foheMapper
foheMapper SetInput [normals GetOutput]
foheMapper SetInputConnection [normals GetOutputPort]
vtkLODActor foheActor
foheActor SetMapper foheMapper
# Create a vtkOutlineFilter to draw the bounding box of the data set. Also
# create the associated mapper and actor.
vtkOutlineFilter outline
outline SetInput [normals GetOutput]
outline SetInputConnection [normals GetOutputPort]
vtkPolyDataMapper mapOutline
mapOutline SetInput [outline GetOutput]
mapOutline SetInputConnection [outline GetOutputPort]
vtkActor outlineActor
outlineActor SetMapper mapOutline
[outlineActor GetProperty] SetColor 0 0 0
......@@ -84,7 +84,7 @@ vtkTextProperty tprop
# Create a vtkCubeAxesActor2D. Use the outer edges of the bounding box to
# draw the axes. Add the actor to the renderer.
vtkCubeAxesActor2D axes
axes SetInput [normals GetOutput]
axes SetInputConnection [normals GetOutputPort]
axes SetCamera [ren1 GetActiveCamera]
axes SetLabelFormat "%6.4g"
axes SetFlyModeToOuterEdges
......
......@@ -42,14 +42,14 @@ vtkActor2D rectActor
# Create a sphere and its associated mapper and actor.
vtkSphereSource sphere
vtkPolyDataMapper sphereMapper
sphereMapper SetInput [sphere GetOutput]
sphereMapper SetInputConnection [sphere GetOutputPort]
sphereMapper GlobalImmediateModeRenderingOn
vtkActor sphereActor
sphereActor SetMapper sphereMapper
# Generate data arrays containing point and cell ids
vtkIdFilter ids
ids SetInput [sphere GetOutput]
ids SetInputConnection [sphere GetOutputPort]
ids PointIdsOn
ids CellIdsOn
ids FieldDataOn
......@@ -59,7 +59,7 @@ vtkRenderer ren1
# Create labels for points
vtkSelectVisiblePoints visPts
visPts SetInput [ids GetOutput]
visPts SetInputConnection [ids GetOutputPort]
visPts SetRenderer ren1
visPts SelectionWindowOn
visPts SetSelection $xmin [expr $xmin + $xLength] \
......@@ -68,7 +68,7 @@ vtkSelectVisiblePoints visPts
# Create the mapper to display the point ids. Specify the
# format to use for the labels. Also create the associated actor.
vtkLabeledDataMapper ldm
ldm SetInput [visPts GetOutput]
ldm SetInputConnection [visPts GetOutputPort]
ldm SetLabelFormat "%g"
ldm SetLabelModeToLabelFieldData
vtkActor2D pointLabels
......@@ -76,9 +76,9 @@ vtkActor2D pointLabels
# Create labels for cells
vtkCellCenters cc
cc SetInput [ids GetOutput]
cc SetInputConnection [ids GetOutputPort]
vtkSelectVisiblePoints visCells
visCells SetInput [cc GetOutput]
visCells SetInputConnection [cc GetOutputPort]
visCells SetRenderer ren1
visCells SelectionWindowOn
visCells SetSelection $xmin [expr $xmin + $xLength] \
......@@ -86,7 +86,7 @@ vtkSelectVisiblePoints visCells
# Create the mapper to display the cell ids. Specify the
# format to use for the labels. Also create the associated actor.
vtkLabeledDataMapper cellMapper
cellMapper SetInput [visCells GetOutput]
cellMapper SetInputConnection [visCells GetOutputPort]
cellMapper SetLabelFormat "%g"
cellMapper SetLabelModeToLabelFieldData
[cellMapper GetLabelTextProperty] SetColor 0 1 0
......
......@@ -14,7 +14,7 @@ package require vtkinteraction
vtkAxes axes
axes SetOrigin 0 0 0
vtkPolyDataMapper axesMapper
axesMapper SetInput [axes GetOutput]
axesMapper SetInputConnection [axes GetOutputPort]
vtkActor axesActor
axesActor SetMapper axesMapper
......@@ -23,7 +23,7 @@ vtkActor axesActor
vtkVectorText atext
atext SetText "Origin"
vtkPolyDataMapper textMapper
textMapper SetInput [atext GetOutput]
textMapper SetInputConnection [atext GetOutputPort]
vtkFollower textActor
textActor SetMapper textMapper
textActor SetScale 0.2 0.2 0.2
......
......@@ -30,10 +30,10 @@ vtkTransform transL1
transL1 Scale 5 5 5
transL1 RotateY 90
vtkTransformPolyDataFilter tf
tf SetInput [line GetOutput]
tf SetInputConnection [line GetOutputPort]
tf SetTransform transL1
vtkProbeFilter probe
probe SetInput [tf GetOutput]
probe SetInputConnection [tf GetOutputPort]
probe SetSource [pl3d GetOutput]
# Move the line again and create another probe filter.
......@@ -42,10 +42,10 @@ vtkTransform transL2
transL2 Scale 5 5 5
transL2 RotateY 90
vtkTransformPolyDataFilter tf2
tf2 SetInput [line GetOutput]
tf2 SetInputConnection [line GetOutputPort]
tf2 SetTransform transL2
vtkProbeFilter probe2
probe2 SetInput [tf2 GetOutput]
probe2 SetInputConnection [tf2 GetOutputPort]
probe2 SetSource [pl3d GetOutput]
# Move the line again and create a third probe filter.
......@@ -54,10 +54,10 @@ vtkTransform transL3
transL3 Scale 4.5 4.5 4.5
transL3 RotateY 90
vtkTransformPolyDataFilter tf3
tf3 SetInput [line GetOutput]
tf3 SetInputConnection [line GetOutputPort]
tf3 SetTransform transL3
vtkProbeFilter probe3
probe3 SetInput [tf3 GetOutput]
probe3 SetInputConnection [tf3 GetOutputPort]
probe3 SetSource [pl3d GetOutput]
# Create a vtkAppendPolyData to merge the output of the three probe filters
......@@ -70,10 +70,10 @@ vtkAppendPolyData appendF
# Create a tube filter to represent the lines as tubes. Set up the associated
# mapper and actor.
vtkTubeFilter tuber
tuber SetInput [appendF GetOutput]
tuber SetInputConnection [appendF GetOutputPort]
tuber SetRadius 0.1
vtkPolyDataMapper lineMapper
lineMapper SetInput [tuber GetOutput]
lineMapper SetInputConnection [tuber GetOutputPort]
vtkActor lineActor
lineActor SetMapper lineMapper
......@@ -150,9 +150,9 @@ vtkXYPlotActor xyplot3
# Draw an outline of the PLOT3D data set.
vtkStructuredGridOutlineFilter outline
outline SetInput [pl3d GetOutput]
outline SetInputConnection [pl3d GetOutputPort]
vtkPolyDataMapper outlineMapper
outlineMapper SetInput [outline GetOutput]
outlineMapper SetInputConnection [outline GetOutputPort]
vtkActor outlineActor
outlineActor SetMapper outlineMapper
[outlineActor GetProperty] SetColor 0 0 0
......
......@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
// to the input of this mapper
//
vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
coneMapper->SetInput(cone->GetOutput());
coneMapper->SetInputConnection(cone->GetOutputPort());
//
// Create an actor to represent the cone. The actor coordinates rendering of
......
......@@ -34,7 +34,7 @@ cone SetResolution 10
# to the input of this mapper
#
vtkPolyDataMapper coneMapper
coneMapper SetInput [cone GetOutput]
coneMapper SetInputConnection [cone GetOutputPort]
#
# Create an actor to represent the cone. The actor coordinates rendering of
......
......@@ -80,7 +80,7 @@ int main()
plane->SetExtent(0,46, 16,16, 0,43);
vtkPolyDataMapper *rgridMapper = vtkPolyDataMapper::New();
rgridMapper->SetInput(plane->GetOutput());
rgridMapper->SetInputConnection(plane->GetOutputPort());
vtkActor *wireActor = vtkActor::New();
wireActor->SetMapper(rgridMapper);
......
......@@ -88,7 +88,7 @@ int main()
hedgehog->SetScaleFactor(0.1);
vtkPolyDataMapper *sgridMapper = vtkPolyDataMapper::New();
sgridMapper->SetInput(hedgehog->GetOutput());
sgridMapper->SetInputConnection(hedgehog->GetOutputPort());
vtkActor *sgridActor = vtkActor::New();
sgridActor->SetMapper(sgridMapper);
sgridActor->GetProperty()->SetColor(0,0,0);
......
......@@ -121,7 +121,7 @@ dos.SetExecuteMethod(parseFile)
# DataObjectToDataSetFilter can create geometry using fields from
# DataObject's FieldData
do2ds = vtk.vtkDataObjectToDataSetFilter()
do2ds.SetInput(dos.GetOutput())
do2ds.SetInputConnection(dos.GetOutputPort())
# We are generating polygonal data
do2ds.SetDataSetTypeToPolyData()
do2ds.DefaultNormalizeOn()
......@@ -133,7 +133,7 @@ do2ds.SetPointComponent(2, zAxis, 0)
# RearrangeFields is used to move fields between DataObject's
# FieldData, PointData and CellData.
rf = vtk.vtkRearrangeFields()
rf.SetInput(do2ds.GetOutput())
rf.SetInputConnection(do2ds.GetOutputPort())
# Add an operation to "move TIME_LATE from DataObject's FieldData to
# PointData"
rf.AddOperation("MOVE", scalar, "DATA_OBJECT", "POINT_DATA")
......@@ -147,7 +147,7 @@ max = rf.GetOutput().GetPointData().GetArray(scalar).GetRange()[1]
# Use an ArrayCalculator to normalize TIME_LATE
calc = vtk.vtkArrayCalculator()
calc.SetInput(rf.GetOutput())
calc.SetInputConnection(rf.GetOutputPort())
# Working on point data
calc.SetAttributeModeToUsePointData()
# Map scalar to s. When setting function, we can use s to
......@@ -160,24 +160,24 @@ calc.SetResultArrayName("resArray")
# Use AssignAttribute to make resArray the active scalar field
aa = vtk.vtkAssignAttribute()
aa.SetInput(calc.GetOutput())
aa.SetInputConnection(calc.GetOutputPort())
aa.Assign("resArray", "SCALARS", "POINT_DATA")
aa.Update()
# construct pipeline for original population
# GaussianSplatter -> Contour -> Mapper -> Actor
popSplatter = vtk.vtkGaussianSplatter()
popSplatter.SetInput(aa.GetOutput())
popSplatter.SetInputConnection(aa.GetOutputPort())
popSplatter.SetSampleDimensions(50, 50, 50)
popSplatter.SetRadius(0.05)
popSplatter.ScalarWarpingOff()
popSurface = vtk.vtkContourFilter()
popSurface.SetInput(popSplatter.GetOutput())
popSurface.SetInputConnection(popSplatter.GetOutputPort())
popSurface.SetValue(0, 0.01)
popMapper = vtk.vtkPolyDataMapper()
popMapper.SetInput(popSurface.GetOutput())
popMapper.SetInputConnection(popSurface.GetOutputPort())
popMapper.ScalarVisibilityOff()
popActor = vtk.vtkActor()
......@@ -197,12 +197,12 @@ def CreateAxes():
axes.SetScaleFactor(popSplatter.GetOutput().GetLength()/5.0)
axesTubes = vtk.vtkTubeFilter()
axesTubes.SetInput(axes.GetOutput())
axesTubes.SetInputConnection(axes.GetOutputPort())
axesTubes.SetRadius(axes.GetScaleFactor()/25.0)
axesTubes.SetNumberOfSides(6)
axesMapper = vtk.vtkPolyDataMapper()
axesMapper.SetInput(axesTubes.GetOutput())
axesMapper.SetInputConnection(axesTubes.GetOutputPort())
axesActor = vtk.vtkActor()