EMAN2
pgmio.h
Go to the documentation of this file.
1/*
2 * Author: Steven Ludtke, 04/10/2003 (sludtke@bcm.edu)
3 * Copyright (c) 2000-2006 Baylor College of Medicine
4 *
5 * This software is issued under a joint BSD/GNU license. You may use the
6 * source code in this file under either license. However, note that the
7 * complete EMAN2 and SPARX software packages have some GPL dependencies,
8 * so you are responsible for compliance with the licenses of these packages
9 * if you opt to use BSD licensing. The warranty disclaimer below holds
10 * in either instance.
11 *
12 * This complete copyright notice must be included in any revised version of the
13 * source code. Additional authorship citations may be added, but existing
14 * author citations must be preserved.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 *
30 * */
31
32#ifndef eman__pgmio_h__
33#define eman__pgmio_h__ 1
34
35#include "imageio.h"
36
37namespace EMAN
38{
46 class PgmIO : public ImageIO
47 {
48 public:
49 explicit PgmIO(const string & fname, IOMode rw_mode = READ_ONLY);
50 ~PgmIO();
51
53 static bool is_valid(const void *first_block);
54
55 private:
56 static const char *MAGIC_ASCII;
57 static const char *MAGIC_BINARY;
58
60 {
64 };
65
66 private:
68
69 int nx;
70 int ny;
71 int maxval;
72 int minval;
73
75
76 float rendermin;
77 float rendermax;
79 };
80}
81
82#endif //eman__pgmio_h__
ImageIO classes are designed for reading/writing various electron micrography image formats,...
Definition: imageio.h:127
IOMode rw_mode
Definition: imageio.h:353
A PGM file = header + data.
Definition: pgmio.h:47
int nx
Definition: pgmio.h:69
int minval
Definition: pgmio.h:72
DEFINE_IMAGEIO_FUNC
Definition: pgmio.h:52
PgmIO(const string &fname, IOMode rw_mode=READ_ONLY)
Definition: pgmio.cpp:42
@ PGM_ASCII
Definition: pgmio.h:61
@ PGM_UNKNOWN_FILE
Definition: pgmio.h:63
@ PGM_BINARY
Definition: pgmio.h:62
int renderbits
Definition: pgmio.h:78
int ny
Definition: pgmio.h:70
static const char * MAGIC_ASCII
Definition: pgmio.h:56
float rendermax
Definition: pgmio.h:77
off_t file_offset
Definition: pgmio.h:74
int maxval
Definition: pgmio.h:71
static bool is_valid(const void *first_block)
Definition: pgmio.cpp:120
static const char * MAGIC_BINARY
Definition: pgmio.h:57
bool is_big_endian
Definition: pgmio.h:67
float rendermin
Definition: pgmio.h:76
E2Exception class.
Definition: aligner.h:40