| Bsoft 2.0.5 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 if ( header->nsymbt > 0 ) {
179 char* ext_header = new char[header->nsymbt];
180 fimg->read((char *)ext_header, header->nsymbt);
181 if ( fimg->fail() ) return -1;
182 if ( exttype == "JSON" ) {
183 if ( verbose & VERB_DEBUG )
184 cout << "DEBUG readMRC: reading JSON header" << endl;
185 JSparser parser(ext_header, header->nsymbt);
186 p->meta_data() = parser.parse();
187 if ( img_select > -1 ) p->meta_data_retain_one_image(img_select);
188 p->update_from_meta_data();
189 } else if ( exttype == "SERI" ) {
190 if ( verbose & VERB_DEBUG )
191 cout << "DEBUG readMRC: reading SerialEM header" << endl;
192 SERIhead* serihead = (SERIhead *) ext_header;
193 JSvalue arr(JSarray);
194 JSvalue img(JSobject);
195 for ( i=0; i<header->nz; ++i ) if ( img_select < 0 || img_select == i ) {
196 img["Tilt"] = serihead[i].tilt/100.0;
197 img["StageX"] = serihead[i].stageX/25.0;
198 img["StageY"] = serihead[i].stageY/25.0;
199 img["Magnification"] = serihead[i].mag*100.0;
200 img["Intensity"] = serihead[i].intensity/25000.0;
201 img["Dose"] = serihead[i].dose1;
202 arr.push_back(img);
203 }
204 p->meta_data()["image"] = arr;
205 // cout << p->meta_data() << endl;
206 }
207 if ( ext_header ) delete[] ext_header;
208 }
209
210
211 // cout << "readMRC:" << endl << p->meta_data() << endl;
212
213 p->data_offset(MRCSIZE + header->nsymbt);
214 if ( header->mode%5 > 2 && header->mode%5 < 5 ) {
215 fimg->seekg(0, ios::end);
216 if ( (double) fimg->tellg() > p->data_offset() + 0.8*p->alloc_size() )
217 p->sizeX(2*(p->sizeX() - 1));
218 if ( header->mx%2 == 1 ) p->sizeX(p->sizeX() + 1); // Quick fix for odd x-size maps
219 fimg->clear();
220 fimg->seekg(0, ios::beg);
221 }
222 p->minimum(header->amin);
223 p->maximum(header->amax);
224 p->average(header->amean);
225 p->standard_deviation(header->arms);
226
227 UnitCell uc(header->a, header->b, header->c, header->alpha, header->beta, header->gamma);
228 uc.degrees_to_radians();
229 p->unit_cell(uc);
230
231 if ( header->mx && header->my && header->mz )
232 p->sampling(header->a/header->mx, header->b/header->my, header->c/header->mz);
233 if ( header->ispg >= 400 ) p->space_group(header->ispg-400);
234 else p->space_group(header->ispg);
235 p->label(header->labels);
236
237 p->origin(-header->xOrigin/p->sampling()[0], -header->yOrigin/p->sampling()[1], -header->zOrigin/p->sampling()[2]); // New header
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
276 int writeMRC(Bimage* p)
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;
303 set_CCP4_machine_stamp(header->machst);
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.5);
329 header->my = (int) (uc.b()/p->sampling()[1] + 0.5);
330 header->mz = (int) (uc.c()/p->sampling()[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];
346 header->yOrigin = -p->image->origin()[1]*p->sampling()[1];
347 header->zOrigin = -p->image->origin()[2]*p->sampling()[2];
348
349 // This is a band-aid to overcome the limitations of the image format
350 if ( fabs(uc.a() - p->sampling()[0]*header->mx) > 0.001 || fabs(uc.b() - p->sampling()[1]*header->my) > 0.001 ||
351 fabs(uc.c() - p->sampling()[2]*header->mz) > 0.001 ) {
352 header->a = p->sampling()[0]*header->mx;
353 header->b = p->sampling()[1]*header->my;
354 header->c = p->sampling()[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
Bimage::change_type
void change_type(char letter)
Get the data type indicated by a single letter code.
Definition: Bimage.cpp:1743
SWAPTRIG
#define SWAPTRIG
Definition: rwimg.h:16
MRChead::yOrigin
float yOrigin
Definition: rwMRC.h:116
MRChead::a
float a
Definition: rwMRC.h:94
UnitCell
Definition: UnitCell.h:22
extension
string extension(string filename)
Definition: string_util.cpp:32
MRChead::nz
int nz
Definition: rwMRC.h:86
writeMRC
int writeMRC(Bimage *p)
Writing a MRC map image file format.
Definition: rwMRC.cpp:276
SERIhead::dose1
short dose1
Definition: rwMRC.cpp:27
Bimage::sampling
Vector3< double > sampling()
Definition: Bimage.h:505
UnitCell::gamma
void gamma(double d)
Definition: UnitCell.h:41
Bimage::data_type_size
long data_type_size() const
Returns the size of the datatype in bytes.
Definition: Bimage.cpp:1585
utilities.h
Header file for general utilities.
VERB_DEBUG
#define VERB_DEBUG
Definition: utilities.h:112
Bimage::compound_type
CompoundType compound_type()
Definition: Bimage.h:351
UnitCell::beta
void beta(double d)
Definition: UnitCell.h:40
Integer
Definition: utilities.h:154
readMRC
int readMRC(Bimage *p, int readdata, int img_select)
Reading a MRC map image file format.
Definition: rwMRC.cpp:58
rwsymop.h
Header file for reading and writing symmetry operators.
SCharacter
Definition: utilities.h:150
VERB_PROCESS
#define VERB_PROCESS
Definition: utilities.h:107
UnitCell::a
void a(double d)
Definition: UnitCell.h:36
Bimage::file_name
void file_name(string s)
Definition: Bimage.h:230
TComplex
Definition: Bimage.h:59
MRChead::mz
int mz
Definition: rwMRC.h:93
set_CCP4_machine_stamp
int set_CCP4_machine_stamp(char *machine_stamp)
Setting a CCP4 style machine stamp.
Definition: rwCCP4.cpp:34
SERIhead::stageX
short stageX
Definition: rwMRC.cpp:23
Bimage::pack_transform
int pack_transform(unsigned char *data, FourierType tf)
Definition: Bimage.cpp:2422
SERIhead
Definition: rwMRC.cpp:21
MRChead::b
float b
Definition: rwMRC.h:95
rwMRC.h
Header file for reading and writing MRC files.
TSimple
Definition: Bimage.h:58
Float
Definition: utilities.h:157
Bimage
General image parameter class.
Definition: Bimage.h:163
Bimage::data_alloc
unsigned char * data_alloc()
Definition: Bimage.h:256
M_PI
#define M_PI
Definition: utilities.h:59
Bimage::maximum
double maximum()
Definition: Bimage.h:535
SERIhead::tilt
short tilt
Definition: rwMRC.cpp:22
MRChead::maps
int maps
Definition: rwMRC.h:102
CentHerm
Definition: Bimage.h:44
Bimage::label
void label(string s)
Definition: Bimage.h:235
MRChead::labels
char labels[800]
Definition: rwMRC.h:122
rwCCP4.h
Header file for reading and writing CCP4 files.
MRChead::map
char map[4]
Definition: rwMRC.h:118
Bimage::unit_cell
void unit_cell(UnitCell uc)
Definition: Bimage.h:601
UnitCell::b
void b(double d)
Definition: UnitCell.h:37
sb
int sb(0)
MRChead::my
int my
Definition: rwMRC.h:92
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:748
Bimage::size
Vector3< long > size() const
Definition: Bimage.h:373
MRChead::mapr
int mapr
Definition: rwMRC.h:101
JSobject
Definition: json.h:26
file_util.h
Header file for file checking functions.
JSvalue
Definition: json.h:53
Bimage::data_offset
long data_offset()
Definition: Bimage.h:265
Bsub_image::origin
void origin(double x, double y, double z)
Definition: Bimage.h:127
Bimage::channels
long channels()
Definition: Bimage.h:371
MRChead::gamma
float gamma
Definition: rwMRC.h:99
MRChead::amin
float amin
Definition: rwMRC.h:103
swapbytes
void swapbytes(unsigned char *v, size_t n)
Swaps bytes.
Definition: utilities.cpp:504
MRChead::nsymbt
int nsymbt
Definition: rwMRC.h:107
MRChead::amax
float amax
Definition: rwMRC.h:104
Bimage::unpack_transform
int unpack_transform(unsigned char *data, FourierType tf)
Definition: Bimage.cpp:2337
MRChead::nyStart
int nyStart
Definition: rwMRC.h:89
Bimage::standard_deviation
double standard_deviation()
Definition: Bimage.h:537
Bimage::space_group
long space_group()
Definition: Bimage.h:591
TRGB
Definition: Bimage.h:62
SERIhead::intensity
short intensity
Definition: rwMRC.cpp:26
Bimage::data_pointer
unsigned char * data_pointer()
Definition: Bimage.h:261
UnitCell::alpha
void alpha(double d)
Definition: UnitCell.h:39
UCharacter
Definition: utilities.h:149
Bstring
Definition: Bstring.h:29
MRChead::nxStart
int nxStart
Definition: rwMRC.h:88
Bimage::sizeX
void sizeX(long nx)
Definition: Bimage.h:377
MRChead::nversion
int nversion
Definition: rwMRC.h:110
Bit
Definition: utilities.h:148
UnitCell::degrees_to_radians
void degrees_to_radians()
Definition: UnitCell.h:54
SERIhead::stageY
short stageY
Definition: rwMRC.cpp:24
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
MRCSIZE
#define MRCSIZE
Definition: rwMRC.h:13
Bimage::alloc_size
long alloc_size() const
Definition: Bimage.h:252
Bimage::sizeZ
void sizeZ(long nz)
Definition: Bimage.h:379
MRChead::nx
int nx
Definition: rwMRC.h:84
MRChead::zOrigin
float zOrigin
Definition: rwMRC.h:117
MRChead::imodFlags
int imodFlags
Definition: rwMRC.h:113
MRChead::nzStart
int nzStart
Definition: rwMRC.h:90
verbose
int verbose
MRChead::mx
int mx
Definition: rwMRC.h:91
MRChead::mapc
int mapc
Definition: rwMRC.h:100
Bimage::meta_data
JSvalue & meta_data()
Definition: Bimage.h:219
MRChead::amean
float amean
Definition: rwMRC.h:105
JSarray
Definition: json.h:27
MRChead::arms
float arms
Definition: rwMRC.h:120
JSparser
Definition: json.h:358
SERIhead::mag
short mag
Definition: rwMRC.cpp:25
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:1349
MRChead::ispg
int ispg
Definition: rwMRC.h:106
Bimage::color_to_simple
void color_to_simple()
A color image is converted to a simple image.
Definition: Bimage_color.cpp:94
Short
Definition: utilities.h:152
MRChead::machst
char machst[4]
Definition: rwMRC.h:119
JSparser::parse
JSvalue parse()
Definition: json.h:388
read_symop
char * read_symop(Bstring &filename, int spacegroup, int &nsym)
Reading crystallographic symmetry operators.
Definition: rwsymop.cpp:59
MRChead::exttype
char exttype[4]
Definition: rwMRC.h:109
UShort
Definition: utilities.h:151
Bimage::images
long images()
Definition: Bimage.h:491
MRChead::xOrigin
float xOrigin
Definition: rwMRC.h:115
MRChead::alpha
float alpha
Definition: rwMRC.h:97
JSvalue::push_back
void push_back(const JSvalue &val)
Definition: json.h:191
SERIhead::dose2
short dose2
Definition: rwMRC.cpp:28
VERB_FULL
#define VERB_FULL
Definition: utilities.h:109
Bimage::sizeY
void sizeY(long ny)
Definition: Bimage.h:378
Bimage::data_type
DataType data_type()
Definition: Bimage.h:349
MRChead
Definition: rwMRC.h:83
Bimage::minimum
double minimum()
Definition: Bimage.h:534
Bimage::update_from_meta_data
void update_from_meta_data()
Update sub-image information from the metadata.
Definition: Bimage.cpp:702
MRChead::mode
int mode
Definition: rwMRC.h:87
tab
ostream & tab(ostream &out)
Definition: utilities.cpp:21
UnitCell::c
void c(double d)
Definition: UnitCell.h:38
MRChead::beta
float beta
Definition: rwMRC.h:98
Bimage::image
Bsub_image * image
Definition: Bimage.h:188
Bimage::origin
void origin(double ox, double oy, double oz)
Definition: Bimage.h:563
MRChead::c
float c
Definition: rwMRC.h:96
MRChead::nlabl
int nlabl
Definition: rwMRC.h:121
MRChead::ny
int ny
Definition: rwMRC.h:85