[vtkusers] Interactive Frame Grabbing

jean-michel.rouet at philips.com jean-michel.rouet at philips.com
Mon Dec 1 13:18:35 EST 2003


Hi all,

I recently tried to make movies out of my VTK application.
I set up things to grab the content of the renderWindow and save it into a 
file upon some user interaction (keypressed).
This is not really convenient and I was wondering how I could do that on 
the fly.
I tried the vtkMultiThreader class and tried to run a thread that grabs 
the renderer pixel data every say 10th of second.
The threads seems to be functionnal but when it tries to call either 
renWin->render() or renWin->GetPixelData(...) then it crashes.
If my thread just cout a silly message instead of grabbing the image then 
it does not crash, but neither does what I wanted of course :-)

Has anybody ever manage to launch a thread that grabs images every now and 
then while the interactor is still active.
Has anybody some hints about how do make that work ?

Thx

JM

PS: I'm running under windows with vtkWin32OpenGLRenderWindow, and I'm in 
fact using AVIFile functions to make an AVI directly out of the grabbed 
images. This actually works when called offline (without user interaction 
during the grab, for instance like when i display a vtk object and the 
make it rotate for a given number of iteration and grab the images in 
between each render().)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031201/7713c330/attachment.htm>


More information about the vtkusers mailing list