[vtkusers] QVTKWidget

Clinton Stimpson clinton at elemtech.com
Thu Apr 22 12:14:41 EDT 2010


This sounds like your problem:  see section 14.070
http://www.opengl.org/resources/faq/technical/rasterization.htm

You can set the vtkRenderWindow offscreen flag and use that to save the picture, 
or wait until the dialog is gone to render again and save the picture.

Clint

On Wednesday 21 April 2010 05:22:04 pm Gib Bogle wrote:
> I've just discovered that my code for saving snapshots of my VTK scene is
>  not in fact performing correctly.  The malfunction was easy to overlook. 
>  I am creating an animation, which is rendered in a QVTWidget, and this all
>  works fine.  I can also choose to write out each scene automatically to an
>  image file.  I've just implemented the capability of pausing the
>  animation, then saving the scene to an image file.  First I use a Qt
>  QFileDialog to get the file name, then I save the image to that file. 
>  After such a save only that part of the screen that falls within the
>  rectangle that the dialog last occupied on the screen is now being used by
>  VTK.  The dialog window has replaced the QVTKWidget window, in some sense.
>   This doesn't happen if I return from the image save method without doing
>  anything, so it is some sort of interaction between the dialog, the
>  widget, and the image saving code.  I can prevent this by ensuring that
>  the VTK scene is not being displayed when I invoke the dialog (I switch to
>  another screen).  This seems a bit clunky.  Is there another way to do
>  this, one that doesn't involve hiding the QVTKWidget?  Perhaps a way to
>  save and restore the QVTKWidget frame? Thanks.
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
>  http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
>  http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 



More information about the vtkusers mailing list