[vtkusers] How can i save RenderWindow as a picture file?
ccyx chen
ccyxcn at gmail.com
Thu Apr 20 10:37:01 EDT 2006
Thx all of U.I am so thx.today i don't just learned how to do something and
learned how to learn something.lol greets!
On 4/20/06, stoptv <stoptv at gmail.com> wrote:
>
>
>
> On 4/20/06, ccyx chen <ccyxcn at gmail.com> wrote:
>
> > I'm new one to use VTK.
> > I want to save RenderWindow as a picture file(like .jpg .bmp...).What
> > can i do?
> >
>
> hope this snippet of python from the examples section helps:
>
> # Capture the display and place in a tiff
> def CaptureImage():
> w2i = vtk.vtkWindowToImageFilter()
> writer = vtk.vtkTIFFWriter()
> w2i.SetInput(renWin)
> w2i.Update()
> writer.SetInputConnection(w2i.GetOutputPort())
> writer.SetFileName("image.tif")
> renWin.Render()
> writer.Write()
>
> cheers!!
>
> --
> stoptv at gmail.com
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the 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/20060420/682b74c8/attachment.htm>
More information about the vtkusers
mailing list