EMAN2
libEM
io
gatan2io.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__gatan2io_h__
33
#define eman__gatan2io_h__ 1
34
35
#include "
imageio.h
"
36
37
namespace
EMAN
38
{
39
45
class
Gatan2IO
:
public
ImageIO
46
{
47
public
:
48
explicit
Gatan2IO
(
const
string
& fname,
IOMode
rw_mode
=
READ_ONLY
);
49
~Gatan2IO
();
50
51
DEFINE_IMAGEIO_FUNC
;
52
static
bool
is_valid
(
const
void
*first_block);
53
private
:
54
enum
DataType
55
{
56
GATAN2_SHORT
= 1,
57
GATAN2_FLOAT
= 2,
58
GATAN2_COMPLEX
= 3,
59
GATAN2_PACKED_COMPLEX
= 5,
60
GATAN2_CHAR
= 6,
61
GATAN2_INT
= 7,
62
GATAN2_INVALID
63
};
64
65
struct
Gatan2Header
66
{
67
short
version
;
68
short
un1
;
69
short
un2
;
70
short
nx
;
71
short
ny
;
72
short
len
;
73
short
type
;
74
};
75
76
int
to_em_datatype
(
int
gatan_type);
77
78
private
:
79
Gatan2Header
gatanh
;
80
81
bool
is_big_endian
;
82
};
83
84
}
85
86
87
#endif
//eman__gatan2io_h__
EMAN::Gatan2IO
Gatan2 Image file = header + data.
Definition:
gatan2io.h:46
EMAN::Gatan2IO::gatanh
Gatan2Header gatanh
Definition:
gatan2io.h:79
EMAN::Gatan2IO::Gatan2IO
Gatan2IO(const string &fname, IOMode rw_mode=READ_ONLY)
Definition:
gatan2io.cpp:39
EMAN::Gatan2IO::~Gatan2IO
~Gatan2IO()
Definition:
gatan2io.cpp:46
EMAN::Gatan2IO::DataType
DataType
Definition:
gatan2io.h:55
EMAN::Gatan2IO::GATAN2_INT
@ GATAN2_INT
Definition:
gatan2io.h:61
EMAN::Gatan2IO::GATAN2_COMPLEX
@ GATAN2_COMPLEX
Definition:
gatan2io.h:58
EMAN::Gatan2IO::GATAN2_FLOAT
@ GATAN2_FLOAT
Definition:
gatan2io.h:57
EMAN::Gatan2IO::GATAN2_SHORT
@ GATAN2_SHORT
Definition:
gatan2io.h:56
EMAN::Gatan2IO::GATAN2_CHAR
@ GATAN2_CHAR
Definition:
gatan2io.h:60
EMAN::Gatan2IO::GATAN2_PACKED_COMPLEX
@ GATAN2_PACKED_COMPLEX
Definition:
gatan2io.h:59
EMAN::Gatan2IO::GATAN2_INVALID
@ GATAN2_INVALID
Definition:
gatan2io.h:62
EMAN::Gatan2IO::is_valid
static bool is_valid(const void *first_block)
Definition:
gatan2io.cpp:82
EMAN::Gatan2IO::is_big_endian
bool is_big_endian
Definition:
gatan2io.h:81
EMAN::Gatan2IO::DEFINE_IMAGEIO_FUNC
DEFINE_IMAGEIO_FUNC
Definition:
gatan2io.h:51
EMAN::Gatan2IO::to_em_datatype
int to_em_datatype(int gatan_type)
Definition:
gatan2io.cpp:239
EMAN::ImageIO
ImageIO classes are designed for reading/writing various electron micrography image formats,...
Definition:
imageio.h:127
EMAN::ImageIO::rw_mode
IOMode rw_mode
Definition:
imageio.h:353
EMAN::ImageIO::IOMode
IOMode
Definition:
imageio.h:130
EMAN::ImageIO::READ_ONLY
@ READ_ONLY
Definition:
imageio.h:130
imageio.h
EMAN
E2Exception class.
Definition:
aligner.h:40
EMAN::Gatan2IO::Gatan2Header
Definition:
gatan2io.h:66
EMAN::Gatan2IO::Gatan2Header::version
short version
Definition:
gatan2io.h:67
EMAN::Gatan2IO::Gatan2Header::nx
short nx
Definition:
gatan2io.h:70
EMAN::Gatan2IO::Gatan2Header::len
short len
Definition:
gatan2io.h:72
EMAN::Gatan2IO::Gatan2Header::ny
short ny
Definition:
gatan2io.h:71
EMAN::Gatan2IO::Gatan2Header::un1
short un1
Definition:
gatan2io.h:68
EMAN::Gatan2IO::Gatan2Header::un2
short un2
Definition:
gatan2io.h:69
EMAN::Gatan2IO::Gatan2Header::type
short type
Definition:
gatan2io.h:73
Generated by
1.9.2