[vtkusers] How can i save RenderWindow as a picture file?
stoptv
stoptv at gmail.com
Thu Apr 20 10:32:43 EDT 2006
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060420/f162bb99/attachment.htm>
More information about the vtkusers
mailing list