EMAN2
omapio.h
Go to the documentation of this file.
1/*
2 * Author: Grant Tang, 06/07/2011 (gtang@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__omapio_h__
33#define eman__omapio_h__ 1
34
35#include "imageio.h"
36
37namespace EMAN
38{
50 class OmapIO : public ImageIO
51 {
52 public:
53 explicit OmapIO(const string & fname, IOMode rw_mode = READ_ONLY);
54 ~OmapIO();
55
57
58 static bool is_valid(const void *first_block, off_t file_size = 0);
59
60 private:
63 {
64 short xstart; //x start
65 short ystart; //y start
66 short zstart; //z start
67 short nx; //x extent
68 short ny; //y extent
69 short nz; //z extent
70 short apix_x; //x sampling rate
71 short apix_y; //y sampling rate
72 short apix_z; //z sampling rate
73 short header10; //header18*A Cell Edge
74 short header11; //header18*B Cell Edge
75 short header12; //header18*C Cell Edge
76 short alpha; //alpha
77 short beta; //beta
78 short gamma; //gamma
79 short iprod; //scale2*(253-3)/(Rhomax-Rhomin)
80 short iplus; //(3*Rhomax-253*Rhomin)/(Rhomax-Rhomin)
81 short scale; //Cell Constant Scaling Factor
82 short scale2; //constant 100
83
84 short imin; //minimum
85 short imax; //maximum
86 short isigma; //sigma
87 short imean; //mean, probably not really there
88
89 short unused[233]; //unused space
90 };
91
93
96 };
97
98}
99
100#endif //eman__omapio_h__
ImageIO classes are designed for reading/writing various electron micrography image formats,...
Definition: imageio.h:127
IOMode rw_mode
Definition: imageio.h:353
DSN6 MAP is composed of a series of records which are all 512 bytes long.
Definition: omapio.h:51
OmapHeader omaph
Definition: omapio.h:92
static bool is_valid(const void *first_block, off_t file_size=0)
Definition: omapio.cpp:236
bool is_big_endian
Definition: omapio.h:94
bool is_new_file
Definition: omapio.h:95
DEFINE_IMAGEIO_FUNC
Definition: omapio.h:56
OmapIO(const string &fname, IOMode rw_mode=READ_ONLY)
Definition: omapio.cpp:37
E2Exception class.
Definition: aligner.h:40
The data in the header is composed of 256 short integers.
Definition: omapio.h:63
short unused[233]
Definition: omapio.h:89