def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk.vtkStreamPoints(), 'Processing.', ('vtkDataSet', 'vtkDataSet'), ('vtkPolyData',), replaceDoc=True, inputFunctions=None, outputFunctions=None)
def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__(self, module_manager, vtk.vtkStreamPoints(), 'Processing.', ('vtkDataSet', 'vtkDataSet'), ('vtkPolyData', ), replaceDoc=True, inputFunctions=None, outputFunctions=None)
# to add coverage for vtkOnePieceExtentTranslator translator = vtk.vtkOnePieceExtentTranslator() #[reader GetOutput] SetExtentTranslator translator OutInfo = reader.GetOutputInformation(0) sddp = vtk.vtkStreamingDemandDrivenPipeline() sddp.SetExtentTranslator(OutInfo, translator) outline = vtk.vtkStructuredGridOutlineFilter() # outline SetInputConnection [reader GetOutputPort] outline.SetInputData(reader.GetOutput().GetBlock(0)) mapOutline = vtk.vtkPolyDataMapper() mapOutline.SetInputConnection(outline.GetOutputPort()) outlineActor = vtk.vtkActor() outlineActor.SetMapper(mapOutline) outlineActor.GetProperty().SetColor(0, 0, 0) # Create source for streamtubes streamer = vtk.vtkStreamPoints() # streamer SetInputConnection [reader GetOutputPort] streamer.SetInputData(reader.GetOutput().GetBlock(0)) streamer.SetStartPosition(0.1, 2.1, 0.5) streamer.SetMaximumPropagationTime(500) streamer.SetTimeIncrement(0.5) streamer.SetIntegrationDirectionToForward() cone = vtk.vtkConeSource() cone.SetResolution(8) cones = vtk.vtkGlyph3D() cones.SetInputConnection(streamer.GetOutputPort()) cones.SetSourceConnection(cone.GetOutputPort()) cones.SetScaleFactor(0.9) cones.SetScaleModeToScaleByVector() mapCones = vtk.vtkPolyDataMapper() mapCones.SetInputConnection(cones.GetOutputPort())
mapInlet.SetInputConnection(inlet.GetOutputPort()) mapInlet.ScalarVisibilityOff() inletActor = vtk.vtkActor() inletActor.SetMapper(mapInlet) inletActor.GetProperty().SetColor(0, 0, 0) outline = vtk.vtkStructuredGridOutlineFilter() outline.SetInputConnection(reader.GetOutputPort()) mapOutline = vtk.vtkPolyDataMapper() mapOutline.SetInputConnection(outline.GetOutputPort()) outlineActor = vtk.vtkActor() outlineActor.SetMapper(mapOutline) outlineActor.GetProperty().SetColor(0, 0, 0) # Create source for streamtubes streamer = vtk.vtkStreamPoints() streamer.SetInputConnection(reader.GetOutputPort()) streamer.SetStartPosition(0.1, 2.1, 0.5) streamer.SetMaximumPropagationTime(500) streamer.SetTimeIncrement(0.5) streamer.SetIntegrationDirectionToForward() cone = vtk.vtkConeSource() cone.SetResolution(8) cones = vtk.vtkGlyph3D() cones.SetInputConnection(streamer.GetOutputPort()) cones.SetSourceConnection(cone.GetOutputPort()) cones.SetScaleFactor(0.5) cones.SetScaleModeToScaleByVector() mapCones = vtk.vtkPolyDataMapper()