Exemplo n.º 1
0
 def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(
         self, module_manager,
         vtk.vtkArcPlotter(), 'Processing.',
         ('vtkPolyData',), ('vtkPolyData',),
         replaceDoc=True,
         inputFunctions=None, outputFunctions=None)
Exemplo n.º 2
0
bore.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/bore.vtk")
tuber = vtk.vtkTubeFilter()
tuber.SetInputConnection(bore.GetOutputPort())
tuber.SetNumberOfSides(6)
tuber.SetRadius(15)
mapBore = vtk.vtkPolyDataMapper()
mapBore.SetInputConnection(tuber.GetOutputPort())
mapBore.ScalarVisibilityOff()
boreActor = vtk.vtkActor()
boreActor.SetMapper(mapBore)
boreActor.GetProperty().SetColor(0,0,0)
# create the arc plots
#
track1 = vtk.vtkPolyDataReader()
track1.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/track1.binary.vtk")
ap = vtk.vtkArcPlotter()
ap.SetInputConnection(track1.GetOutputPort())
ap.SetCamera(camera)
ap.SetRadius(250.0)
ap.SetHeight(200.0)
ap.UseDefaultNormalOn()
ap.SetDefaultNormal(1,1,0)
mapArc = vtk.vtkPolyDataMapper()
mapArc.SetInputConnection(ap.GetOutputPort())
arcActor = vtk.vtkActor()
arcActor.SetMapper(mapArc)
arcActor.GetProperty().SetColor(0,1,0)
track2 = vtk.vtkPolyDataReader()
track2.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/track2.binary.vtk")
ap2 = vtk.vtkArcPlotter()
ap2.SetInputConnection(track2.GetOutputPort())