#include <pgmio.h>
Inheritance diagram for EMAN::PgmIO:


Public Member Functions | |
| PgmIO (const string &filename, IOMode rw_mode=READ_ONLY) | |
| ~PgmIO () | |
Static Public Member Functions | |
| static bool | is_valid (const void *first_block) |
Public Attributes | |
| DEFINE_IMAGEIO_FUNC | |
Private Types | |
| enum | FileType { PGM_ASCII, PGM_BINARY, PGM_UNKNOWN_FILE } |
Private Attributes | |
| string | filename |
| IOMode | rw_mode |
| FILE * | pgm_file |
| bool | is_big_endian |
| bool | initialized |
| int | nx |
| int | ny |
| int | maxval |
| int | minval |
| off_t | file_offset |
| float | rendermin |
| float | rendermax |
Static Private Attributes | |
| static const char * | MAGIC_ASCII = "P2" |
| static const char * | MAGIC_BINARY = "P5" |
Header is always in ASCII format. Data can be in either ASCII or BINARY format. Only Binary format is supported in EMAN so far.
A PGM file contains one 2D image.
Definition at line 50 of file pgmio.h.
|
|
Definition at line 63 of file pgmio.h. 00064 { 00065 PGM_ASCII, 00066 PGM_BINARY, 00067 PGM_UNKNOWN_FILE 00068 };
|
|
||||||||||||
|
Definition at line 52 of file pgmio.cpp. 00053 : filename(file), rw_mode(rw), pgm_file(0), is_big_endian(true), 00054 initialized(false), nx(0), ny(0), maxval(0), minval(0), 00055 file_offset(0), rendermin(0), rendermax(0) 00056 {}
|
|
|
Definition at line 58 of file pgmio.cpp. References pgm_file.
|
|
|
Definition at line 130 of file pgmio.cpp. References EMAN::Util::check_file_by_magic(), ENTERFUNC, EXITFUNC, and MAGIC_BINARY. Referenced by EMAN::EMUtil::fast_get_image_type(), and EMAN::EMUtil::get_image_type(). 00131 { 00132 ENTERFUNC; 00133 bool result = false; 00134 if (first_block) { 00135 result = Util::check_file_by_magic(first_block, MAGIC_BINARY); 00136 } 00137 EXITFUNC; 00138 return result; 00139 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 61 of file pgmio.h. Referenced by is_valid(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 73 of file pgmio.h. Referenced by ~PgmIO(). |
|
|
|
|
|
|
|
|
|
1.4.4