API Reference for Enthought Tool Suite 3.0.1
ivtk - Interactive TVTK.
A utility module that makes VTK/TVTK easier to use from the Python interpreter. For a standalone application simply run this file. To use this under IPython (with -wthread) use the viewer() helper function or use the IVTK class. The widget can also make use of the tvtk pipeline browser.
Here is example usage of the viewer along with tvtk under IPython:
>>> from enthought.tvtk.tools import ivtk >>> from enthought.tvtk.api import tvtk >>> cs = tvtk.ConeSource() >>> m = tvtk.PolyDataMapper() >>> m.input = cs.output >>> a = tvtk.Actor() >>> a.mapper = m >>> v = ivtk.viewer() >>> v.scene.add_actors(a) >>> v.scene.reset_zoom()
scene_icon = mk_scene_icon()
Creates an IVTK instance, opens the window and returns the embedded scene inside it. This is useful from an IPython/vanilla Python shell. It returns the viewer window instance.
browser : bool (default, True)
If True, creates an IVTK scene with an embedded PipelineBrowser. If False, does not create it.
instantiate_gui : bool (default: False)
If True, create an instance of GUI(). This is useful when this function is invoked from within an IPython shell. OTOH, if this is called from within a wxPython app (or with ipython -wthread) you don't want to start another GUI instance.
© Copyright 2002-2008 Enthought, Inc.