IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
SpiderHeader.h
Go to the documentation of this file.
1 /**
2  * \file IMP/em/SpiderHeader.h
3  * \brief Header for Spider and Xmipp formats
4  *
5  * Copyright 2007-2015 IMP Inventors. All rights reserved.
6 */
7 
8 #ifndef IMPEM_SPIDER_HEADER_H
9 #define IMPEM_SPIDER_HEADER_H
10 
11 #include <ostream>
12 #include <IMP/em/em_config.h>
13 
14 IMPEM_BEGIN_NAMESPACE
15 
16 //! Header for Spider images. IMP-EM is designed to be compatible with it
17 struct SpiderHeader {
18  //! Number of slices (=1 for images)
19  float fNslice;
20  //! Number of rows
21  float fNrow;
22  //! Total number of records
23  float fNrec;
24  //! Auxiliary number used to compute the number of records
25  float fNlabel;
26  //! FILE TYPE SPECIFIER.
27  /**
28  * +3 FOR A 3-D FILE (FLOAT)
29  * +1 FOR A 2-D IMAGE (FLOAT)
30  * -1 FOR A 2-D FOURIER TRANSFORM
31  * -3 FOR A 3-D FOURIER TRANSFORM
32  * -5 FOR A NEW 2-D FOURIER TRANSFORM
33  * -7 FOR A NEW 3-D FOURIER TRANSFORM
34  * +8 FOR A 2-D EIGHT BIT IMAGE FILE
35  * +9 FOR A 2-D INT IMAGE FILE
36  * 10 FOR A 3-D INT IMAGE FILE
37  * 11 FOR A 2-D EIGHT BIT COLOR IMAGE FILE
38  **/
39  float fIform;
40  //! MAXIMUM/MINIMUM FLAG.
41  /** IS SET AT 0 WHEN THE FILE IS CREATED, AND AT 1 WHEN THE MAXIMUM AND
42  * MINIMUM HAVE BEEN COMPUTED, AND HAVE BEEN STORED
43  * INTO THIS LABEL RECORD (SEE FOLLOWING WORDS)
44  */
45  float fImami;
46  //! maximum value in the image
47  float fFmax;
48  //! minimum value in the image
49  float fFmin;
50  //! average value
51  float fAv;
52  //! Standard deviation. If -1 it means that it has no been computed
53  float fSig;
54  //! FLAG INDICATING IF THE HISTOGRAM HAS BE COMPUTED. NOT USED IN 3D FILES!
55  float fIhist; // It is obsolete in Spider
56  //! Number of columns
57  float fNcol;
58  //! number of records in file header (label)
59  float fLabrec;
60  //! flag that tilt angles are present.
61  float fIangle;
62  //! 1st Euler rotation angle (Rot) (ZYZ convention)
63  float fPhi;
64  //! 2nd Euler rotation angle (Tilt) (ZYZ convention)
65  float fTheta;
66  //! 3rd Euler rotation angle (Psi) (ZYZ convention)
67  float fPsi;
68  //! X TRANSLATION
69  float fXoff;
70  //! Y TRANSLATION
71  float fYoff;
72  //! Z TRANSLATION
73  float fZoff;
74  //! SCALE
75  float fScale;
76  //! Total number of bytes in the header
77  float fLabbyt;
78  //! RECORD LENGTH IN BYTES
79  float fLenbyt;
80  //! this is a Spider incongruence. 24 bytes without meaning
81  char fNothing[24];
82  //! THAT ANGLES ARE SET.
83  /**
84  * 1 = ONE ADDITIONAL
85  * ROTATION IS PRESENT, 2 = ADDITIONAL ROTATION
86  * THAT PRECEDES THE ROTATION THAT WAS STORED IN
87  * 15 FOR DETAILS SEE MANUAL CHAPTER VOCEUL.MAN
88  */
89  float fFlag;
90  float fPhi1;
91  float fTheta1;
92  float fPsi1;
93  float fPhi2;
94  float fTheta2;
95  float fPsi2;
96  double fGeo_matrix[3][3]; //! x9 = 72 bytes: Geometric info
97  float fAngle1; //! angle info
98  float fr1;
99  float fr2; //! lift up cosine mask parameters
100  //! For Radon transforms
101  float RTflag; //! 1=RT, 2=FFT(RT)
102  float Astart;
103  float Aend;
104  float Ainc;
105  float Rsigma; //! 4*7 = 28 bytes
106  float Tstart;
107  float Tend;
108  float Tinc; //! 4*3 = 12, 12+28 = 40B
109  //! For Max-Likelihood refinement (Xmipp compatibility)
110  float Weight;
111  //! 0= no flipping , 1= flipping (Xmipp compatibility)
112  float Flip;
113  //! Empty field in the SPIDER header format.
114  /**
115  * Originally is 700 bytes long, but additional information has been added:
116  * empty 700-76-40=624-40-8= 576 bytes
117  */
118  char empty[576];
119  //! date
120  char szIDat[12];
121  //! time of creation
122  char szITim[8];
123  //! Title
124  char szITit[160];
125 
126  void show(std::ostream& out) const { out << "SpiderHeader"; }
127 };
128 
129 IMPEM_END_NAMESPACE
130 
131 #endif /* IMPEM_SPIDER_HEADER_H */
float Flip
0= no flipping , 1= flipping (Xmipp compatibility)
Definition: SpiderHeader.h:112
float fPsi
3rd Euler rotation angle (Psi) (ZYZ convention)
Definition: SpiderHeader.h:67
Header for Spider images. IMP-EM is designed to be compatible with it.
Definition: SpiderHeader.h:17
float fYoff
Y TRANSLATION.
Definition: SpiderHeader.h:71
float fFlag
THAT ANGLES ARE SET.
Definition: SpiderHeader.h:89
float Weight
For Max-Likelihood refinement (Xmipp compatibility)
Definition: SpiderHeader.h:110
float fNlabel
Auxiliary number used to compute the number of records.
Definition: SpiderHeader.h:25
float fFmin
minimum value in the image
Definition: SpiderHeader.h:49
float fLabrec
number of records in file header (label)
Definition: SpiderHeader.h:59
float fNslice
Number of slices (=1 for images)
Definition: SpiderHeader.h:19
float fNcol
Number of columns.
Definition: SpiderHeader.h:57
float fIform
FILE TYPE SPECIFIER.
Definition: SpiderHeader.h:39
float fNrec
Total number of records.
Definition: SpiderHeader.h:23
float fNrow
Number of rows.
Definition: SpiderHeader.h:21
float fTheta
2nd Euler rotation angle (Tilt) (ZYZ convention)
Definition: SpiderHeader.h:65
float fPhi
1st Euler rotation angle (Rot) (ZYZ convention)
Definition: SpiderHeader.h:63
float fZoff
Z TRANSLATION.
Definition: SpiderHeader.h:73
float fLabbyt
Total number of bytes in the header.
Definition: SpiderHeader.h:77
float fScale
SCALE.
Definition: SpiderHeader.h:75
float fIangle
flag that tilt angles are present.
Definition: SpiderHeader.h:61
float fAv
average value
Definition: SpiderHeader.h:51
float fLenbyt
RECORD LENGTH IN BYTES.
Definition: SpiderHeader.h:79
float fFmax
maximum value in the image
Definition: SpiderHeader.h:47
float fAngle1
x9 = 72 bytes: Geometric info
Definition: SpiderHeader.h:97
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
float Astart
1=RT, 2=FFT(RT)
Definition: SpiderHeader.h:102
float fr1
angle info
Definition: SpiderHeader.h:98
float fIhist
FLAG INDICATING IF THE HISTOGRAM HAS BE COMPUTED. NOT USED IN 3D FILES!
Definition: SpiderHeader.h:55
float fXoff
X TRANSLATION.
Definition: SpiderHeader.h:69
float fImami
MAXIMUM/MINIMUM FLAG.
Definition: SpiderHeader.h:45
float RTflag
For Radon transforms.
Definition: SpiderHeader.h:101
float Tstart
4*7 = 28 bytes
Definition: SpiderHeader.h:106
float fSig
Standard deviation. If -1 it means that it has no been computed.
Definition: SpiderHeader.h:53