Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PLPGMDecoder Class Reference

Portable Graymap file decoder. Delivers an 8 bpp grayscale image. More...

#include <plpgmdec.h>

Inheritance diagram for PLPGMDecoder:

Inheritance graph
[legend]
Collaboration diagram for PLPGMDecoder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLPGMDecoder ()
 Creates a decoder.
virtual ~PLPGMDecoder ()
 Destroys a decoder.

Protected Member Functions

virtual void DoDecode (PLBmp *pBmp, PLDataSource *pDataSrc)
 Main decoder routine.

Private Member Functions

void readPgmHeader (PGMHEADER *pPgmHead, PLDataSource *pDataSrc)
int readASCIIDecimal (PLDataSource *pDataSrc)
void skipComment (PLDataSource *pDataSrc)
void skipPgmASCIISeparators (PLDataSource *pDataSrc)
PLBYTEreadASCIILine (PLDataSource *pDataSrc)
void readImage (PGMHEADER *pPgmHead, PLBmp *pBmp, PLDataSource *pDataSrc)
void readData (PGMHEADER *pPgmHead, PLBmp *pBmp, PLDataSource *pDataSrc)
void expandASCIILine (PLBYTE *pDest, int MaxGrayValue, int Width, PLDataSource *pDataSrc)
void expandByteLine (PLBYTE *pDest, int MaxGrayValue, int Width, PLDataSource *pDataSrc)
PLBYTE readASCIIPixel8 (int MaxGrayValue, PLDataSource *pDataSrc)

Private Attributes

PLBYTE m_LastByte
bool m_UseLastByte

Detailed Description

Portable Graymap file decoder. Delivers an 8 bpp grayscale image.

Definition at line 25 of file plpgmdec.h.


Constructor & Destructor Documentation

PLPGMDecoder::PLPGMDecoder  ) 
 

Creates a decoder.

Definition at line 19 of file plpgmdec.cpp.

PLPGMDecoder::~PLPGMDecoder  )  [virtual]
 

Destroys a decoder.

Definition at line 28 of file plpgmdec.cpp.


Member Function Documentation

void PLPGMDecoder::DoDecode PLBmp pBmp,
PLDataSource pDataSrc
[protected, virtual]
 

Main decoder routine.

Reads the header, Creates the bitmap, reads the palette, and reads the image data.

Reimplemented from PLPicDecoder.

Definition at line 33 of file plpgmdec.cpp.

References _PgmHeader::ImageHeight, _PgmHeader::ImageWidth, and PGMHEADER.

void PLPGMDecoder::expandASCIILine PLBYTE pDest,
int  MaxGrayValue,
int  Width,
PLDataSource pDataSrc
[private]
 

Definition at line 222 of file plpgmdec.cpp.

References PLBYTE.

void PLPGMDecoder::expandByteLine PLBYTE pDest,
int  MaxGrayValue,
int  Width,
PLDataSource pDataSrc
[private]
 

Definition at line 238 of file plpgmdec.cpp.

References PLBYTE.

int PLPGMDecoder::readASCIIDecimal PLDataSource pDataSrc  )  [private]
 

Definition at line 140 of file plpgmdec.cpp.

References m_LastByte, and PLPicDecoder::ReadByte().

Here is the call graph for this function:

PLBYTE * PLPGMDecoder::readASCIILine PLDataSource pDataSrc  )  [private]
 

Definition at line 111 of file plpgmdec.cpp.

References byte, PL_ERRFORMAT_UNKNOWN, PLBYTE, PLPicDecoder::raiseError(), and PLPicDecoder::ReadByte().

Here is the call graph for this function:

PLBYTE PLPGMDecoder::readASCIIPixel8 int  MaxGrayValue,
PLDataSource pDataSrc
[private]
 

Definition at line 259 of file plpgmdec.cpp.

References PLBYTE.

void PLPGMDecoder::readData PGMHEADER pPgmHead,
PLBmp pBmp,
PLDataSource pDataSrc
[private]
 

Definition at line 192 of file plpgmdec.cpp.

References PGMHEADER, and PLBYTE.

void PLPGMDecoder::readImage PGMHEADER pPgmHead,
PLBmp pBmp,
PLDataSource pDataSrc
[private]
 

Definition at line 175 of file plpgmdec.cpp.

References PGM_P2, PGM_P5, PGMHEADER, PL_ERRFORMAT_UNKNOWN, and raiseError().

Here is the call graph for this function:

void PLPGMDecoder::readPgmHeader PGMHEADER pPgmHead,
PLDataSource pDataSrc
[private]
 

Definition at line 51 of file plpgmdec.cpp.

References PGMHEADER, PL_ERRFORMAT_UNKNOWN, and raiseError().

Here is the call graph for this function:

void PLPGMDecoder::skipComment PLDataSource pDataSrc  )  [private]
 

Definition at line 155 of file plpgmdec.cpp.

References m_LastByte, and PLPicDecoder::ReadByte().

Here is the call graph for this function:

void PLPGMDecoder::skipPgmASCIISeparators PLDataSource pDataSrc  )  [private]
 

Definition at line 163 of file plpgmdec.cpp.

References m_LastByte, and PLPicDecoder::ReadByte().

Here is the call graph for this function:


Member Data Documentation

PLBYTE PLPGMDecoder::m_LastByte [private]
 

Definition at line 47 of file plpgmdec.h.

Referenced by readASCIIDecimal(), skipComment(), and skipPgmASCIISeparators().

bool PLPGMDecoder::m_UseLastByte [private]
 

Definition at line 48 of file plpgmdec.h.


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:01 2004 for vuVolume by  doxygen 1.3.9.1