| Bsoft 2.0.5 Bernard's software package

bafm.cpp
Go to the documentation of this file.
1
9 #include "rwimg.h"
10 #include "utilities.h"
11 #include "options.h"
12 #include "timer.h"
13
14 // Declaration of global variables
15 extern int verbose; // Level of output to the screen
16
17 // Function prototypes
18 Bimage* afm_generate_tip(Vector3<long> size, Vector3<double> sampling,
19 double radius, double angle, double resolution);
20 Bplot* afm_simulate(Bimage* ptip, Bimage* p, double spring,
21 double modulus, double thick);
22 Bimage* afm_force_to_height(Bimage* pf, double force_step);
23
24 /* Usage assistance */
25 const char* use[] = {
26 " ",
27 "Usage: bafm [options] input.map height.img",
28 "------------------------------------------",
29 "Simulates AFM imaging.",
30 "An optional force map is produced (where every 2D slice is a force profile ",
31 " at a cantilever height).",
32 "A set of height images is written.",
33 " ",
34 "Actions:",
35 "-invert Invert inside & outside (default not).",
36 " ",
37 "Parameters:",
38 "-verbose 7 Verbosity of output.",
39 "-sampling 1.5 Sampling (default 1 A/pixel).",
40 " ",
41 "Tip generation:",
42 "-tipradius 5.3 Generate tip: radius (angstrom).",
43 "-tipsize 10,12,5 Tip size (x,y,z pixels).",
44 "-tipangle 55.7 Tip side angle (degrees).",
45 " ",
46 "Simulation parameters:",
47 "-spring 0.1 Spring constant (default 0.05 N/m).",
48 "-modulus 2e8 Bulk modulus (default 1e9 N/m2).",
49 "-thickness 55 Thickness (default 50 A).",
50 "-forcestep 15 Force intervals for height maps (default 10 pN).",
51 " ",
52 "Input:",
53 "-Tip tip.map Read tip from file.",
54 " ",
55 "Output:",
56 "-Postscript file.ps Postscript force curve.",
57 "-Force force.map Force map file name.",
58 " ",
59 NULL
60 };
61
62 int main(int argc, char **argv)
63 {
64 /* Initialize variables */
65 Vector3<long> tipsize = {1,1,1}; // Tip dimensions
66 double tipradius(0); // Tip radius also flag to generate tip
67 double tipangle(45); // Tip side angle
68 double resmin(1 + sqrt(5.0)); // Resolution for tip generation
69 Vector3<double> sam; // Unit dimension scaling (Angstrom/pixel)
70 int setinvert(0); // Don't invert inside-outside
71 double spring(0.05); // Spring constant (typically 0.01-0.1 N/m)
72 double modulus(1e9); // Bulk modulus (typically ~10 pN/A2 ???)
73 double thick(50); // Thickness of sample in Angstrom
74 double forcestep(10); // Force intervals for height maps
75 Bstring tipfile; // Tip file name
76 Bstring psfile; // Postscript file name
77 Bstring forcefile; // Force map file name
78
79 int optind;
80 Boption* option = get_option_list(use, argc, argv, optind);
81 Boption* curropt;
82 for ( curropt = option; curropt; curropt = curropt->next ) {
83 if ( curropt->tag == "sampling" )
84 sam = curropt->sampling();
85 if ( curropt->tag == "tipradius" )
86 if ( ( tipradius = curropt->value.real() ) < 1 )
87 cerr << "-tipradius: A radius must be specified!" << endl;
88 if ( curropt->tag == "tipsize" )
89 tipsize = curropt->size();
90 if ( curropt->tag == "tipangle" )
91 if ( ( tipangle = curropt->value.real() ) < 1 )
92 cerr << "-tipangle: An angle must be specified!" << endl;
93 if ( curropt->tag == "invert" )
94 setinvert = 1;
95 if ( curropt->tag == "spring" )
96 if ( ( spring = curropt->value.real() ) < 0.00000001 )
97 cerr << "-spring: The spring constant must be specified!" << endl;
98 if ( curropt->tag == "modulus" )
99 if ( ( modulus = curropt->value.real() ) < 0.001 )
100 cerr << "-modulus: The bulk modulus must be specified!" << endl;
101 if ( curropt->tag == "thickness" )
102 if ( ( thick = curropt->value.real() ) < 1 )
103 cerr << "-thickness: The thickness must be specified!" << endl;
104 if ( curropt->tag == "forcestep" )
105 if ( ( forcestep = curropt->value.real() ) < 0.001 )
106 cerr << "-forcestep: The force step must be specified!" << endl;
107 if ( curropt->tag == "Tip" )
108 tipfile = curropt->filename();
109 if ( curropt->tag == "Postscript" )
110 psfile = curropt->filename();
111 if ( curropt->tag == "Force" )
112 forcefile = curropt->filename();
113 }
114 option_kill(option);
115
116 double ti = timer_start();
117
118 // Read the input file if a file name is given
119 Bimage* p = read_img(argv[optind++], 1, 0);
120 Bimage* ptip = NULL;
121
122 if ( !p ) {
123 cerr << "Error: No input file given!" << endl;
124 bexit(-1);
125 }
126
127 p->change_type(Float);
128
129 p->truncate_to_min_max(0, p->maximum());
130
131 if ( sam.volume() > 0 ) p->sampling(sam);
132 else sam = p->sampling(0);
133
134 // Tip density generation
135 if ( tipradius > 0 ) {
136 tipangle *= M_PI/180.0;
137 ptip = afm_generate_tip(tipsize, sam, tipradius, tipangle, resmin);
138 write_img("tip.map", ptip, 0);
139 // bexit(0);
140 } else {
141 if ( tipfile.length() ) {
142 ptip = read_img(tipfile, 1, 0);
143 ptip->change_type(Float);
144 }
145 }
146
147 // Invert if requested
148 if ( setinvert ) p->invert();
149
150 // Simulate an AFM scan if a tip is given
151 Bplot* plot = NULL;
152 if ( ptip )
153 plot = afm_simulate(ptip, p, spring, modulus, thick);
154
155 delete ptip;
156
157 if ( psfile.length() && plot ) ps_plot(psfile, plot);
158
159 delete plot;
160
161 // Copy the command line to the label field of the image structure
162 p->label(get_cmd_line(argc, argv));
163
164 // Write an output force map file if a file name is given
165 if ( forcefile.length() )
166 write_img(forcefile, p, 0);
167
168 // Calculate height images
169 Bimage* ph = afm_force_to_height(p, forcestep);
170
171 delete p;
172
173 // Copy the command line to the label field of the image structure
174 ph->label(get_cmd_line(argc, argv));
175
176 // Write an output file if a file name is given
177 if ( argc > optind && strspn(argv[optind],"-") != 1 )
178 write_img(argv[optind], ph, 0);
179
180 delete ph;
181
182 if ( verbose & VERB_TIME )
183 timer_report(ti);
184
185 bexit(0);
186 }
187
204 Bimage* afm_generate_tip(Vector3<long> size, Vector3<double> sampling,
205 double radius, double angle, double resolution)
206 {
207 long i, xx, yy;
208 double dx, dy, dz, dis, dis2;
209
210 if ( size[0] < 4*radius/sampling[0] ) size[0] = (long) (4*radius/sampling[0]);
211 if ( size[1] < 4*radius/sampling[1] ) size[1] = (long) (4*radius/sampling[1]);
212 if ( size[2] < 4*radius/sampling[2] ) size[2] = (long) (4*radius/sampling[2]);
213
214 if ( verbose & VERB_PROCESS ) {
215 cout << "Generating a 2D tip image" << endl;
216 cout << "Tip dimensions: " << size << endl;
217 cout << "Tip radius: " << radius << " A" << endl << endl;
218 } else if ( verbose & VERB_LABEL )
219 cout << "Generating a 2D tip image" << endl;
220
221 // Generate a 2D tip height image to be converted to 3D later
222 Bimage* p = new Bimage(Float, TSimple, size[0], size[1], 1, 1);
223 p->sampling(sampling);
224 p->origin(p->default_origin());
225
226 radius /= sampling[0]; // Convert the radius to pixel units
227 double radcut(radius/sqrt(2.0)); // Edge between sphere and cone
228 // double radcut(radius*cos(angle)); // Edge between sphere and cone
229 double rad2(radius*radius);
230 double max(sqrt(1.0*p->sizeX()*p->sizeX() + p->sizeY()*p->sizeY())/2);
231 // double ta(1/tan(angle));
232
233 // Generate 45 degree cone with spherical tip with input radius
234 for ( i=yy=0; yy<p->sizeY(); yy++ ) {
235 dy = yy - p->image->origin()[1];
236 for ( xx=0; xx<p->sizeX(); xx++, i++ ) {
237 dx = xx - p->image->origin()[0];
238 dis2 = dx*dx + dy*dy;
239 dis = sqrt(dis2);
240 if ( dis < radcut )
241 dz = max - (2*radcut - sqrt(rad2 - dis2));
242 // dz = max - radius/sin(angle) + sqrt(rad2 - dis2);
243 else
244 dz = max - dis;
245 // dz = max - dis*ta;
246 // if ( dz < 0 ) dz = 0;
247 p->set(i, dz);
248 }
249 }
250
251 p->statistics();
252
253 // p->show_maximum((sqrt(2.0) - 1)*radius*p->sampling()[2]);
254 // p->show_maximum(cos(angle)*radius*p->sampling()[2]);
255 // p->show_maximum(sin(angle)*p->maximum()*p->sampling()[2]);
256 // p->show_maximum((1-cos(angle))*p->maximum()*p->sampling()[2]);
257 p->show_maximum(radius*p->sampling()[2]);
258 p->show_minimum(p->maximum()*p->sampling()[2]/sin(angle));
259
260 Bimage* ptip = p->topograph_to_surface(NULL, size[2], 1.925, resolution);
261
262 ptip->image->origin(ptip->size()/2);
263
264 delete p;
265
266 return ptip;
267 }
268
269 int afm_simulate_at_xy(Bimage* ptip, Bimage* p, long ii,
270 float* force, double spring, double modulus, double thick)
271 {
272 long i, ti, di, xx, yy, zz, tx, ty, tz, hiz;
273 long dx, dy, dz, zshift;
274 long ss(p->sizeX()*p->sizeY()), tss(ptip->sizeX()*ptip->sizeY());
275 double fraction, overlap_volume(1);
276 double scale(p->sampling().volume()/(p->maximum()*ptip->maximum())); // Adjustment for correct units
277
278 // Tip displacement = proportion * volume overlap
279 double proportion(scale*modulus/(spring*thick));
280
281 double* shift = new double[p->sizeZ()];
282
283 yy = ii/p->sizeX();
284 xx = ii - yy*p->sizeX();
285 for ( zz=0; zz<p->sizeZ(); zz++ ) {
286 shift[zz] = 0;
287 if ( overlap_volume > 1e-30 ) {
288 overlap_volume = 0;
289 i = zz*ss + ii;
290 hiz = ptip->sizeZ();
291 if ( hiz > p->sizeZ() - zz ) hiz = p->sizeZ() - zz;
292 for ( ti=ty=0; ty<ptip->sizeY(); ty++ ) { // Calculate overlap volume
293 dy = yy + ty - (long)ptip->image->origin()[1];
294 while ( dy < 0 ) dy += p->sizeY(); // Wrap y
295 while ( dy >= p->sizeY() ) dy -= p->sizeY();
296 for ( tx=0; tx<ptip->sizeX(); tx++, ti++ ) {
297 dx = xx + tx - (long)ptip->image->origin()[0];
298 while ( dx < 0 ) dx += p->sizeX(); // Wrap x
299 while ( dx >= p->sizeX() ) dx -= p->sizeX();
300 di = dy*p->sizeX()+dx;
301 for ( tz=0; tz<hiz; tz++ ) {
302 dz = zz + tz;
303 overlap_volume += (*p)[dz*ss+di]*(*ptip)[tz*tss+ti];
304 }
305 }
306 }
307 }
308 shift[zz] = overlap_volume*proportion;
309 // cout << "%ld\t%g\n", z, shift[z]);
310 }
311
312 for ( zz=0; zz<p->sizeZ(); zz++ ) { // Calculate zshift where the forces are equal
313 zshift = 0;
314 while ( zshift*p->sampling()[2] < shift[zz+zshift] &&
315 zshift+zz < p->sizeZ() ) zshift++;
316 if ( zshift > 0 ) zshift--;
317 fraction = (zshift*p->sampling()[2] - shift[zz+zshift])/
318 (zshift*p->sampling()[2] - shift[zz+zshift] -
319 (zshift+1)*p->sampling()[2] + shift[zz+zshift+1]);
320 if ( !isfinite(fraction) )
321 cout << "Problem:\t" << xx << tab << yy << tab << zz << tab <<
322 fraction << tab << zshift*p->sampling()[2] << tab <<
323 shift[zz+zshift] << tab << shift[zz+zshift+1] << endl;
324 i = zz*ss + ii;
325 force[i] = spring*(zshift + fraction)*p->sampling()[2];
326 }
327 // cout << "%ld\t%ld\t%ld\n", x, y, zshift);
328
329 delete[] shift;
330
331 return 0;
332 }
333
362 Bplot* afm_simulate(Bimage* ptip, Bimage* p, double spring, double modulus, double thick)
363 {
364 long i, ii, zz;
365 long ss(p->sizeX()*p->sizeY());
366 double avg_force;
367
368 if ( verbose & VERB_PROCESS ) {
369 cout << "Simulating an AFM experiment" << endl;
370 cout << "Spring constant: " << spring << " N/m" << endl;
371 cout << "Bulk modulus: " << modulus << " N/m2" << endl;
372 cout << "Specimen thickness: " << thick << " A" << endl;
373 cout << "Density scale: " << p->sampling().volume()/(p->maximum()*ptip->maximum()) << " A/pixel" << endl << endl;
374 } else if ( verbose & VERB_LABEL )
375 cout << "Simulating an AFM experiment" << endl << endl;
376
377 // Conversions to Angstrom and pN
378 spring *= 100; // 100 pN/A = N/m
379 modulus *= 1e-8; // 0.01 aN/A2 = N/m2
380
381 float* force = new float[p->sizeX()*p->sizeY()*p->sizeZ()];
382
383 #ifdef HAVE_GCD
384 dispatch_apply(ss, dispatch_get_global_queue(0, 0), ^(size_t i){
385 afm_simulate_at_xy(ptip, p, i, force, spring, modulus, thick);
386 });
387 #else
388 #pragma omp parallel for
389 for ( long i=0; i<ss; i++ )
390 afm_simulate_at_xy(ptip, p, i, force, spring, modulus, thick);
391 #endif
392
393 p->maximum(0);
394 for ( i=0; i<ss*p->sizeZ(); i++ )
395 if ( p->maximum() < force[i] ) p->maximum(force[i]);
396
397 Bstring title("AFM simulation");
398 int ncol(3), nv(p->sizeZ());
399 Bplot* plot = new Bplot(1, nv, ncol);
400 plot->title(title);
401 plot->page(0).title(title);
402 plot->page(0).columns(ncol);
403 for ( i=0; i<ncol; i++ ) plot->page(0).column(i).number(i);
404 plot->page(0).column(0).label("Distance");
405 plot->page(0).column(0).axis(1);
406 plot->page(0).column(1).type(2);
407 plot->page(0).column(1).label("Deflection");
408 plot->page(0).column(1).axis(4);
409 plot->page(0).column(2).type(2);
410 plot->page(0).column(2).label("Force");
411 plot->page(0).column(2).axis(3);
412 // plot->page(0).axis(1).min(0);
413 // plot->page(0).axis(1).max(360);
414 // plot->page(0).axis(1).inc(30);
415
416 for ( zz=0; zz<nv; zz++ ) {
417 for ( i=0, ii=zz*ss, avg_force=0; i<ss; i++, ii++ )
418 avg_force += force[ii];
419 avg_force /= ss;
420 (*plot)[zz] = zz*p->sampling()[2];
421 (*plot)[zz+nv] = avg_force/spring;
422 (*plot)[zz+2*nv] = avg_force;
423 }
424
425 Bstring txt;
426 txt = "Cantilever spring constant: " + Bstring(spring/100, "%lg N/m");
427 plot->page(0).add_text(txt);
428 txt = "Bulk modulus: " + Bstring(modulus*1e8, "%lg N/m2");
429 plot->page(0).add_text(txt);
430 txt = "Sample thickness: " + Bstring(thick, "%lg A");
431 plot->page(0).add_text(txt);
432
433 if ( verbose & VERB_PROCESS ) {
434 cout << "Distance(A)\tDeflection(A)\tForce(pN)" << endl;
435 for ( zz=0; zz<nv; zz++ )
436 cout << setw(12) << (*plot)[zz] << tab << setw(12)
437 << (*plot)[zz+nv] << tab << (*plot)[zz+2*nv] << endl;
438 cout << endl;
439 }
440
441 p->data_assign((unsigned char *) force);
442
443 return plot;
444 }
445
452 Bimage* afm_force_to_height(Bimage* pf, double force_step)
453 {
454 long i, j, xx, yy, zz, nn;
455 long ss(pf->sizeX()*pf->sizeY());
456 double force, denom, diff, scale, min, max;
457
458 nn = (long) (pf->maximum()/force_step); // A height image every 10 pN
459 Bimage* ph = pf->copy_header(nn);
460 ph->sizeZ(1);
461 ph->data_type(Float);
462 ph->data_alloc();
463
464 if ( verbose & VERB_PROCESS ) {
465 cout << "Converting an AFM force map into " << ph->images() << " height images" << endl;
466 cout << "Force(pN)\tHeight_min(A)\tHeight_range(A)" << endl;
467 } else if ( verbose & VERB_LABEL )
468 cout << "Converting an AFM force map into " << ph->images() << " height images" << endl << endl;
469
470 for ( nn=0; nn<ph->images(); nn++ ) {
471 force = force_step*(nn+1);
472 min = 1e30;
473 max = -1e30;
474 for ( i=nn*ss, yy=0; yy<ph->sizeY(); yy++ ) {
475 for ( xx=0; xx<ph->sizeX(); xx++, i++ ) {
476 zz = 1;
477 j = yy*pf->sizeX() + xx;
478 while ( zz < pf->sizeZ() && (*pf)[zz*ss + j] > force )
479 zz++;
480 j += zz*ss;
481 denom = (*pf)[j-ss] - (*pf)[j];
482 diff = force - (*pf)[j];
483 // cout << zz << tab << denom << tab << diff << endl;
484 // if ( diff > 0 && denom > 0 )
485 // ph->set(i, (*ph)[i] - ph->sampling()[2]*diff/denom);
486 ph->set(i, ph->sampling()[2]*zz);
487 if ( denom != 0 ) {
488 diff /= denom;
489 if ( fabs(diff) < 1 )
490 ph->set(i, (*ph)[i] - ph->sampling()[2]*diff);
491 }
492 if ( min > (*ph)[i] ) min = (*ph)[i];
493 if ( max < (*ph)[i] ) max = (*ph)[i];
494 }
495 }
496 scale = max - min;
497 if ( verbose & VERB_PROCESS )
498 cout << setw(12) << force << tab << setw(12) << min << tab << scale << endl;
499 for ( i=0, j=nn*ss; i<ss; i++, j++ )
500 ph->set(j, (*ph)[j] - min);
501 }
502 cout << endl;
503
504 ph->statistics();
505
506 if ( verbose & VERB_DEBUG )
507 cout << "DEBUG afm_force_to_height: Done!" << endl << endl;
508
509 return ph;
510 }
Bimage::change_type
void change_type(char letter)
Get the data type indicated by a single letter code.
Definition: Bimage.cpp:1743
use
const char * use[]
Definition: bafm.cpp:25
verbose
int verbose
Bstring::real
double real()
Definition: Bstring.cpp:545
Bimage::copy_header
Bimage * copy_header()
Definition: Bimage.h:650
Bimage::sampling
Vector3< double > sampling()
Definition: Bimage.h:505
Bimage::invert
void invert()
Inverts the data in the image.
Definition: Bimage.cpp:3108
utilities.h
Header file for general utilities.
Boption::sampling
Vector3< double > sampling()
Definition: options.h:202
Boption::value
Bstring value
Definition: options.h:30
VERB_DEBUG
#define VERB_DEBUG
Definition: utilities.h:112
Boption::tag
Bstring tag
Definition: options.h:29
main
int main(int argc, char **argv)
Definition: bafm.cpp:62
Bstring::length
long length() const
Definition: Bstring.cpp:263
VERB_PROCESS
#define VERB_PROCESS
Definition: utilities.h:107
Bimage::truncate_to_min_max
int truncate_to_min_max(double minim, double maxim)
Truncates image data to a given minimum and maximum.
Definition: Bimage_rescale.cpp:331
get_option_list
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Definition: options.cpp:40
read_img
Bimage * read_img(char *filename, int readdata, int img_select)
General driver function to read multiple image formats.
Definition: rwimg.cpp:76
afm_generate_tip
Bimage * afm_generate_tip(Vector3< long > size, Vector3< double > sampling, double radius, double angle, double resolution)
Generates a rounded conical AFM tip.
Definition: bafm.cpp:204
get_cmd_line
string get_cmd_line(int argc, char **argv)
Returns the command line as a string.
Definition: utilities.cpp:36
Boption::filename
Bstring filename()
Definition: options.h:85
TSimple
Definition: Bimage.h:58
timer.h
Utilities for timing functions.
Float
Definition: utilities.h:157
Bimage
General image parameter class.
Definition: Bimage.h:163
Boption::size
Vector3< long > size()
Definition: options.h:163
Bimage::data_alloc
unsigned char * data_alloc()
Definition: Bimage.h:256
Bimage::topograph_to_surface
Bimage * topograph_to_surface(Bimage *psd, long nz, double density, double resolution)
Converts a 2D AFM image to a 3D density map.
Definition: Bimage_topo.cpp:39
M_PI
#define M_PI
Definition: utilities.h:59
isfinite
bool isfinite(complex< T > &value)
Bimage::maximum
double maximum()
Definition: Bimage.h:535
Bimage::statistics
long statistics()
Calculates the statistics for an image.
Definition: Bimage_stats.cpp:22
afm_force_to_height
Bimage * afm_force_to_height(Bimage *pf, double force_step)
Converts an AFM force map into a set of 2D height images at different constant force values.
Definition: bafm.cpp:452
Boption
A class for a command line input option.
Definition: options.h:26
afm_simulate
Bplot * afm_simulate(Bimage *ptip, Bimage *p, double spring, double modulus, double thick)
Simulates and AFM experiment.
Definition: bafm.cpp:362
Bimage::label
void label(string s)
Definition: Bimage.h:235
Bimage::data_assign
unsigned char * data_assign(unsigned char *nudata)
Assign image data.
Definition: Bimage.cpp:852
VERB_TIME
#define VERB_TIME
Definition: utilities.h:110
Bimage::show_maximum
double show_maximum()
Definition: Bimage.h:559
write_img
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
Definition: rwimg.cpp:280
Bimage::size
Vector3< long > size() const
Definition: Bimage.h:373
Bsub_image::origin
void origin(double x, double y, double z)
Definition: Bimage.h:127
ps_plot
int ps_plot(Bstring filename, Bplot *plot)
Generates postscript graphs.
Definition: ps_plot.cpp:128
Bimage::set
void set(long j, double v)
Sets a single value at the given index.
Definition: Bimage.cpp:1096
Boption::next
Boption * next
Definition: options.h:28
Bstring
Definition: Bstring.h:29
Bimage::sizeX
void sizeX(long nx)
Definition: Bimage.h:377
Bimage::default_origin
Vector3< double > default_origin()
Definition: Bimage.h:585
Bimage::sizeZ
void sizeZ(long nz)
Definition: Bimage.h:379
Vector3< long >
timer_report
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Definition: timer.cpp:67
option_kill
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Definition: options.cpp:109
rwimg.h
Header file for 2D and 3D image I/O.
options.h
Header file for option handlers.
Bimage::images
long images()
Definition: Bimage.h:491
afm_simulate_at_xy
int afm_simulate_at_xy(Bimage *ptip, Bimage *p, long ii, float *force, double spring, double modulus, double thick)
Definition: bafm.cpp:269
Bimage::show_minimum
double show_minimum()
Definition: Bimage.h:558
Vector3::volume
double volume()
Definition: Vector3.h:235
Bimage::sizeY
void sizeY(long ny)
Definition: Bimage.h:378
VERB_LABEL
#define VERB_LABEL
Definition: utilities.h:106
Bimage::data_type
DataType data_type()
Definition: Bimage.h:349
bexit
int bexit(int value)
Exit function for cleanup and debugging.
Definition: utilities.cpp:273
timer_start
double timer_start()
Starts timer and prints the time.
Definition: timer.cpp:52
tab
ostream & tab(ostream &out)
Definition: utilities.cpp:21
Bimage::image
Bsub_image * image
Definition: Bimage.h:188
Bimage::origin
void origin(double ox, double oy, double oz)
Definition: Bimage.h:563
Bplot
Definition: Bplot.h:146