Saving images
Kent Vander Velden
graphix at iastate.edu
Fri Jul 30 18:58:54 EDT 1999
Hi. My application (written in C++ and using vtk 2.4 on Linux and
Mesa 3.0) generates a number of PPM files that are used to construct a
movie. The application loads data, draws the scene, writes an images,
and exits. The application is the then started again from a script
when new data is available. I have encountered two problems with this:
1) sometimes the saved image is blank, 2) any obscuring window messes
up the saved image.
The image saving code looks like this:
...
renWin->FullScreenOn();
renWin->Render();
renWin->SetFileName(image_filename);
sleep(2);
renWin->SaveImageAsPPM();
renderer->Delete();
renWin->Delete();
...
The problem seems to be that the scene has not rendered before the
application starts writing the image. Adding the sleep() call helps
but is an obvious kludge. Could something else be wrong?
The second problem concerns obscuring windows messing up the saved
image and has been discussed here before - I found a few old messages.
I was wondering if there is now a way to render off screen (I believe
that Mesa supports this) and/or a way to force the rendering window to
always be on top of the stack?
Thanks.
---
Kent Vander Velden
kent at iastate.edu
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
More information about the vtkusers
mailing list