[vtkusers] saving vtk render as jpg file?

Sebastian Geiger geiger at erdw.ethz.ch
Fri Mar 28 20:40:05 EST 2003


Hello,

I've recently moved my work from Windows to Linux.  On Windows I was 
using the (very old) vtk3.2 dll libraries and tcl scripts for 
visualization. On the linux box I have sucessfully compiled the latest 
VTK version and run Tcl/Tk 8.4. My tcl scripts work fine with one 
exception: At the end of the script I am always using

renWin SetSize 1000 1000

iren Initialize
iren SetUserMethod {wm deiconify .vtkInteract}

renWin SetFileName "picture.ppm"
renWin SaveImageAsPPM

wm withdraw .

To get a *.ppm file of the visualization (which I then transformed into 
a JPG file). The new VTK version no complains that the methods 
SetFileName and SaveImageAsPPM cannot be found or a re called with 
incorrect parameters.

Does anyone know what to do to save the renderer as a PPM or better JPG 
or TIFF file with VTK 4.2 and Tcl 8.4 and how the little code must be 
changed?

Thanks for the help!

Sebastian

-- 
Sebastian Geiger
Isotope Geochemistry and Mineral Resources NO
Swiss Federal Institute of Technology (ETH)
ETH-Zentrum
Sonneggstr. 5
CH-8092 Zurich
Switzerland
Phone:   +41 1 632 3174
Fax:     +41 1 632 1827

e-mail: geiger at erdw.ethz.ch
http://www.erdw.ethz.ch/geiger





More information about the vtkusers mailing list