Man Page for vtkPNMReader
Table of Contents

NAME

vtkPNMReader - read pnm (i.e., portable anymap) files

SYNOPSIS


#include "/opt/vtk-c++/graphics/vtkPNMReader.h"

class VTK_EXPORT vtkPNMReader : public vtkVolumeReader

vtkPNMReader();
static vtkPNMReader *New() {return new vtkPNMReader;};
const char *GetClassName() {return "vtkPNMReader";};
void PrintSelf(ostream& os, vtkIndent indent);
void SetFileName(char *);
char *GetFileName();
vtkStructuredPoints *GetImage(int ImageNum);

DESCRIPTION

vtkPNMReader is a source object that reads pnm (portable anymap) files. This includes .pbm (bitmap), .pgm (grayscale), and .ppm (pixmap) files. (Currently this object only reads binary versions of these files.)

PNMReader creates structured point datasets. The dimension of the dataset depends upon the number of files read. Reading a single file results in a 2D image, while reading more than one file results in a 3D volume.

To read a volume, files must be of the form "FileName." (e.g., foo.ppm.0, foo.ppm.1, ...). You must also specify the image range. This range specifies the beginning and ending files to read (range can be any pair of non-negative numbers).

The default behavior is to read a single file. In this case, the form of the file is simply "FileName" (e.g., foo.bar, foo.ppm, foo.pnm). To differentiate between reading images and volumes, the image range is set to (-1,-1) to read a single image file.

SUMMARY

void SetFileName(char *)
Specify file name of pnm file(s).


Table of Contents