vtkPPMWRITE Procedure

Writes the contents of a VTK window to a PPM file.

Usage

vtkPPMWRITE[, window_index]

Input Parameters

window_index—(optional) An integer specifying the index of an existing VTK window. If omitted, the current window is used.

Keywords

Filename—File path to store PPM file. (Default: 'wave.ppm')

Discussion

This procedure saves a snapshot of the selected window as a PPM file. It is important to make sure the VTK window fully visible when this routine is called because an obscuring portion of another window will be captured as part of the image. This is a limitation of VTK.

Example 1

Writing a PPM file.

vtkwindow, 1
vtkaxes
vtkPPMWRITE, 1

Example 2

Writing the PPM file to the file name of PV.ppm.

vtkwindow, 2, background='blue'
vtkPPMWRITE, 2, filename='PV.ppm'

See Also

vtkPPMREAD, vtkTVRD