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

plpgmdec.h

Go to the documentation of this file.
00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: plpgmdec.h,v 1.1 2004/05/21 21:02:53 maxx Exp $
00005 |
00006 |      portable graymap Decoder Class
00007 |
00008 |      Original author: Jose Miguel Buenaposada Biencinto.
00009 |
00010 |      Copyright (c) 1996-1998 Ulrich von Zadow
00011 |
00012 \--------------------------------------------------------------------
00013 */
00014 
00015 #ifndef INCL_PLPGMDEC
00016 #define INCL_PLPGMDEC
00017 
00018 #ifndef INCL_PLPICDEC
00019 #include "plpicdec.h"
00020 #endif
00021 
00022 #include "plpgm.h"
00023 
00025 class PLPGMDecoder : public PLPicDecoder
00026 {
00027 
00028 public:
00030   PLPGMDecoder
00031     ();
00032 
00034   virtual ~PLPGMDecoder
00035     ();
00036 
00037 protected:
00040   virtual void DoDecode
00041     ( PLBmp * pBmp,
00042       PLDataSource * pDataSrc
00043     );
00044 
00045 private:
00046 
00047   PLBYTE m_LastByte;
00048   bool m_UseLastByte;
00049 
00050   void readPgmHeader (PGMHEADER *pPgmHead,
00051                             PLDataSource * pDataSrc);
00052 
00053   int  readASCIIDecimal(PLDataSource * pDataSrc);
00054 
00055   void skipComment(PLDataSource * pDataSrc);
00056 
00057   void skipPgmASCIISeparators(PLDataSource * pDataSrc);
00058 
00059   PLBYTE *readASCIILine(PLDataSource *pDataSrc);
00060 
00061   void readImage (PGMHEADER * pPgmHead,
00062                   PLBmp * pBmp,
00063                   PLDataSource * pDataSrc);
00064 
00065   void readData(PGMHEADER * pPgmHead,
00066                 PLBmp * pBmp,
00067                 PLDataSource * pDataSrc);
00068 
00069   void expandASCIILine
00070     ( PLBYTE * pDest,
00071       int MaxGrayValue,
00072       int Width,
00073       PLDataSource * pDataSrc
00074     );
00075 
00076   void expandByteLine
00077     ( PLBYTE * pDest,
00078             int MaxGrayValue,
00079             int Width,
00080       PLDataSource * pDataSrc
00081     );
00082 
00083   PLBYTE PLPGMDecoder::readASCIIPixel8
00084     ( int MaxGrayValue,
00085       PLDataSource * pDataSrc
00086     );
00087 };
00088 
00089 #endif
00090 /*
00091 /--------------------------------------------------------------------
00092 |
00093 |      $Log: plpgmdec.h,v $
00094 |      Revision 1.1  2004/05/21 21:02:53  maxx
00095 |      Initial Version of vuVolume, moderatly changed to make it compile on my windows and linux machine.
00096 |
00097 |      Revision 1.1  2002/11/13 01:58:21  mspindle
00098 |      *** empty log message ***
00099 |
00100 |      Revision 1.3  2001/10/21 17:12:40  uzadow
00101 |      Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel.
00102 |
00103 |      Revision 1.2  2001/10/06 22:37:08  uzadow
00104 |      Linux compatibility.
00105 |
00106 |      Revision 1.1  2001/09/16 19:03:22  uzadow
00107 |      Added global name prefix PL, changed most filenames.
00108 |
00109 |      Revision 1.4  2000/12/18 22:42:52  uzadow
00110 |      Replaced RGBAPIXEL with PLPixel32.
00111 |
00112 |      Revision 1.3  2000/05/23 10:19:11  Ulrich von Zadow
00113 |      Minor unix compatibility changes.
00114 |
00115 |      Revision 1.2  2000/03/21 10:51:16  Ulrich von Zadow
00116 |      Documentation update.
00117 |
00118 |      Revision 1.1  2000/03/16 13:56:37  Ulrich von Zadow
00119 |      Added pgm decoder by Jose Miguel Buenaposada Biencinto
00120 |
00121 |
00122 \--------------------------------------------------------------------
00123 */

Generated on Wed Dec 15 21:20:30 2004 for vuVolume by  doxygen 1.3.9.1