def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk.vtkVoxelContoursToSurfaceFilter(), 'Processing.', ('vtkPolyData',), ('vtkPolyData',), replaceDoc=True, inputFunctions=None, outputFunctions=None)
def contourSequence2Polygons(cs): linesPolyData = drt2polylines.contourSequence2PolyLines(cs) f = vtk.vtkVoxelContoursToSurfaceFilter() f.SetInputData(linesPolyData) f.Update() return f.GetOutputDataObject(0)
def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, vtk.vtkVoxelContoursToSurfaceFilter(), 'Processing.', ('vtkPolyData', ), ('vtkPolyData', ), replaceDoc=True, inputFunctions=None, outputFunctions=None)
contourActor.GetProperty().SetColor(1, 0, 0) contourActor.GetProperty().SetAmbient(1) contourActor.GetProperty().SetDiffuse(0) contourActor.GetProperty().SetRepresentationToWireframe() ren1.AddViewProp(contourActor) ren1.ResetCamera() ren1.GetActiveCamera().Azimuth(10) ren1.GetActiveCamera().Elevation(30) ren1.ResetCameraClippingRange() renWin.SetSize(300, 300) renWin.Render() renWin.Render() # prevent the tk window from showing up then start the event loop # # Create the contour to surface filter # f = vtk.vtkVoxelContoursToSurfaceFilter() f.SetInputData(contours) f.SetMemoryLimitInBytes(100000) m = vtk.vtkPolyDataMapper() m.SetInputConnection(f.GetOutputPort()) m.ScalarVisibilityOff() m.ImmediateModeRenderingOn() a = vtk.vtkActor() a.SetMapper(m) ren1.AddViewProp(a) contourActor.VisibilityOff() ren1.SetBackground(.1, .2, .4) renWin.Render() # --- end of script --
contourActor.GetProperty().SetRepresentationToWireframe() ren1.AddViewProp(contourActor) ren1.ResetCamera() ren1.GetActiveCamera().Azimuth(10) ren1.GetActiveCamera().Elevation(30) ren1.ResetCameraClippingRange() renWin.SetSize(300, 300) renWin.Render() # renWin.Render() # Create the contour to surface filter # f = vtk.vtkVoxelContoursToSurfaceFilter() f.SetInputData(contours) f.SetMemoryLimitInBytes(100000) m = vtk.vtkPolyDataMapper() m.SetInputConnection(f.GetOutputPort()) m.ScalarVisibilityOff() m.ImmediateModeRenderingOn() a = vtk.vtkActor() a.SetMapper(m) ren1.AddViewProp(a) contourActor.VisibilityOff()