[vtkusers] Problem with vtkTkRenderWidget

RimAY rim.ayari at gmail.com
Thu Feb 26 05:36:06 EST 2009



Hi, I'm trying to work with vtkTkRenderWidget class.This is my code: 

from vtk import*
from Tkinter import*
from vtkTkRenderWidget import*
import time
import thread

source = vtkSphereSource()

mapper = vtkPolyDataMapper()
mapper.SetInput(source.GetOutput())

actor = vtkActor()
actor.SetMapper(mapper)

# create root window
root = Tk()

# create vtkTkRenderWidget
pane = vtkTkRenderWidget(root,width=300,height=300)

ren = vtkRenderer()
renWin = pane.GetRenderWindow()
renWin.AddRenderer(ren)

ren.AddActor(actor)

# pack the pane into the tk root
pane.pack()

# start the tk mainloop
thread.start_new_thread(root.mainloop, ()) 
#---------------------------------------- 

I get this error message when i execute the line 'pane =
vtkTkRenderWidget(root,width=300,height=300)':

Microsoft Visual C++ Runtime Library

Runtime Error!
Program: C:\Python24\pythonw.exe
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information

Any help will be very appreciated, thanks
 

-- 
View this message in context: http://www.nabble.com/Problem-with-vtkTkRenderWidget-tp22221552p22221552.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list