Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

pnm_io.h File Reference

Input routines for PNM, PPM, PGM, and PBM files. More...

#include <string>
#include <fstream>
#include <utility>

Include dependency graph for pnm_io.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

istream& eatcomments (istream& is)
 Swallows comments from the given stream, where a comment is defined as a line whose first non-whitespace character is a pound sign (#). More...

template<classArray2D> bool pgm_read (const string& filename, Array2D& image)
 Read the specified PGM file into the given matrix in column-major order. More...

pair<int,int> pnm_size (const string& filename)
 Utility routine which returns the size of the given PNM file as a (width,height) if found and readable, or else (0,0). More...


Detailed Description

Input routines for PNM, PPM, PGM, and PBM files.

Header:
/u/nn/cvsroot/lissom/src/pnm_io.h,v 1.7 2000/06/27 06:40:40 jbednar Exp

Definition in file pnm_io.h.


Function Documentation

istream & eatcomments ( istream & is ) [inline]
 

Swallows comments from the given stream, where a comment is defined as a line whose first non-whitespace character is a pound sign (#).

Definition at line 23 of file pnm_io.h.

template<classArray2D>
bool pgm_read ( const string & filename,
Array2D & image )
 

Read the specified PGM file into the given matrix in column-major order.

Any 2D array type which supports a (width,height) constructor should work, e.g. TNT's Matrix.

Returns false if there was a problem reading the file.

Definition at line 45 of file pnm_io.h.

Referenced by KernelFactory::create().

pair< int,int > pnm_size<int,int> ( const string & filename ) [inline]
 

Utility routine which returns the size of the given PNM file as a (width,height) if found and readable, or else (0,0).

Definition at line 92 of file pnm_io.h.


Generated at Mon Aug 21 00:31:08 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000