| Bsoft 2.0.5 Bernard's software package

rwMRC.h
Go to the documentation of this file.
1
11 #include "rwimg.h"
12
13 #define MRCSIZE 1024 // Minimum size of the MRC header (when nsymbt = 0)
14
15 struct MRCheadold { // file header for MRC data
16 int nx; // 0 0 image size
17 int ny; // 1 4
18 int nz; // 2 8
19 int mode; // 3 0=uchar,1=short,2=float
20 int nxStart; // 4 unit cell offset
21 int nyStart; // 5
22 int nzStart; // 6
23 int mx; // 7 unit cell size in voxels
24 int my; // 8
25 int mz; // 9
26 float a; // 10 40 cell dimensions in A
27 float b; // 11
28 float c; // 12
29 float alpha; // 13 cell angles in degrees
30 float beta; // 14
31 float gamma; // 15
32 int mapc; // 16 column axis
33 int mapr; // 17 row axis
34 int maps; // 18 section axis
35 float amin; // 19 minimum density value
36 float amax; // 20 80 maximum density value
37 float amean; // 21 average density value
38 int ispg; // 22 space group number
39 int nsymbt; // 23 bytes used for sym. ops. table
40 float extra[29]; // 24 user-defined info
41 float xOrigin; // 53 phase origin in pixels
42 float yOrigin; // 54
43 int nlabl; // 55 number of labels used
44 char labels[10][80]; // 56-255 10 80-character labels
45 } ;
46
47 struct MRChead2000 { // file header for MRC data
48 int nx; // 0 0 image size
49 int ny; // 1 4
50 int nz; // 2 8
51 int mode; // 3 0=char,1=short,2=float
52 int nxStart; // 4 unit cell offset
53 int nyStart; // 5
54 int nzStart; // 6
55 int mx; // 7 unit cell size in voxels
56 int my; // 8
57 int mz; // 9
58 float a; // 10 40 cell dimensions in A
59 float b; // 11
60 float c; // 12
61 float alpha; // 13 cell angles in degrees
62 float beta; // 14
63 float gamma; // 15
64 int mapc; // 16 column axis
65 int mapr; // 17 row axis
66 int maps; // 18 section axis
67 float amin; // 19 minimum density value
68 float amax; // 20 80 maximum density value
69 float amean; // 21 average density value
70 int ispg; // 22 space group number
71 int nsymbt; // 23 bytes used for sym. ops. table
72 float extra[25]; // 24 user-defined info
73 float xOrigin; // 49 phase origin in pixels
74 float yOrigin; // 50 200
75 float zOrigin; // 51
76 char map[4]; // 52 identifier for map file ("MAP ")
77 char machst[4]; // 53 machine stamp
78 float arms; // 54 RMS deviation
79 int nlabl; // 55 number of labels used
80 char labels[800]; // 56-255 10 80-character labels
81 } ;
82
83 struct MRChead { // file header for MRC data
84 int nx; // 0 0 image size
85 int ny; // 1 4
86 int nz; // 2 8 mz*#vol
87 int mode; // 3 0=schar,1=short,2=float,3=complex_ushort,4=complex_float,6=ushort
88 int nxStart; // 4 unit cell offset
89 int nyStart; // 5
90 int nzStart; // 6
91 int mx; // 7 unit cell size in voxels
92 int my; // 8
93 int mz; // 9 #vol = nz/mz
94 float a; // 10 40 cell dimensions in A
95 float b; // 11
96 float c; // 12
97 float alpha; // 13 cell angles in degrees
98 float beta; // 14
99 float gamma; // 15
100 int mapc; // 16 column axis
101 int mapr; // 17 row axis
102 int maps; // 18 section axis
103 float amin; // 19 minimum density value (amin > amax => not detn)
104 float amax; // 20 80 maximum density value
105 float amean; // 21 average density value (< min(amin,amax) => not detn)
106 int ispg; // 22 space group number/ 2/3/4D config: 0=2D,sg=3D,sg+400=4D
107 int nsymbt; // 23 92 bytes used for extended header
108 float extra1[2]; // 24 user-defined info
109 char exttype[4]; // 26 extended type (CCP4,MRCO,SERI,AGAR,FEI1)
110 int nversion; // 27 108 version: year*10 + sub-version [0,9]
111 float extra2[10]; // 28 user-defined info
112 int imodStamp; // 38 152 IMOD stamp: 1146047817
113 int imodFlags; // 39 1=signed bytes, 16=4-bit values
114 float extra3[9]; // 40 user-defined info
115 float xOrigin; // 49 phase origin in angstroms
116 float yOrigin; // 50 200
117 float zOrigin; // 51
118 char map[4]; // 52 identifier for map file ("MAP ")
119 char machst[4]; // 53 machine stamp
120 float arms; // 54 RMS deviation (<0 => not detn)
121 int nlabl; // 55 number of labels used
122 char labels[800]; // 56-255 10 80-character labels
123 } ;
124
125 // I/O prototypes
126 int readMRC(Bimage* p, int readdata, int img_select);
127 int writeMRC(Bimage* p);
MRCheadold::maps
int maps
Definition: rwMRC.h:34
MRChead2000::a
float a
Definition: rwMRC.h:58
MRChead::yOrigin
float yOrigin
Definition: rwMRC.h:116
MRChead::imodStamp
int imodStamp
Definition: rwMRC.h:112
MRChead::a
float a
Definition: rwMRC.h:94
MRChead2000::nlabl
int nlabl
Definition: rwMRC.h:79
MRCheadold::amean
float amean
Definition: rwMRC.h:37
MRChead::nz
int nz
Definition: rwMRC.h:86
MRChead2000::mx
int mx
Definition: rwMRC.h:55
MRCheadold::ispg
int ispg
Definition: rwMRC.h:38
MRCheadold::b
float b
Definition: rwMRC.h:27
MRCheadold::amin
float amin
Definition: rwMRC.h:35
MRChead2000::yOrigin
float yOrigin
Definition: rwMRC.h:74
MRChead2000::alpha
float alpha
Definition: rwMRC.h:61
MRCheadold::xOrigin
float xOrigin
Definition: rwMRC.h:41
MRChead2000::nsymbt
int nsymbt
Definition: rwMRC.h:71
MRCheadold::amax
float amax
Definition: rwMRC.h:36
MRChead::mz
int mz
Definition: rwMRC.h:93
MRChead2000::xOrigin
float xOrigin
Definition: rwMRC.h:73
MRChead2000
Definition: rwMRC.h:47
MRChead::b
float b
Definition: rwMRC.h:95
MRChead2000::mapc
int mapc
Definition: rwMRC.h:64
MRChead::extra1
float extra1[2]
Definition: rwMRC.h:108
MRChead2000::nz
int nz
Definition: rwMRC.h:50
readMRC
int readMRC(Bimage *p, int readdata, int img_select)
Reading a MRC map image file format.
Definition: rwMRC.cpp:58
Bimage
General image parameter class.
Definition: Bimage.h:163
MRChead2000::nx
int nx
Definition: rwMRC.h:48
MRCheadold::my
int my
Definition: rwMRC.h:24
MRChead2000::zOrigin
float zOrigin
Definition: rwMRC.h:75
MRChead2000::beta
float beta
Definition: rwMRC.h:62
MRChead2000::nxStart
int nxStart
Definition: rwMRC.h:52
MRChead2000::arms
float arms
Definition: rwMRC.h:78
MRChead2000::machst
char machst[4]
Definition: rwMRC.h:77
MRChead2000::mz
int mz
Definition: rwMRC.h:57
MRChead2000::amax
float amax
Definition: rwMRC.h:68
MRCheadold::nzStart
int nzStart
Definition: rwMRC.h:22
MRChead::maps
int maps
Definition: rwMRC.h:102
MRCheadold::labels
char labels[10][80]
Definition: rwMRC.h:44
MRCheadold
Definition: rwMRC.h:15
MRChead::labels
char labels[800]
Definition: rwMRC.h:122
writeMRC
int writeMRC(Bimage *p)
Writing a MRC map image file format.
Definition: rwMRC.cpp:276
MRChead::map
char map[4]
Definition: rwMRC.h:118
MRCheadold::mz
int mz
Definition: rwMRC.h:25
MRCheadold::a
float a
Definition: rwMRC.h:26
MRCheadold::c
float c
Definition: rwMRC.h:28
MRChead2000::mapr
int mapr
Definition: rwMRC.h:65
MRChead2000::maps
int maps
Definition: rwMRC.h:66
MRChead2000::extra
float extra[25]
Definition: rwMRC.h:72
MRCheadold::nz
int nz
Definition: rwMRC.h:18
MRCheadold::alpha
float alpha
Definition: rwMRC.h:29
MRChead::my
int my
Definition: rwMRC.h:92
MRChead::mapr
int mapr
Definition: rwMRC.h:101
MRChead2000::map
char map[4]
Definition: rwMRC.h:76
MRCheadold::mx
int mx
Definition: rwMRC.h:23
MRChead::gamma
float gamma
Definition: rwMRC.h:99
MRChead::amin
float amin
Definition: rwMRC.h:103
MRChead::nsymbt
int nsymbt
Definition: rwMRC.h:107
MRChead::amax
float amax
Definition: rwMRC.h:104
MRChead::nyStart
int nyStart
Definition: rwMRC.h:89
MRChead2000::amin
float amin
Definition: rwMRC.h:67
MRChead2000::ispg
int ispg
Definition: rwMRC.h:70
MRCheadold::nx
int nx
Definition: rwMRC.h:16
MRChead::nxStart
int nxStart
Definition: rwMRC.h:88
MRChead::nversion
int nversion
Definition: rwMRC.h:110
MRChead::nx
int nx
Definition: rwMRC.h:84
MRChead::zOrigin
float zOrigin
Definition: rwMRC.h:117
MRChead2000::nyStart
int nyStart
Definition: rwMRC.h:53
MRCheadold::nlabl
int nlabl
Definition: rwMRC.h:43
MRChead::imodFlags
int imodFlags
Definition: rwMRC.h:113
MRChead::nzStart
int nzStart
Definition: rwMRC.h:90
MRCheadold::mapr
int mapr
Definition: rwMRC.h:33
MRCheadold::nsymbt
int nsymbt
Definition: rwMRC.h:39
MRChead2000::amean
float amean
Definition: rwMRC.h:69
MRChead::mx
int mx
Definition: rwMRC.h:91
MRChead::mapc
int mapc
Definition: rwMRC.h:100
MRChead::amean
float amean
Definition: rwMRC.h:105
MRCheadold::nxStart
int nxStart
Definition: rwMRC.h:20
MRChead::arms
float arms
Definition: rwMRC.h:120
MRChead::ispg
int ispg
Definition: rwMRC.h:106
MRChead::machst
char machst[4]
Definition: rwMRC.h:119
MRChead2000::my
int my
Definition: rwMRC.h:56
rwimg.h
Header file for 2D and 3D image I/O.
MRChead::exttype
char exttype[4]
Definition: rwMRC.h:109
MRCheadold::yOrigin
float yOrigin
Definition: rwMRC.h:42
MRChead::xOrigin
float xOrigin
Definition: rwMRC.h:115
MRChead::alpha
float alpha
Definition: rwMRC.h:97
MRChead2000::mode
int mode
Definition: rwMRC.h:51
MRChead2000::b
float b
Definition: rwMRC.h:59
MRChead2000::ny
int ny
Definition: rwMRC.h:49
MRCheadold::nyStart
int nyStart
Definition: rwMRC.h:21
MRCheadold::gamma
float gamma
Definition: rwMRC.h:31
MRChead
Definition: rwMRC.h:83
MRCheadold::extra
float extra[29]
Definition: rwMRC.h:40
MRChead2000::gamma
float gamma
Definition: rwMRC.h:63
MRCheadold::ny
int ny
Definition: rwMRC.h:17
MRChead::extra2
float extra2[10]
Definition: rwMRC.h:111
MRChead::mode
int mode
Definition: rwMRC.h:87
MRCheadold::mapc
int mapc
Definition: rwMRC.h:32
MRChead::beta
float beta
Definition: rwMRC.h:98
MRChead::extra3
float extra3[9]
Definition: rwMRC.h:114
MRCheadold::beta
float beta
Definition: rwMRC.h:30
MRCheadold::mode
int mode
Definition: rwMRC.h:19
MRChead::c
float c
Definition: rwMRC.h:96
MRChead::nlabl
int nlabl
Definition: rwMRC.h:121
MRChead2000::labels
char labels[800]
Definition: rwMRC.h:80
MRChead2000::nzStart
int nzStart
Definition: rwMRC.h:54
MRChead2000::c
float c
Definition: rwMRC.h:60
MRChead::ny
int ny
Definition: rwMRC.h:85