event loops using tkinter & VTK

Heather A. Drury heather at thalamus.wustl.edu
Mon Apr 12 17:22:08 EDT 1999


Hi,

I'm trying to write of a general-purpose volume slice viewer
using VTK and python with Tkinter.  I've got most of it working 
(with David Gobbi's vtkImageReslice).  

I am trying to design the software so that the current slice can be
changed using a slider (this works) and the slice image can
be zoomed/panned by clicking in the vtkRender window and continuously 
capturing mouse events (middle mouse = zoom, for example). 
Currently, I can *either* use the tkinter slider to change the slice
*or* remap the buttons in the vtkRenderWindowInteractor function to 
zoom/pan (although how do I do continuous polling?), but not both
simultaneously (as they have independent event loops).

Can I create one big event loop that can deal with both continuous
cursor reading from the vtkRender window and interactions with the tkinter
slider window?

I hope this is somewhat clear.  I'm also not sure if this should be posted 
in the python or vtk groups, so I'm posting to both...

TIA for any pointers/suggestions,

Heather




More information about the Python-list mailing list