[vtkusers] Exporting the render window contents as a PNG file

David E DeMarle dave.demarle at kitware.com
Tue Mar 30 07:46:19 EDT 2010


Try this:
vtkRenderWindow -> vtkWindowToImageFilter -> vtkPNGWriter

cheers,

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



On Tue, Mar 30, 2010 at 5:04 AM, Luca Pamparana
<luca.pamparana at gmail.com> wrote:
> Hello,
>
> I have a small VTK program which runs an animation and at each
> animation step, I would like to save the current state as a PNG file.
>
> How do I save the render window contents as a PNG or other format? is
> there a simple VTKish way to do it?
>
> Thanks,
>
> Luc
> _______________________________________________
> 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