00001 /** 00002 * \file SpiderHeader.h 00003 * \brief Header for Spider and Xmipp formats 00004 * \author Javier Velazquez-Muriel 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPEM_SPIDER_HEADER_H 00009 #define IMPEM_SPIDER_HEADER_H 00010 00011 #include "em_config.h" 00012 00013 IMPEM_BEGIN_NAMESPACE 00014 00015 //! Header for Spider images. IMP-EM is designed to be compatible with it 00016 struct SpiderHeader { 00017 //! Number of slices (=1 for images) 00018 float fNslice; 00019 //! Number of rows 00020 float fNrow; 00021 //! Total number of records 00022 float fNrec; 00023 //! Auxiliary number used to compute the number of records 00024 float fNlabel; 00025 //! FILE TYPE SPECIFIER. 00026 /** 00027 * +3 FOR A 3-D FILE (FLOAT) 00028 * +1 FOR A 2-D IMAGE (FLOAT) 00029 * -1 FOR A 2-D FOURIER TRANSFORM 00030 * -3 FOR A 3-D FOURIER TRANSFORM 00031 * -5 FOR A NEW 2-D FOURIER TRANSFORM 00032 * -7 FOR A NEW 3-D FOURIER TRANSFORM 00033 * +8 FOR A 2-D EIGHT BIT IMAGE FILE 00034 * +9 FOR A 2-D INT IMAGE FILE 00035 * 10 FOR A 3-D INT IMAGE FILE 00036 * 11 FOR A 2-D EIGHT BIT COLOR IMAGE FILE 00037 **/ 00038 float fIform; 00039 //! MAXIMUM/MINIMUM FLAG. 00040 /** IS SET AT 0 WHEN THE FILE IS CREATED, AND AT 1 WHEN THE MAXIMUM AND 00041 * MINIMUM HAVE BEEN COMPUTED, AND HAVE BEEN STORED 00042 * INTO THIS LABEL RECORD (SEE FOLLOWING WORDS) 00043 */ 00044 float fImami; 00045 //! maximum value in the image 00046 float fFmax; 00047 //! minimum value in the image 00048 float fFmin; 00049 //! average value 00050 float fAv; 00051 //! Standard deviation. If -1 it means that it has no been computed 00052 float fSig; 00053 //! FLAG INDICATING IF THE HISTOGRAM HAS BE COMPUTED. NOT USED IN 3D FILES! 00054 float fIhist; // It is obsolete in Spider 00055 //! Number of columns 00056 float fNcol; 00057 //! number of records in file header (label) 00058 float fLabrec; 00059 //! flag that tilt angles are present. 00060 float fIangle; 00061 //! 1st Euler rotation angle (Rot) (ZYZ convention) 00062 float fPhi; 00063 //! 2nd Euler rotation angle (Tilt) (ZYZ convention) 00064 float fTheta; 00065 //! 3rd Euler rotation angle (Psi) (ZYZ convention) 00066 float fPsi; 00067 //! X TRANSLATION 00068 float fXoff; 00069 //! Y TRANSLATION 00070 float fYoff; 00071 //! Z TRANSLATION 00072 float fZoff; 00073 //! SCALE 00074 float fScale; 00075 //! Total number of bytes in the header 00076 float fLabbyt; 00077 //! RECORD LENGTH IN BYTES 00078 float fLenbyt; 00079 //! this is a Spider incongruence. 24 bytes without meaning 00080 char fNothing[24]; 00081 //! THAT ANGLES ARE SET. 00082 /** 00083 * 1 = ONE ADDITIONAL 00084 * ROTATION IS PRESENT, 2 = ADDITIONAL ROTATION 00085 * THAT PRECEEDS THE ROTATION THAT WAS STORED IN 00086 * 15 FOR DETAILS SEE MANUAL CHAPTER VOCEUL.MAN 00087 */ 00088 float fFlag; 00089 float fPhi1; 00090 float fTheta1; 00091 float fPsi1; 00092 float fPhi2; 00093 float fTheta2; 00094 float fPsi2; 00095 double fGeo_matrix[3][3]; //! x9 = 72 bytes: Geometric info 00096 float fAngle1; //! angle info 00097 float fr1; 00098 float fr2; //! lift up cosine mask parameters 00099 //! For Radon transforms 00100 float RTflag; //! 1=RT, 2=FFT(RT) 00101 float Astart; 00102 float Aend; 00103 float Ainc; 00104 float Rsigma; //! 4*7 = 28 bytes 00105 float Tstart; 00106 float Tend; 00107 float Tinc; //! 4*3 = 12, 12+28 = 40B 00108 //! For Max-Likelihood refinement (Xmipp compatibility) 00109 float Weight; 00110 //! 0= no flipping , 1= flipping (Xmipp compatibility) 00111 float Flip; 00112 //! Empty field in the SPIDER header format. 00113 /** 00114 * Originally is 700 bytes long, but additional information has been added: 00115 * empty 700-76-40=624-40-8= 576 bytes 00116 */ 00117 char empty[576]; 00118 //! date 00119 char szIDat[12]; 00120 //! time of creation 00121 char szITim[8]; 00122 //! Title 00123 char szITit[160]; 00124 }; 00125 00126 00127 IMPEM_END_NAMESPACE 00128 00129 #endif /* IMPEM_SPIDER_HEADER_H */