[vtkusers] Question about including vtk files

Tore Aurstad toreaur at stud.ntnu.no
Sat Feb 5 22:27:32 EST 2005

I want to provide some structure when using QVTKRenderWindowInteractor..

Say I have got different files for displaying VTK scenes written in Python

Is there some "include" method to read a .py file defining a vtk scene to
eg. update the QVTKRenderWindowInteractor of mine to show a new VTK scene?

I guess I must somehow have some switching mechanism for changing VTK
scenes from my PyQt/VTK applications, that is reload new VTK scenes
somehow. I know I can perhaps use the vtkRenderer's update method.

I also need to do some animation with my vtk files, I have managed to plot
xyz positions as spheres in 3d space now with dynamically naming vtkActors
and vtkSpheresources, and I got two positions for all points saved in a
simple list (python list) and must animate linear interpolation against
the two positions with e.g. 24 frames like:

pos2 = (1-alpha)*pos1 + alpha*pos2, alpha:[0,1]

Thanks for tips in all these different challenges of VTK:

Current questions:
How to make a PyQt/VTK QVTKRenderWindowInteractor "inline" in the
application (do not show a new window).
How to animate simple linear interpolation? (updates on the renderer?)
How to time manage the different frame updates? (set desired framerate?)
(1/24 second per frame i guess)
How to include VTK scenes, that is load in new scenes (completely)
into QVTKRenderWindowInteractor?
And a Qt question - How to bind events like clicking a QPushButton
to infer events inside the QVTKRenderWindowInteractor (So to support
a GUI not only through the QVTKRenderWindowInteractor itself but
a more friendly visual GUI in Qt (but this is Qt based quiz..))

Thanks for the help, I bet that VTK will get really popular once people
can easily use e.g. Qt with it. (I suggest also users out there to try
out "vtkdesigner", I couldn't get it compiled yet, but I hope to manage
it soon as it looks really user friendly. If installation tips for
vtkdesigner is known please share! I could not link -lhybrid btw)

Tore Aurstad

More information about the vtkusers mailing list