[vtkusers] Screenshot with VTK option offscreenrender on

Johannes Strecha j.strecha at gmail.com
Tue Nov 27 03:13:47 EST 2012


Hello,

It works for me using the nightly VTK build, but it should be ok in
5.8/5.10. My python script calls (roughly) the following:

[All connections set up, Offscreen Rendering activated, camera properly
positioned, there was an issue that the camera was aligned differently when
doing offscreen rendering]
window.Render()
window2image.Modified()
jpeg_writer.Write()

window is a vtkXOpenGLRenderWindow and I use a vtkOpenGLRenderer, I sit on
a Debian System with proprietary nVidia drivers (304.48) and a GT 520.
NB: I rendered a lot of images using this script, and with vtk 5.8 this
caused the X-process to hog/leak memory. This was not the case using VTK6.

I do not know my way around QT & VTK together, but maybe this helps.

Best regards,
Johannes Strecha.


On Tue, Nov 27, 2012 at 1:57 AM, Darshan Pai <darshanpai at gmail.com> wrote:

> I have a QT application and using a QVTkWidget for rendering VTK objects.
> I recently compiled VTK with offscreen rendering on.
>
> I was trying to take a screenshot of the QVTkWidget , using the
> vtkWindowToImageFilter.
> The problem is that it works on my machine, but the screenshot is empty
> when trying it in another machine.
>
> I found out that that if I use VTK without offscreen rendering it works.
>
> Is there any way to solve this problem?
>
> Regards
> Darshan
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121127/2c78e252/attachment.htm>


More information about the vtkusers mailing list