[vtkusers] RenderWindow->SaveImageAsPPM Functionality, and 3.x->4.0 hints

Will Schroeder will.schroeder at kitware.com
Thu Dec 20 11:35:06 EST 2001


Hi John-

At 08:15 AM 12/20/2001 -0600, John Washbourne wrote:

>Are there any 3.x->4.0 migration hints and I just didnt look
>hard enough? A couple quick pointers (like changing vtkScalars
>and vtkNormals to vtkDataArray) would be timesavers.

Look at the VTK FAQ section 6.7. Changes in VTK since 3.2. There is a link to
http://public.kitware.com/VTK/files/misc/Upgrading.zip
which describes the data attribute related changes. There is also a Perl 
script that can do the conversion for you.


>On to my question: I recompiled some code under 4.0 and
>discovered that the save image functionality in RenderWindow is
>gone. I tried a search on the archive, and the question has been
>asked before, but mostly gets 3.x answers
>(vtkRenderWindow->SaveImageAsPPM()). I see a method of several
>steps involving vtkWindowToImageFilter and vtkImageWriter. Is
>this the preferred method? Could someone please post a snippet
>of the new way to accomplish this?

Yes, grab the image from the render window, and then use something like the 
vtkTIFFWriter to save the image.

Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20011220/7376d85d/attachment.htm>


More information about the vtkusers mailing list