2 from wxPython
.wx
import *
4 from wxPython
.lib
import vtk
9 #----------------------------------------------------------------------
12 cone
= vtk
.vtkConeSource()
13 cone
.SetResolution(128)
14 coneMapper
= vtk
.vtkPolyDataMapper()
15 coneMapper
.SetInput(cone
.GetOutput())
16 coneActor
= vtk
.vtkActor()
17 coneActor
.SetMapper(coneMapper
)
19 ren
= vtk
.vtkRenderer()
20 vtkwin
.GetRenderWindow().AddRenderer(ren
)
21 ren
.AddActor(coneActor
)
24 #----------------------------------------------------------------------
26 def runTest(frame
, nb
, log
):
28 f
= wxFrame(frame
, -1, "wxVTKRenderWindow", size
=(450, 300),
29 style
=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE
)
30 win
= vtk
.wxVTKRenderWindow(f
, -1)
39 wxMessageBox("Unable to import VTK, which is a required component\n"
40 "of this demo. You need to download and install the\n"
41 "Python extension module for VTK from http://www.kitware.com/",
45 #----------------------------------------------------------------------
49 wxVTKRenderWindow is a wrapper around the vtkRenderWindow from the
50 VTK Visualization Toolkit. The VTK Python extensions are required,
51 they can be obtained from http://www.kitware.com/ where you can also
52 find some nifty pictures and stuff.