Xmipp  v3.23.11-Nereus
rwPIF.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Authors: Joaquin Oton (joton@cnb.csic.es)
3  *
4  *
5  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA
21  *
22  * All comments concerning this program package may be sent to the
23  * e-mail address 'xmipp@cnb.csic.es'
24  ***************************************************************************/
25 
26 #ifndef CORE_RWPIF_H_
27 #define CORE_RWPIF_H_
28 
31 
37 typedef struct
38 {
39  // One time file header - 60 bytes -->> 512 total
40  long int file_id; //> BYTE*8 Magic bytes - First 4 bytes ignored.
41  char realScaleFactor[16]; //> char[16] How to convert floatInt*4 into real*4
42  int numImages; //> int*4 Number of images in this file
48  char genProgram[32]; //> Program used to generate this file with version number
49  int htype;
53  int nx; //> int*4 Number of columns
54  int ny; //> int*4 Number of rows
55  int nz; //> int*4 Number of sections
56  int mode;
76  int futureUse[107]; //> 428 Bytes Save some space for use later.
77 }
79 
80 typedef struct
81 {
82  int nx; //> int*4 Number of columns
83  int ny; //> int*4 Number of rows
84  int nz; //> int*4 Number of sections
85  int mode;
105  int bkgnd; //> int*4 Background value
106  int packRadius; //> int*4 Radius of boxed image
107  int nxstart; //> int*4 Number of first col in map
108  int nystart; //> int*4 Number of first row in map
109  int nzstart; //> int*4 Number of first section in map
110  int mx; //> int*4 Number of intervals along x
111  int my; //> int*4 Number of intervals along y
112  int mz; //> int*4 Number of intervals along z
113  float xlength; //> floatInt*4 Cell Dimensions (Angstroms)
114  float ylength; //> floatInt*4 "
115  float zlength; //> floatInt*4 "
116  float alpha; //> floatInt*4 Cell Angles (degrees)
117  float beta; //> floatInt*4 "
118  float gamma; //> floatInt*4 "
119  int mapc; //> int*4 Which axis is col(1,2,3 =x,y,z)
120  int mapr; //> int*4 Which axis is row(1,2,3 =x,y,z)
121  int maps; //> int*4 Which axis is sections(1,2,3 = x,y,z)
122  float min; //> floatInt*4 Min density value
123  float max; //> floatInt*4 Max density value
124  float mean; //> floatInt*4 Mean density value
125  float stdDev; //> floatInt*4 StdDev of GrayLevels
126  int ispg; //> int*4 Space group number
127  int nsymbt; //> int*4 Number of bytes for symmetry ops
128  float xorigin; //> floatInt*4 x origin
129  float yorigin; //> floatInt*4 y origin
130  char titleDescription[80]; //> User defined description
131  char timeStamp[32]; //> Date/time data last modified
132  char microGraphDesignation[16]; //> Unique Micrograph Number
133  char scanNumber[8]; //> Scan Number of Micrograph
134  float aoverb; //> floatInt*4 AOVERB
135  float map_abang; //> floatInt*4 MAP_ABANG
136  float dela; //> floatInt*4 DELA
137  float delb; //> floatInt*4 DELB
138  float delc; //> floatInt*4 DELC
139  int t_matrix[6]; //> t_matrix (array of 6 ints)
140  float dthe; //> floatInt*4 dthe
141  float dphi_90; //> floatInt*4 dphi_90
142  float symmetry; //> floatInt*4 symmetry
143  int binFactor; //> int*4 Image compression factor
144  float a_star; //> floatInt*4 emsf3dbt/emmap3dt stuff
145  float b_star; //> floatInt*4
146  float c_star; //> floatInt*4
147  float alp_star; //> floatInt*4
148  float bet_star; //> floatInt*4
149  float gam_star; //> floatInt*4
150  float pixelSize; //> floatInt*4 From em3dr
151  int futureUse[40]; //> int*4 (160 bytes) Save some space for use later
152 }
154 
160 int readPIF(size_t select_img);
161 
169 int writePIF(size_t select_img = ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE);
170 
171 
172 #endif /* RWPIF_H_ */
int nx
Definition: rwPIF.h:82
float symmetry
Definition: rwPIF.h:142
float gam_star
Definition: rwPIF.h:149
int ispg
Definition: rwPIF.h:126
float delc
Definition: rwPIF.h:138
float xlength
Definition: rwPIF.h:113
int maps
Definition: rwPIF.h:121
float dela
Definition: rwPIF.h:136
int mode
Definition: rwPIF.h:85
float ylength
Definition: rwPIF.h:114
float a_star
Definition: rwPIF.h:144
int bkgnd
Definition: rwPIF.h:105
int binFactor
Definition: rwPIF.h:143
float yorigin
Definition: rwPIF.h:129
float c_star
Definition: rwPIF.h:146
float delb
Definition: rwPIF.h:137
int ny
Definition: rwPIF.h:83
float aoverb
Definition: rwPIF.h:134
int nx
Definition: rwPIF.h:53
float beta
Definition: rwPIF.h:117
int numImages
Definition: rwPIF.h:42
int nystart
Definition: rwPIF.h:108
long int file_id
Definition: rwPIF.h:40
float dphi_90
Definition: rwPIF.h:141
float xorigin
Definition: rwPIF.h:128
int writePIF(size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE)
float bet_star
Definition: rwPIF.h:148
int htype
Definition: rwPIF.h:49
float dthe
Definition: rwPIF.h:140
float stdDev
Definition: rwPIF.h:125
float mean
Definition: rwPIF.h:124
float zlength
Definition: rwPIF.h:115
int nxstart
Definition: rwPIF.h:107
void mode
int nsymbt
Definition: rwPIF.h:127
int nz
Definition: rwPIF.h:55
int mode
Definition: rwPIF.h:56
float gamma
Definition: rwPIF.h:118
int nzstart
Definition: rwPIF.h:109
float pixelSize
Definition: rwPIF.h:150
float alpha
Definition: rwPIF.h:116
int packRadius
Definition: rwPIF.h:106
int mapc
Definition: rwPIF.h:119
#define ALL_IMAGES
int mapr
Definition: rwPIF.h:120
float map_abang
Definition: rwPIF.h:135
int endianNess
Definition: rwPIF.h:43
float b_star
Definition: rwPIF.h:145
int nz
Definition: rwPIF.h:84
float min
Definition: rwPIF.h:122
int readPIF(size_t select_img)
float max
Definition: rwPIF.h:123
float alp_star
Definition: rwPIF.h:147
int ny
Definition: rwPIF.h:54