[vtkusers] writing images from window to file in vtk4

Berk Geveci berkgeveci at hotmail.com
Fri Jan 18 17:04:11 EST 2002


It is a very common question. One I ask myself (or someone)
everytime I do what you are doing. Call vtkWindowToImageFilter::Modified().
Since vtkRenderWindow() is not really a pipeline object, it's
MTime is not affected by the pipeline (nor the camera movements
etc.). Therefore, you have to call vtkWindowToImageFilter::Modified()
to have it re-execute.

-Berk

>From: Michael Halle <halazar at media.mit.edu>
>To: vtkusers at public.kitware.com
>Subject: [vtkusers] writing images from window to file in vtk4
>Date: Fri, 18 Jan 2002 16:16:47 +0000
>
>I feel this must be an embarrassingly simple question, but...
>
>I'm using vtk4, and I want to write an image out to a file.  That means 
>using
>vtkWindowToImageFilter and connecting it to an ImageWriter (the PNG one, 
>for
>instance).
>
>I write out the file once, fine.  I change the scene, write the file again,
>I get the same image.  The file is getting written, just with the old 
>image.
>
>I've played with adding various calls to "Update","UpdateInformation", and
>"ReleaseDataFlagOn/Off", (heck, even "Render"), and I have been unable to 
>get
>the image to change after the first render.
>
>Am I missing something obvious here?  I can post code if it's 
>non-trivial....
>
>Thanks.
>
>        --Mike
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.




More information about the vtkusers mailing list