Bsoft  2.1.0
Bernard's software package
rwMRC.cpp
Go to the documentation of this file.
1 
9 #include "rwMRC.h"
10 #include "rwCCP4.h"
11 #include "file_util.h"
12 #include "utilities.h"
13 
14 #ifndef NOSYMOP
15 #include "rwsymop.h"
16 #endif
17 
18 // Declaration of global variables
19 extern int verbose; // Level of output to the screen
20 
21 struct SERIhead {
22  short tilt; // 100 x tilt angle in degrees
23  short stageX; // stage coordinate x 25
24  short stageY; // stage coordinate x 25
25  short mag; // magnfication / 100
26  short intensity; // intensity x 25000
27  short dose1; // dose as two shorts
28  short dose2;
29 };
30 
58 int readMRC(Bimage* p, int readdata, int img_select)
59 {
60  ifstream* fimg = new ifstream(p->file_name());
61  if ( fimg->fail() ) return -1;
62 
63  MRChead* header = new MRChead;
64 
65  fimg->read((char *)header, MRCSIZE);
66  if ( fimg->fail() ) return -2;
67 
68  if ( verbose & VERB_DEBUG )
69  cout << "DEBUG readMRC: File opened" << endl;
70 
71  string exttype(header->exttype, 0, 4);
72  if ( exttype.length() < 1 || exttype[0] == ' ' )
73  if ( strncmp(header->labels, "Seri", 4) == 0 ) exttype = "SERI"; // SerialEM
74 
75 // cout << header->labels << endl;
76 // cout << "length of exttype: " << exttype.length() << endl;
77 
78  if ( verbose & VERB_PROCESS ) {
79  cout << "Header version: " << header->nversion << endl;
80  cout << "Extended header type: " << exttype << endl;
81  }
82 
83  // Determine byte order and swap bytes if from little-endian machine
84  unsigned char* b = (unsigned char *) header;
85  long i, sb(0);
86  if ( abs(header->mode) > SWAPTRIG || abs(header->mapc) > SWAPTRIG ) {
87  if ( verbose & VERB_PROCESS )
88  cerr << "Warning: Swapping header byte order for 4-byte types" << endl;
89  sb = 1;
90  long extent = MRCSIZE - 800; // exclude labels from swapping
91  for ( i=0; i<extent; i+=4 ) swapbytes(b+i, 4);
92  }
93 
94  if ( header->nx < 1 || header->ny < 1 || header->nz < 1 || header->mode < 0 ) {
95  cerr << "Error readMRC: The file " << p->file_name() << " is not a valid MRC image!" << endl;
96  fimg->close();
97  return -3;
98  }
99 
100  // Convert VAX floating point types if necessary
101 /* if ( header->amin > header->amax ) {
102  if ( verbose & VERB_PROCESS )
103  cerr << "Warning: Converting VAX floating point" << endl;
104  for ( i=40; i<64; i+=4 ) // Unit cell parameters
105  vax2ieee(b+i, sb);
106  for ( i=76; i<88; i+=4 ) // Min, max, mean
107  vax2ieee(b+i, sb);
108  for ( i=96; i<220; i+=4 ) // Extra and origin
109  vax2ieee(b+i, sb);
110  }
111 */
112  string ext(extension(p->file_name()));
113 
114  long nimg(0);
115 
116  // Old versions: pre-2015
117  if ( header->nversion < 20140 || header->nversion > 20209 ) {
118  if ( verbose & VERB_DEBUG )
119  cout << "DEBUG readMRC: ---old version---" << endl;
120  if ( strncmp(header->map, "STK ", 4) == 0 || ext == "st" || ext == "stk" ||
121 // ext.contains("ali") || ext == "mrcs" || header->ispg < 1 ) {
122  ext.find("ali") != string::npos || ext == "mrcs" || exttype == "SERI" ) {
123 // ext.contains("ali") || ext == "mrcs" ) {
124  nimg = header->nz;
125  p->size(header->nx, header->ny, 1);
126  } else if ( header->mz && header->mz < header->nz ) {
127  nimg = header->nz/header->mz;
128  p->size(header->nx, header->ny, header->mz);
129  } else {
130  nimg = 1;
131  p->size(header->nx, header->ny, header->nz);
132  }
133  }
134  // New versions: 2015+
135  else {
136  if ( verbose & VERB_DEBUG )
137  cout << "DEBUG readMRC: ---new version---" << endl;
138  if ( header->nz%header->mz ) {
139  cerr << "Error: The image " << p->file_name() << " incorrectly specifies the number of slices and volumes!" << endl;
140  cerr << tab << "NZ = " << header->nz << " MZ = " << header->mz << endl;
141  }
142  if ( exttype == "SERI" ) {
143  p->size(header->nx, header->ny, 1);
144  nimg = header->nz;
145  } else {
146  p->size(header->nx, header->ny, header->mz);
147  nimg = header->nz/header->mz;
148  }
149  }
150 
151  p->channels(1);
152 
153  // Allocating the single sub-image and setting its origin
154  if ( img_select > -1 ) {
155  if ( img_select >= nimg ) img_select = nimg - 1;
156  nimg = 1;
157  }
158  if ( verbose & VERB_DEBUG )
159  cout << "DEBUG readMRC: number of images = " << nimg << endl;
160  p->images(nimg);
161 
162  switch ( header->mode ) {
163  case 0:
164  if ( header->imodFlags & 1 ) p->data_type(SCharacter);
165  else p->data_type(UCharacter);
166 // if ( ext == "mrc" && exttype != "SERI" ) p->data_type(SCharacter);
167  break;
168  case 1: p->data_type(Short); break;
169  case 2: p->data_type(Float); break;
170  case 3: p->data_type(Short); p->compound_type(TComplex); p->channels(2); break;
171  case 4: p->data_type(Float); p->compound_type(TComplex); p->channels(2); break;
172  case 6: p->data_type(UShort); break;
173  case 7: p->data_type(Integer); break;
174  case 16: p->data_type(UCharacter); p->compound_type(TRGB); p->channels(3); break;
175  default: p->data_type(UCharacter); break;
176  }
177 
178  p->minimum(header->amin);
179  p->maximum(header->amax);
180  p->average(header->amean);
181  p->standard_deviation(header->arms);
182 
183  UnitCell uc(header->a, header->b, header->c, header->alpha, header->beta, header->gamma);
184  uc.degrees_to_radians();
185  p->unit_cell(uc);
186 
187  if ( header->mx && header->my && header->mz )
188  p->sampling(header->a/header->mx, header->b/header->my, header->c/header->mz);
189  if ( header->ispg >= 400 ) p->space_group(header->ispg-400);
190  else p->space_group(header->ispg);
191  p->label(header->labels);
192 
193  p->origin(-header->xOrigin/p->sampling(0)[0], -header->yOrigin/p->sampling(0)[1], -header->zOrigin/p->sampling(0)[2]); // New header
194 
195  if ( header->nsymbt > 0 ) {
196  char* ext_header = new char[header->nsymbt];
197  fimg->read((char *)ext_header, header->nsymbt);
198  if ( fimg->fail() ) return -1;
199  if ( exttype == "JSON" ) {
200  if ( verbose & VERB_DEBUG )
201  cout << "DEBUG readMRC: reading JSON header" << endl;
202  JSparser parser(ext_header, header->nsymbt);
203  p->meta_data() = parser.parse();
204  if ( img_select > -1 ) p->meta_data_retain_one_image(img_select);
206  } else if ( exttype == "SERI" ) {
207  if ( verbose & VERB_DEBUG )
208  cout << "DEBUG readMRC: reading SerialEM header" << endl;
209  SERIhead* serihead = (SERIhead *) ext_header;
210  JSvalue arr(JSarray);
211  JSvalue img(JSobject);
212  for ( i=0; i<header->nz; ++i ) if ( img_select < 0 || img_select == i ) {
213  img["Tilt"] = serihead[i].tilt/100.0;
214  img["StageX"] = serihead[i].stageX/25.0;
215  img["StageY"] = serihead[i].stageY/25.0;
216  img["Magnification"] = serihead[i].mag*100.0;
217  img["Intensity"] = serihead[i].intensity/25000.0;
218  img["Dose"] = serihead[i].dose1;
219  arr.push_back(img);
220  }
221  p->meta_data()["image"] = arr;
222 // cout << p->meta_data() << endl;
223  }
224  if ( ext_header ) delete[] ext_header;
225  }
226 
227 // cout << "readMRC:" << endl << p->meta_data() << endl;
228 
229  p->data_offset(MRCSIZE + header->nsymbt);
230  if ( header->mode%5 > 2 && header->mode%5 < 5 ) {
231  fimg->seekg(0, ios::end);
232  if ( (double) fimg->tellg() > p->data_offset() + 0.8*p->alloc_size() )
233  p->sizeX(2*(p->sizeX() - 1));
234  if ( header->mx%2 == 1 ) p->sizeX(p->sizeX() + 1); // Quick fix for odd x-size maps
235  fimg->clear();
236  fimg->seekg(0, ios::beg);
237  }
238 
239  delete header;
240 
241  if ( verbose & VERB_DEBUG )
242  cout << "DEBUG rwMRC: Header setup done" << endl;
243 
244  long readsize = p->alloc_size();
245  unsigned char* data = NULL;
246 
247  if ( img_select < 0 ) img_select = 0;
248 
249  if ( readdata ) {
250  p->data_alloc();
251  if ( p->compound_type() == TSimple ) {
252  fread_large(p->data_pointer(), readsize, p->data_offset() + img_select*readsize, fimg);
253  if ( sb ) swapbytes(readsize, p->data_pointer(), p->data_type_size());
254  } else {
255  readsize = p->channels()*(p->sizeX()/2+1)*p->sizeY()*p->sizeZ()*p->data_type_size();
256  data = new unsigned char[readsize];
257  fread_large(data, readsize, p->data_offset() + img_select*readsize, fimg);
258  if ( sb ) swapbytes(readsize, data, p->data_type_size());
259  p->unpack_transform(data, CentHerm);
260  delete[] data;
261  }
262  }
263 
264  fimg->close();
265  delete fimg;
266 
267  return 0;
268 }
269 
277 {
278  p->color_to_simple();
279 
280  if ( p->compound_type() == TComplex ) p->change_type(Float);
281 
282  string ext(extension(p->file_name()));
283 
284  switch ( p->data_type() ) {
285  case Bit: case UCharacter:
286  p->change_type(UCharacter); break;
287  case SCharacter:
288  if ( ext == "mrc" ) p->change_type(SCharacter);
289  if ( ext != "mrc" ) p->change_type(UCharacter); break;
290  case UShort: case Short:
291  p->change_type(Short); break;
292  default:
293  p->change_type(Float); break;
294  }
295 
296  MRChead* header = new MRChead;
297  memset(header, 0, sizeof(MRChead));
298 
299  // Map the parameters
300  UnitCell uc = p->unit_cell();
301  strncpy(header->map, "MAP ", 4);
302  header->nversion = 20140;
304  header->nx = p->sizeX();
305  header->ny = p->sizeY();
306  header->nz = p->images() * p->sizeZ();
307  if ( p->compound_type() == TComplex ) header->nx = p->sizeX()/2 + 1; // If a transform, physical storage is nx/2 + 1
308  switch ( p->data_type() ) {
309  case UCharacter: header->mode = 0; header->imodFlags = 0; break;
310  case SCharacter: header->mode = 0; header->imodFlags |= 1; break;
311  case UShort: header->mode = 6; break;
312  case Short: header->mode = 1; if ( p->compound_type() == TComplex ) header->mode = 3; break;
313  case Float: header->mode = 2; if ( p->compound_type() == TComplex ) header->mode = 4; break;
314  default: header->mode = 0; break;
315  }
316  if ( p->image->origin()[0] >= 0 )
317  header->nxStart = (int) -(p->image->origin()[0] + 0.5);
318  else
319  header->nxStart = (int) -(p->image->origin()[0] - 0.5);
320  if ( p->image->origin()[1] >= 0 )
321  header->nyStart = (int) -(p->image->origin()[1] + 0.5);
322  else
323  header->nyStart = (int) -(p->image->origin()[1] - 0.5);
324  if ( p->image->origin()[2] >= 0 )
325  header->nzStart = (int) -(p->image->origin()[2] + 0.5);
326  else
327  header->nzStart = (int) -(p->image->origin()[2] - 0.5);
328  header->mx = (int) (uc.a()/p->sampling(0)[0] + 0.5);
329  header->my = (int) (uc.b()/p->sampling(0)[1] + 0.5);
330  header->mz = (int) (uc.c()/p->sampling(0)[2] + 0.5);
331  header->mz = p->sizeZ();
332  header->mapc = 1;
333  header->mapr = 2;
334  header->maps = 3;
335  header->amin = p->minimum();
336  header->amax = p->maximum();
337  header->amean = p->average();
338  header->arms = p->standard_deviation();
339  header->a = uc.a();
340  header->b = uc.b();
341  header->c = uc.c();
342 // header->xOrigin = p->image->origin()[0];
343 // header->yOrigin = p->image->origin()[1];
344 // header->zOrigin = p->image->origin()[2];
345  header->xOrigin = -p->image->origin()[0]*p->sampling(0)[0];
346  header->yOrigin = -p->image->origin()[1]*p->sampling(0)[1];
347  header->zOrigin = -p->image->origin()[2]*p->sampling(0)[2];
348 
349  // This is a band-aid to overcome the limitations of the image format
350  if ( fabs(uc.a() - p->sampling(0)[0]*header->mx) > 0.001 || fabs(uc.b() - p->sampling(0)[1]*header->my) > 0.001 ||
351  fabs(uc.c() - p->sampling(0)[2]*header->mz) > 0.001 ) {
352  header->a = p->sampling(0)[0]*header->mx;
353  header->b = p->sampling(0)[1]*header->my;
354  header->c = p->sampling(0)[2]*header->mz;
355  if ( verbose & VERB_FULL )
356  cerr << "Warning: Resetting the unit cell to: " << header->a << "," << header->b << "," << header->c << endl;
357  }
358 
359  header->alpha = uc.alpha()*180/M_PI;
360  header->beta = uc.beta()*180/M_PI;
361  header->gamma = uc.gamma()*180/M_PI;
362  if ( p->sizeZ() > 1 ) {
363  header->ispg = p->space_group();
364  if ( header->ispg < 1 ) header->ispg = 1;
365  if ( p->images() > 1 ) header->ispg += 400;
366  }
367 
368  int nsym(0), jflag(1);
369  Bstring temp;
370  char* symop = NULL;
371  stringstream ss;
372 
373  if ( jflag ) {
374  ss << p->meta_data() << endl;
375  header->nsymbt = ss.tellp();
376 // cout << "Metadata size: " << header->nsymbt << endl;
377  strncpy(header->exttype, "JSON", 4);
378  } else {
379 #ifndef NOSYMOP
380  if ( p->space_group() > 0 ) {
381  symop = read_symop(temp, p->space_group(), nsym);
382  strncpy(header->exttype, "CCP4", 4);
383  }
384 #endif
385  header->nsymbt = nsym*80;
386  }
387  if ( verbose & VERB_DEBUG )
388  cout << "DEBUG rwMRC: nsymbt = " << header->nsymbt << endl;
389 
390  long i;
391 
392  header->nlabl = 10;
393  strncpy(header->labels, p->label().c_str(), 799);
394  header->labels[799] = 0;
395 
396  if ( verbose & VERB_DEBUG ) {
397  cout << "DEBUG rwMRC: nlabl = " << header->nlabl << endl;
398  for ( i=0; i<header->nlabl; i++ )
399  if ( header->labels[i*80] ) cout << &header->labels[i*80] << endl;
400  }
401 
402  p->data_offset(MRCSIZE + header->nsymbt);
403 
404  long datatypesize = p->channels()*p->data_type_size();
405  long datasize = (long)header->nx*header->ny*header->nz*datatypesize;
406 
407  if ( verbose & VERB_DEBUG )
408  cout << "DEBUG rwMRC: offset=" << p->data_offset() << " typesize=" << datatypesize << " datasize=" << datasize << endl;
409 
410  unsigned char* data = NULL;
411 
412  ofstream fimg(p->file_name());
413  if ( fimg.fail() ) return -1;
414 
415  fimg.write((char *)header, MRCSIZE);
416 
417  if ( header->nsymbt ) {
418  if ( jflag ) fimg << ss.rdbuf();
419  else fimg.write((char *)symop, header->nsymbt);
420  }
421 
422  if ( p->data_pointer() ) {
423  if ( p->compound_type() < TComplex ) {
424  fimg.write((char *)p->data_pointer(), datasize);
425  } else {
426  data = new unsigned char[datasize];
427  p->pack_transform(data, CentHerm);
428  fimg.write((char *)data, datasize);
429  delete[] data;
430  }
431  }
432 
433  fimg.close();
434 
435  if ( symop ) delete[] symop;
436  delete header;
437 
438  return 0;
439 }
440 
rwsymop.h
Header file for reading and writing symmetry operators.
CentHerm
@ CentHerm
Definition: Bimage.h:45
SERIhead::dose1
short dose1
Definition: rwMRC.cpp:27
Bimage::sizeZ
void sizeZ(long nz)
Definition: Bimage.h:392
JSarray
@ JSarray
Definition: json.h:27
MRChead
Definition: rwMRC.h:83
Bit
@ Bit
Definition: utilities.h:152
VERB_DEBUG
#define VERB_DEBUG
Definition: utilities.h:116
MRChead::a
float a
Definition: rwMRC.h:94
UCharacter
@ UCharacter
Definition: utilities.h:153
SERIhead::stageY
short stageY
Definition: rwMRC.cpp:24
file_util.h
Header file for file checking functions.
fread_large
int fread_large(unsigned char *aptr, size_t pagesize, size_t offset, ifstream *fimg)
Reads blocks of memeory no larger than 1Gb.
Definition: file_util.cpp:347
Bstring
Definition: Bstring.h:29
UnitCell::c
void c(double d)
Definition: UnitCell.h:38
MRChead::yOrigin
float yOrigin
Definition: rwMRC.h:116
writeMRC
int writeMRC(Bimage *p)
Writing a MRC map image file format.
Definition: rwMRC.cpp:276
MRChead::beta
float beta
Definition: rwMRC.h:98
SERIhead
Definition: rwMRC.cpp:21
set_CCP4_machine_stamp
int set_CCP4_machine_stamp(char *machine_stamp)
Setting a CCP4 style machine stamp.
Definition: rwCCP4.cpp:34
MRChead::c
float c
Definition: rwMRC.h:96
Bimage::sizeX
void sizeX(long nx)
Definition: Bimage.h:390
Bimage::unit_cell
void unit_cell(UnitCell uc)
Definition: Bimage.h:608
TComplex
@ TComplex
Definition: Bimage.h:60
Bimage::size
Vector3< long > size() const
Definition: Bimage.h:386
Bimage::meta_data_retain_one_image
void meta_data_retain_one_image(long img_num)
Erases all sub-image records from the meta data except one.
Definition: Bimage.cpp:771
sb
int sb(0)
UnitCell::b
void b(double d)
Definition: UnitCell.h:37
Bimage::data_type_size
long data_type_size() const
Returns the size of the datatype in bytes.
Definition: Bimage.cpp:1607
Bimage::image
Bsub_image * image
Definition: Bimage.h:202
VERB_PROCESS
#define VERB_PROCESS
Definition: utilities.h:111
Bimage::maximum
double maximum()
Definition: Bimage.h:542
MRCSIZE
#define MRCSIZE
Definition: rwMRC.h:13
JSparser::parse
JSvalue parse()
Definition: json.h:416
Bimage::standard_deviation
double standard_deviation()
Definition: Bimage.h:544
readMRC
int readMRC(Bimage *p, int readdata, int img_select)
Reading a MRC map image file format.
Definition: rwMRC.cpp:58
MRChead::mz
int mz
Definition: rwMRC.h:93
SERIhead::tilt
short tilt
Definition: rwMRC.cpp:22
Bimage::images
long images()
Definition: Bimage.h:504
JSparser
Definition: json.h:386
Bsub_image::origin
void origin(double x, double y, double z)
Definition: Bimage.h:136
verbose
int verbose
Short
@ Short
Definition: utilities.h:156
TSimple
@ TSimple
Definition: Bimage.h:59
Bimage::pack_transform
int pack_transform(unsigned char *data, FourierType tf)
Definition: Bimage.cpp:2441
Bimage::sizeY
void sizeY(long ny)
Definition: Bimage.h:391
MRChead::gamma
float gamma
Definition: rwMRC.h:99
Bimage::alloc_size
long alloc_size() const
Definition: Bimage.h:267
MRChead::maps
int maps
Definition: rwMRC.h:102
MRChead::b
float b
Definition: rwMRC.h:95
rwCCP4.h
Header file for reading and writing CCP4 files.
swapbytes
void swapbytes(unsigned char *v, size_t n)
Swaps bytes.
Definition: utilities.cpp:468
SERIhead::stageX
short stageX
Definition: rwMRC.cpp:23
Bimage::data_offset
long data_offset()
Definition: Bimage.h:288
UShort
@ UShort
Definition: utilities.h:155
Bimage::meta_data
JSvalue & meta_data()
Definition: Bimage.h:234
TRGB
@ TRGB
Definition: Bimage.h:63
Bimage
General image parameter class.
Definition: Bimage.h:177
Bimage::compound_type
CompoundType compound_type()
Definition: Bimage.h:364
Bimage::average
double average(long cc, double xf, double yf, double zf, long nn, double iscale)
Averages in 3D when scaling is less than 1.
Definition: Bimage.cpp:1371
MRChead::mapr
int mapr
Definition: rwMRC.h:101
UnitCell::alpha
void alpha(double d)
Definition: UnitCell.h:39
Bimage::data_alloc
unsigned char * data_alloc()
Definition: Bimage.h:271
Bimage::color_to_simple
void color_to_simple()
A color image is converted to a simple image.
Definition: Bimage_color.cpp:94
UnitCell::a
void a(double d)
Definition: UnitCell.h:36
JSvalue
Definition: json.h:53
MRChead::labels
char labels[800]
Definition: rwMRC.h:122
JSvalue::push_back
void push_back(const JSvalue &val)
Definition: json.h:197
MRChead::imodFlags
int imodFlags
Definition: rwMRC.h:113
Bimage::file_name
void file_name(string s)
Definition: Bimage.h:245
Bimage::data_type
DataType data_type()
Definition: Bimage.h:362
M_PI
#define M_PI
Definition: utilities.h:63
utilities.h
Header file for general utilities.
tab
ostream & tab(ostream &out)
Definition: utilities.cpp:22
MRChead::my
int my
Definition: rwMRC.h:92
MRChead::mapc
int mapc
Definition: rwMRC.h:100
Integer
@ Integer
Definition: utilities.h:158
MRChead::amin
float amin
Definition: rwMRC.h:103
MRChead::nyStart
int nyStart
Definition: rwMRC.h:89
rwMRC.h
Header file for reading and writing MRC files.
MRChead::nxStart
int nxStart
Definition: rwMRC.h:88
MRChead::mx
int mx
Definition: rwMRC.h:91
Bimage::origin
void origin(double ox, double oy, double oz)
Definition: Bimage.h:570
MRChead::map
char map[4]
Definition: rwMRC.h:118
SWAPTRIG
#define SWAPTRIG
Definition: rwimg.h:16
Bimage::change_type
void change_type(char letter)
Get the data type indicated by a single letter code.
Definition: Bimage.cpp:1765
JSobject
@ JSobject
Definition: json.h:26
MRChead::zOrigin
float zOrigin
Definition: rwMRC.h:117
MRChead::exttype
char exttype[4]
Definition: rwMRC.h:109
MRChead::xOrigin
float xOrigin
Definition: rwMRC.h:115
Bimage::space_group
long space_group()
Definition: Bimage.h:598
SERIhead::intensity
short intensity
Definition: rwMRC.cpp:26
MRChead::nsymbt
int nsymbt
Definition: rwMRC.h:107
VERB_FULL
#define VERB_FULL
Definition: utilities.h:113
SCharacter
@ SCharacter
Definition: utilities.h:154
extension
string extension(string filename)
Definition: string_util.cpp:32
Bimage::data_pointer
unsigned char * data_pointer()
Definition: Bimage.h:284
MRChead::mode
int mode
Definition: rwMRC.h:87
MRChead::amax
float amax
Definition: rwMRC.h:104
Bimage::minimum
double minimum()
Definition: Bimage.h:541
MRChead::ny
int ny
Definition: rwMRC.h:85
UnitCell::beta
void beta(double d)
Definition: UnitCell.h:40
Bimage::sampling
void sampling(long nn, Vector3< double > u)
Definition: Bimage.h:514
UnitCell
Definition: UnitCell.h:22
MRChead::amean
float amean
Definition: rwMRC.h:105
Bimage::update_from_meta_data
void update_from_meta_data()
Update sub-image information from the metadata.
Definition: Bimage.cpp:725
read_symop
char * read_symop(Bstring &filename, int spacegroup, int &nsym)
Reading crystallographic symmetry operators.
Definition: rwsymop.cpp:59
MRChead::nx
int nx
Definition: rwMRC.h:84
MRChead::nzStart
int nzStart
Definition: rwMRC.h:90
MRChead::nversion
int nversion
Definition: rwMRC.h:110
MRChead::nlabl
int nlabl
Definition: rwMRC.h:121
MRChead::ispg
int ispg
Definition: rwMRC.h:106
Float
@ Float
Definition: utilities.h:161
MRChead::alpha
float alpha
Definition: rwMRC.h:97
Bimage::channels
long channels()
Definition: Bimage.h:384
MRChead::machst
char machst[4]
Definition: rwMRC.h:119
MRChead::nz
int nz
Definition: rwMRC.h:86
Bimage::unpack_transform
int unpack_transform(unsigned char *data, FourierType tf)
Definition: Bimage.cpp:2356
SERIhead::dose2
short dose2
Definition: rwMRC.cpp:28
UnitCell::degrees_to_radians
void degrees_to_radians()
Definition: UnitCell.h:54
UnitCell::gamma
void gamma(double d)
Definition: UnitCell.h:41
Bimage::label
void label(string s)
Definition: Bimage.h:250
MRChead::arms
float arms
Definition: rwMRC.h:120
SERIhead::mag
short mag
Definition: rwMRC.cpp:25