<<<<<<<<<<<<<<<<<

mio_ppm(mio) Medial I/O mio_ppm(mio)

NAME

mio_ppm - read and write ppm files

DESCRIPTION

The mio_ppm class interfaces to the ppm file format (24-bit color images).

SUPERCLASS

mio_8bit

INSTANCE VARIABLES

None.

MESSAGES

compute_number_slices! determines the number of slices in the data set.

low_level_read reads the raw slice data for the specified slice and prefix. Internal.

filename? returns the filename corresponding to the current prefix. The preferred format for filenames is <prefix>.ppm.<n>, where <prefix> is the prefix instance variable and <n> is the current slice. If a file of that form can't be found, a file of the form <prefix>.ppm is searched for.

resolution? returns the dimensions of the data set as a triple: x resolution, y resolution, number of slices.

write! writes the current image out to the file named by the prefix instance variable.

EXAMPLE

The same algorithm is used to generate filenames for reading and writing. The result is that if an entire set of slices is to be generated, the files must all exist, otherwise all output will go to the one file <prefix>.ppm. Perhaps the search should first be for <prefix>.ppm, then for <prefix>.ppm.<n>.

There is no way to get just the red, green or blue components of the image.

SEE ALSO

sv_ip, mio_pgm, mio_8bit


Please send comments and suggestions to
consult@rpi.edu