[vtkusers] Using widgets in a vtkTkRenderWidget?

tom fogal tfogal at apollo.sr.unh.edu
Mon Jun 28 10:35:00 EDT 2004


David,

	Perhaps you could use multiple threads? One thread for your GUI event loop
and one thread for a vtkRenderWindowInteractor. Just be careful not to interact
too much with VTK in the GUI event loop, or rather just be sure the methods
you are calling are thread safe (they are labeled as much in the header files,
for the most part). If you're just sharing variables among the two, I imagine
this won't be much of a problem anyway.

HTH,

-tom

 <99b24d680406260238528ed179 at mail.gmail.com>david ignacio writes:
>I am building a vtk application that requires a GUI.  I have both the
>GUI written in Tkinter and the Viz written in python/VTK.  They both
>work individually, but ultimately share common variables.
>The problem is that they both have event handling loops.  In an
>attempt to get around this, I am trying to consolidate the two
>programs together.  One solution was to substitute the conventional
>vtkRenderWindowInteractor and vtkRenderWindow for a vtkTkRenderWidget.
> This works fine if I just want to do basic manipulations to the
>RenderWindow.  However, my applications uses PointWidgets, multiple
>Renderers/ViewPorts along with other vtk objects that require a
>vtkRenderWindowInteractor.
>Does anyone know of any ways to get that level of interaction while
>still using a vtkTkRenderWidget, or even solving my problem in another
>fashion?
>I have tried wxPython, but can't figure out this mysterious grey box
>in front of the interactor.
>
>I can send you my source code if that will help as well.  I didn't
>think everyone wanted to see a 26K python file.
>
>Thanks for your help.
>Dave
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cg
>i-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list