PortablePicture.h File Reference

Header for the PortablePicture template. More...

#include "standard.h"
#include <vector>
#include <string>
#include <algorithm>
#include <limits>
#include "MatrixTypes.h"

Include dependency graph for PortablePicture.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.

Compounds

class  File
 This simple class closes a file handle in its destructor, which simplifies exception handling. More...

struct  PictureHeaderInfo
 The header information for the picture files that we can handle. More...

class  PortablePicture
 A picture that can be loaded from various sources, accessed, and saved to a portable pixmap. More...

class  typeTest
class  typeTest< double >
class  typeTest< float >

Defines

#define PBM_ASCII   '1'
#define PGM_ASCII   '2'
#define PPM_ASCII   '3'
#define PBM_BINARY   '4'
#define PGM_BINARY   '5'
#define PPM_BINARY   '6'
#define PFM_BINARY   'F'

Typedefs

typedef PortablePicture< float > PortableFloatMap
 This format is the same as Paul Debevec's portable floatmap format.

typedef PortablePicture< unsigned
char > 
PortablePixMap
 Three unsigned bytes for every pixel.


Functions

char * fileErrorString (FILE *fp, const char *filename, const char *function_name)
 Returns an error string, depending on the error state of the "fp" param.

std::string getNextLine (FILE *fp, const char *filename)
 Keeps grabbing lines from the file until we find one that has actual data in it. More...

void removeFirstToken (std::string &str)
PictureHeaderInfo readHeader (FILE *fp, const char *filename)
 Reads out the header for a (.pgm, .ppm, or .pbm) file.

void readBinaryBytes (FILE *fp, const char *filename, PictureHeaderInfo info, std::vector< RgbByte > &picture)
void readBinaryFloats (FILE *fp, const char *filename, PictureHeaderInfo info, std::vector< RgbFloat > &picture)
void readAscii (FILE *fp, const char *filename, PictureHeaderInfo info, std::vector< RgbByte > &picture)
void loadBits (const char *filename, PortablePixMap &p)


Detailed Description

Header for the PortablePicture template.

Author: Matt Loper

Revision:
1.12
Date:
2002/05/12 22:47:23

Definition in file PortablePicture.h.


Function Documentation

std::string getNextLine FILE *    fp,
const char *    filename
 

Keeps grabbing lines from the file until we find one that has actual data in it.

This means removing comments and blank space.

Definition at line 38 of file PortablePicture.cpp.

Referenced by readHeader().


Generated on Tue May 21 03:34:58 2002 for Archimedes by doxygen1.2.15