| Bsoft 2.0.5 Bernard's software package

Bimage_transform.cpp
Go to the documentation of this file.
1
9 #include "Bimage.h"
10 #include "math_util.h"
11 #include "utilities.h"
12
13 // Declaration of global variables
14 extern int verbose; // Level of output to the screen
15
37 int Bimage::transform(Vector3<double> scale,
38 Vector3<double> origin, Vector3<double> translate,
39 Matrix3 mat, int fill_type, double fill)
40 {
41 long nn;
42 Bimage* p;
43
44 for ( nn=0; nn<n; nn++ ) {
45 p = transform(nn, size(), scale, origin, translate, mat, fill_type, fill);
46 replace(nn, p);
47 delete p;
48 }
49
50 return 0;
51 }
52
75 Bimage* Bimage::transform(Vector3<long> nusize, Vector3<double> scale,
76 Vector3<double> origin, Vector3<double> translate,
77 Matrix3 mat, int fill_type, double fill)
78 {
79 long nn;
80 Bimage* p;
81 Vector3<double> nusampling(sampling()/scale.abs());
82
83 Bimage* pt = new Bimage(datatype, compoundtype, nusize, n);
84 pt->sampling(nusampling);
85
86 if ( n == 1 ) {
87 pt = transform(0, nusize, scale, origin, translate, mat, fill_type, fill);
88 } else {
89 for ( nn=0; nn<n; nn++ ) {
90 p = transform(nn, nusize, scale, origin, translate, mat, fill_type, fill);
91 pt->replace(nn, p);
92 pt->unit_cell(p->unit_cell());
93 delete p;
94 }
95 }
96
97 pt->statistics();
98
99 return pt;
100 }
101
102 void Bimage::transform_voxel(long i, Bimage* pt, long nn, Vector3<double> oldorigin,
103 Vector3<double> nuorigin, Matrix3 affmat, double fill)
104 {
105 Vector3<double> nu = pt->coordinates(i) - nuorigin;
106
107 Vector3<double> old = affmat * nu + oldorigin;
108
109 for ( long cc=0; cc<c; cc++, i++ )
110 pt->add(i, interpolate(cc, old, nn, fill));
111 }
112
136 Bimage* Bimage::transform(long nn, Vector3<long> nusize, Vector3<double> scale,
137 Vector3<double> origin, Vector3<double> translate,
138 Matrix3 mat, int fill_type, double fill)
139 {
140 if ( !d.uc ) return NULL;
141
142 if ( compoundtype > TSimple ) {
143 error_show("Bimage::transform", __FILE__, __LINE__);
144 cerr << "Error: Interpolation not done on compound data types" << endl;
145 return NULL;
146 }
147
148 if ( fabs(scale[0]) < 0.001 || x < 2 ) scale[0] = 1;
149 if ( fabs(scale[1]) < 0.001 || y < 2 ) scale[1] = 1;
150 if ( fabs(scale[2]) < 0.001 || z < 2 ) scale[2] = 1;
151
152 if ( nusize[0] < 1 ) nusize[0] = (long) (fabs(scale[0])*x);
153 if ( nusize[1] < 1 ) nusize[1] = (long) (fabs(scale[1])*y);
154 if ( nusize[2] < 1 ) nusize[2] = (long) (fabs(scale[2])*z);
155 nusize = nusize.max(1);
156
157 long i, cc, xx, yy, zz;
158 Vector3<double> old, nu, oldorigin, nuorigin;
159 View view;
160 Matrix3 viewmat;
161 Matrix3 affmat = mat/scale;
162 Vector3<double> nusampling(sampling()/scale.abs()), nurealsize(nusampling*nusize);
163
164 // change_type(Float);
165
166 oldorigin = origin;
167 nuorigin = origin + translate;
168
169 if ( verbose & VERB_FULL ) {
170 cout << endl << "Geometric transformation:" << endl;
171 cout << "Transformation origin: " << oldorigin << endl;
172 cout << "New origin: " << nuorigin << endl;
173 cout << "Scales: " << scale << endl;
174 cout << "New size: " << nusize << " voxels" << endl;
175 cout << " " << nurealsize << " A" << endl;
176 cout << "Matrix:" << endl << mat;
177 cout << "Fill value: " << fill << endl << endl;
178 }
179
180 affmat = affmat.transpose();
181
182 // cout << affmat << endl;
183 // cout << "New size: " << nusize << " voxels" << endl;
184
185 Bimage* pt = new Bimage(datatype, compoundtype, nusize, 1);
186 pt->sampling(nusampling);
187
188 if ( fill_type == FILL_AVERAGE ) fill = avg;
189 if ( fill_type == FILL_BACKGROUND ) fill = image[nn].background();
190
191 // Note: the matrix is used in a back-calculation of old coordinates corresponding to new
192 for ( i=zz=0; zz<pt->z; zz++ ) {
193 nu[2] = (double)zz - nuorigin[2];
194 for ( yy=0; yy<pt->y; yy++ ) {
195 nu[1] = (double)yy - nuorigin[1];
196 for ( xx=0; xx<pt->x; xx++ ) {
197 nu[0] = (double)xx - nuorigin[0];
198 old = affmat * nu + oldorigin;
199 // if ( old[1] < 0 )
200 // cout << old << endl;
201 for ( cc=0; cc<c; cc++, i++ )
202 pt->add(i, interpolate(cc, old, nn, fill));
203 }
204 }
205 }
206 /*
207 #ifdef HAVE_GCD
208 dispatch_apply(pt->data_size()/c, dispatch_get_global_queue(0, 0), ^(size_t i){
209 transform_voxel(i*c, pt, nn, oldorigin, nuorigin, affmat, fill);
210 });
211 #else
212 #pragma omp parallel for
213 for ( i=0; i<pt->data_size(); i+=c )
214 transform_voxel(i, pt, nn, oldorigin, nuorigin, affmat, fill);
215 #endif
216 */
217
218 if ( verbose & VERB_DEBUG )
219 cout << "DEBUG Bimage::transform: view=" << image[nn].view() << endl;
220
221 pt->image->origin(nuorigin);
222 view = image[nn].view();
223 viewmat = view.matrix();
224 // cout << viewmat << endl;
225 viewmat = viewmat * mat.transpose();
226 // cout << viewmat << endl;
227 view = View(viewmat);
228 pt->image->view(view);
229
230 if ( verbose & VERB_DEBUG )
231 cout << "DEBUG Bimage::transform: view=" << view << endl;
232
233 UnitCell uc(ucell);
234 uc.size(nurealsize[0], nurealsize[1], nurealsize[2]);
235 pt->unit_cell(uc);
236
237 pt->statistics();
238
239 if ( verbose & VERB_DEBUG )
240 cout << "DEBUG Bimage::transform: interpolation done" << endl;
241
242 return pt;
243 }
244
253 int Bimage::rotate()
254 {
255 Vector3<double> scale(1,1,1);
256 Vector3<double> translate;
257
258 Matrix3 mat = image->view().matrix();
259 mat = mat.transpose();
260
261 return transform(scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
262 }
263
272 int Bimage::rotate(double angle)
273 {
274 Vector3<double> axis(0,0,1);
275 Matrix3 mat = Matrix3(axis, angle);
276
277 Vector3<double> scale(1,1,1);
278 Vector3<double> translate;
279
280 return transform(scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
281 }
282
292 int Bimage::rotate(Vector3<double> axis, double angle)
293 {
294 Matrix3 mat = Matrix3(axis, angle);
295
296 Vector3<double> scale(1,1,1);
297 Vector3<double> translate;
298
299 return transform(scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
300 }
301
312 int Bimage::rotate(View view)
313 {
314 Vector3<double> translate;
315
316 return rotate(translate, view);
317 }
318
330 int Bimage::rotate(Vector3<double> translate, View view)
331 {
332 Vector3<double> scale(1,1,1);
333 Matrix3 mat = view.matrix();
334
335 change_type(Float);
336
337 return transform(scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
338 }
339
349 int Bimage::rotate(Matrix3 mat)
350 {
351 Vector3<double> scale(1,1,1), translate;
352
353 change_type(Float);
354
355 return transform(scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
356 }
357
369 int Bimage::rotate(Vector3<double> translate, Matrix3 mat)
370 {
371 Vector3<double> scale(1,1,1);
372
373 change_type(Float);
374
375 return transform(scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
376 }
377
387 Bimage* Bimage::rotate(Vector3<long> nusize)
388 {
389 Vector3<double> scale(1,1,1);
390 Vector3<double> translate;
391
392 Matrix3 mat = image->view().matrix();
393 mat = mat.transpose();
394
395 return transform(nusize, scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
396 }
397
407 Bimage* Bimage::rotate(Vector3<long> nusize, double angle)
408 {
409 Vector3<double> axis(0,0,1);
410 Matrix3 mat = Matrix3(axis, angle);
411
412 Vector3<double> scale(1,1,1);
413 Vector3<double> translate;
414
415 return transform(nusize, scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
416 }
417
428 Bimage* Bimage::rotate(Vector3<long> nusize, Vector3<double> axis, double angle)
429 {
430 Matrix3 mat = Matrix3(axis, angle);
431
432 Vector3<double> scale(1,1,1);
433 Vector3<double> translate;
434
435 return transform(nusize, scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
436 }
437
449 Bimage* Bimage::rotate(Vector3<long> nusize, View view)
450 {
451 Vector3<double> translate;
452
453 return rotate(nusize, translate, view);
454 }
455
468 Bimage* Bimage::rotate(Vector3<long> nusize, Vector3<double> translate, View view)
469 {
470 Vector3<double> scale(1,1,1);
471 Matrix3 mat = view.matrix();
472
473 change_type(Float);
474
475 return transform(nusize, scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
476 }
477
488 Bimage* Bimage::rotate(Vector3<long> nusize, Matrix3 mat)
489 {
490 Vector3<double> scale(1,1,1), translate;
491
492 change_type(Float);
493
494 return transform(nusize, scale, image->origin(), translate, mat, FILL_BACKGROUND, 0);
495 }
496
510 int Bimage::rotate_and_add(Bimage* p, Vector3<double> origin, View view)
511 {
512 p->rotate(image->origin() - origin, view);
513
514 add(p);
515
516 return 0;
517 }
518
527 Bimage* Bimage::orient(View* views)
528 {
529 View* v;
530 long nviews(0);
531
532 for ( v = views; v; v = v->next ) nviews++;
533
534 if ( nviews < 1 ) return NULL;
535
536 change_type(Float);
537
538 Bimage* pori = copy(nviews);
539
540 long nn(0);
541 Bimage* p;
542
543 for ( v = views; v; v = v->next, ++nn ) {
544 p = rotate(size(), *v);
545 pori->replace(nn, p);
546 delete p;
547 pori->image[nn].view(*v);
548 pori->image[nn].origin(image->origin());
549 }
550
551 return pori;
552 }
553
561 int Bimage::mirror()
562 {
563 Vector3<double> scale(1,1,1), shift;
564 Matrix3 mat(-1,0,0,0,-1,0,0,0,-1);
565 Bimage* p1;
566
567 change_type(Float);
568
569 long nn;
570
571 for ( nn=0; nn<n; nn++ ) {
572 p1 = transform(nn, size(), scale, image[nn].origin(), shift, mat, FILL_BACKGROUND, 0);
573 replace(nn, p1);
574 delete p1;
575 }
576
577 return nn;
578 }
579
587 int Bimage::shift(Vector3<double> vec, int fill_type, double fill)
588 {
589 for ( long nn=0; nn<n; nn++ )
590 shift(nn, vec, fill_type, fill);
591
592 return 0;
593 }
594
603 int Bimage::shift(long nn, Vector3<double> vec, int fill_type, double fill)
604 {
605 if ( vec.length() == 0 ) return 0;
606
607 if ( verbose & VERB_FULL )
608 cout << "Translate by: " << vec << endl;
609
610 long i, j, xx, yy, zz, cc;
611 long imgsize = c*image_size();
612 // float* temp = new float[imgsize];
613 vector<float> temp(imgsize);
614
615 if ( fill_type == FILL_AVERAGE ) fill = avg;
616 // if ( fill_type == FILL_BACKGROUND ) fill = image[nn].background();
617 if ( fill_type == FILL_BACKGROUND ) fill = background(nn);
618
619 for ( j=zz=0; zz<z; zz++ ) {
620 for ( yy=0; yy<y; yy++ ) {
621 for ( xx=0; xx<x; xx++ ) {
622 for ( cc=0; cc<c; cc++, j++ ) {
623 temp[j] = interpolate(cc, xx-vec[0], yy-vec[1], zz-vec[2], nn, fill);
624 }
625 }
626 }
627 }
628
629 for ( i=nn*imgsize, j=0; j<imgsize; i++, j++ ) set(i, temp[j]);
630
631 // delete[] temp;
632
633 image[nn].origin(image[nn].origin() + vec);
634
635 return 0;
636 }
637
643 int Bimage::shift_wrap(Vector3<double> vec)
644 {
645 for ( long nn=0; nn<n; nn++ )
646 shift_wrap(nn, vec);
647
648 return 0;
649 }
650
657 int Bimage::shift_wrap(long nn, Vector3<double> vec)
658 {
659 if ( vec.length() == 0 ) return 0;
660
661 if ( verbose & VERB_FULL )
662 cout << "Translate by: " << vec << endl;
663
664 long i, j, xx, yy, zz, cc;
665 long imgsize(c*image_size());
666 Vector3<double> loc;
667 // float* temp = new float[imgsize];
668 vector<float> temp(imgsize);
669
670 // cout << "start interpolating " << nn << endl;
671 for ( j=zz=0; zz<z; zz++ ) {
672 loc[2] = -vec[2] + zz;
673 for ( yy=0; yy<y; yy++ ) {
674 loc[1] = -vec[1] + yy;
675 for ( xx=0; xx<x; xx++ ) {
676 loc[0] = -vec[0] + xx;
677 for ( cc=0; cc<c; cc++, j++ )
678 temp[j] = interpolate_wrap(cc, loc, nn);
679 }
680 }
681 }
682 // cout << "done interpolating " << nn << endl;
683
684 for ( i=nn*imgsize, j=0; j<imgsize; i++, j++ ) set(i, temp[j]);
685
686 // delete[] temp;
687
688 image[nn].origin(image[nn].origin() + vec);
689
690 return 0;
691 }
692
699 int Bimage::center(int fill_type, double fill)
700 {
701 Vector3<double> origin(size()/2);
702
703 for ( long nn=0; nn<n; nn++ )
704 shift(nn, origin - image[nn].origin(), fill_type, fill);
705
706 return 0;
707 }
708
713 int Bimage::center_wrap()
714 {
715 Vector3<double> origin(size()/2);
716
717 for ( long nn=0; nn<n; nn++ )
718 shift_wrap(nn, origin - image[nn].origin());
719
720 return 0;
721 }
722
727 int Bimage::zero_origin()
728 {
729 for ( long nn=0; nn<n; nn++ )
730 shift_wrap(nn, -image[nn].origin());
731
732 return 0;
733 }
734
740 Bimage* Bimage::scale_to_same_size(Bimage* pref)
741 {
742 if ( !pref ) return NULL;
743
744 if ( image->origin().length() < 1 ) origin(size()/2);
745
746 // double scale(sampling()[0]/pref->sampling()[0]);
747 // Vector3<double> vscale(scale, scale, scale);
748 // Vector3<double> origin(image->origin()), translate((pref->size() - size())/2);
749 // Matrix3 mat(1);
750
751 // return transform(pref->size(), vscale, origin, translate, mat, FILL_BACKGROUND);
752 return fspace_resize(pref);
753 }
754
764 Bimage* Bimage::scale_to_reference(Bimage* pref, Bimage* pmask, double scalemin,
765 double scalemax, double step)
766 {
767 if ( image->origin().length() < 1 ) origin(size()/2);
768
769 double scale, scalebest(1), cc, ccbest(0);
770 Vector3<double> vscale, origin(image->origin()), translate((pref->size() - size())/2);
771 Matrix3 mat(1);
772 Bimage* pt;
773
774 if ( verbose ) {
775 cout << "Finding the best scaling to the reference map:" << endl;
776 cout << "Scale range: " << scalemin << " - " << scalemax << endl;
777 cout << "Initial scale step size: " << step << endl << endl;
778 cout << "Scale\tSampling\tCC" << endl;
779 }
780
781 while ( step > 0.0001 ) {
782 for ( scale=scalemin; scale<=scalemax+0.001; scale+=step ) {
783 vscale = Vector3<double>(scale, scale, scale);
784 pt = transform(pref->size(), vscale, origin, translate, mat, FILL_BACKGROUND);
785 cc = pt->correlate(pref, 0, pref->sizeX()/2, pmask);
786 if ( ccbest < cc ) {
787 ccbest = cc;
788 scalebest = scale;
789 }
790 cout << scale << tab << pt->sampling()[0] << tab << cc << endl;
791 delete pt;
792 }
793 scalemin = scalebest - 0.75*step;
794 scalemax = scalebest + 0.75*step;
795 step /= 2;
796 }
797
798 if ( verbose ) {
799 cout << "Best scale: " << scalebest << " ("
800 << ccbest << ")" << endl;
801 cout << "Sampling correction: "
802 << pref->image->sampling()[0]*scalebest/image->sampling()[0] << endl << endl;
803 }
804
805 // vscale = Vector3<double>(scalebest, scalebest, scalebest);
806
807 // pt = transform(pref->size(), vscale, origin, translate, mat, FILL_BACKGROUND);
808 // pt->sampling(pref->sampling());
809
810 sampling(pref->sampling() * scalebest);
811 pt = fspace_resize(pref);
812
813 return pt;
814 }
815
822 Bimage* Bimage::scale_to_reference(Bimage* pref, Bimage* pmask)
823 {
824 double step(pref->image->sampling()[0]/pref->x);
825 double scalemin(image->sampling()[0]/pref->image->sampling()[0] - 10*step);
826 double scalemax(image->sampling()[0]/pref->image->sampling()[0] + 10*step);
827
828 return scale_to_reference(pref, pmask, scalemin, scalemax, step);
829 }
830
Bimage::change_type
void change_type(char letter)
Get the data type indicated by a single letter code.
Definition: Bimage.cpp:1743
UnitCell
Definition: UnitCell.h:22
Bimage::replace
int replace(Bimage *img)
Replaces the data with that from the given image.
Definition: Bimage.cpp:2828
FILL_BACKGROUND
#define FILL_BACKGROUND
Definition: utilities.h:174
Bsub_image::view
void view(double x, double y, double z, double a)
Definition: Bimage.h:143
Bimage.h
Header file for image class.
Bimage::sampling
Vector3< double > sampling()
Definition: Bimage.h:505
Vector3::length
double length()
Definition: Vector3.h:222
Bimage::add
void add(long j, double v)
Definition: Bimage.h:308
View::next
View * next
Definition: View.h:28
Bimage::image_size
long image_size()
Definition: Bimage.h:267
utilities.h
Header file for general utilities.
Bimage::shift_wrap
int shift_wrap(Vector3< double > vec)
Shifts an image.
Definition: Bimage_transform.cpp:643
Vector3::abs
Vector3 abs()
Definition: Vector3.h:201
VERB_DEBUG
#define VERB_DEBUG
Definition: utilities.h:112
Bsub_image::background
double background()
Definition: Bimage.h:121
Bimage::scale_to_same_size
Bimage * scale_to_same_size(Bimage *pref)
Scales and image to the given reference.
Definition: Bimage_transform.cpp:740
Bimage::mirror
int mirror()
Inverts/mirrors each image through its origin.
Definition: Bimage_transform.cpp:561
Bimage::interpolate_wrap
double interpolate_wrap(long cc, double xx, double yy=0, double zz=0, long nn=0) const
Interpolates using a given location with wrapping.
Definition: Bimage.cpp:1502
Matrix3
Definition: Matrix3.h:17
FILL_AVERAGE
#define FILL_AVERAGE
Definition: utilities.h:173
TypePointer::uc
unsigned char * uc
Definition: Bimage.h:69
Bimage::fspace_resize
int fspace_resize(double scale, double res_hi, double res_lo)
Resizes an image in frequency space to avoid interpolation.
Definition: Bimage_fspace.cpp:205
Bimage::center_wrap
int center_wrap()
Centers an image with wrapping.
Definition: Bimage_transform.cpp:713
Bimage::Bimage
Bimage()
Initializes an image.
Definition: Bimage.cpp:44
Bimage::correlate
double correlate(Bimage *p)
Calculates correlation coefficient between two images.
Definition: Bimage_correlate.cpp:36
Bimage::interpolate
double interpolate(long cc, double xx, double yy=0, double zz=0, long nn=0, double fill=0) const
Interpolates using a given location.
Definition: Bimage.cpp:1392
TSimple
Definition: Bimage.h:58
Float
Definition: utilities.h:157
Vector3::max
Type max()
Definition: Vector3.h:175
Bimage
General image parameter class.
Definition: Bimage.h:163
Bimage::transform
int transform(Vector3< double > scale, Vector3< double > origin, Vector3< double > translate, Matrix3 mat, int fill_type=0, double fill=0)
Transforms an image by translation, rotation, scaling and skewing, in place.
Definition: Bimage_transform.cpp:37
Bimage::zero_origin
int zero_origin()
Shifts the origins to zero with wrapping.
Definition: Bimage_transform.cpp:727
Bimage::shift
int shift(Vector3< double > vec, int fill_type=0, double fill=0)
Shifts an image.
Definition: Bimage_transform.cpp:587
Bimage::statistics
long statistics()
Calculates the statistics for an image.
Definition: Bimage_stats.cpp:22
Bimage::rotate_and_add
int rotate_and_add(Bimage *p, Vector3< double > origin, View view)
Rotates an image to a specified view and adds it to another image.
Definition: Bimage_transform.cpp:510
Bimage::unit_cell
void unit_cell(UnitCell uc)
Definition: Bimage.h:601
verbose
int verbose
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
Bsub_image::sampling
void sampling(double x, double y, double z)
Definition: Bimage.h:123
Bimage::view
void view(double vx, double vy, double vz, double va)
Definition: Bimage.h:589
Bimage::set
void set(long j, double v)
Sets a single value at the given index.
Definition: Bimage.cpp:1096
Bimage::transform_voxel
void transform_voxel(long i, Bimage *pt, long nn, Vector3< double > oldorigin, Vector3< double > nuorigin, Matrix3 affmat, double fill)
Definition: Bimage_transform.cpp:102
Bimage::copy
Bimage * copy()
Copies the header information and data of an image into a new image structure.
Definition: Bimage.cpp:2695
Bimage::sizeX
void sizeX(long nx)
Definition: Bimage.h:377
Matrix3::transpose
Matrix3 transpose() const
Definition: Matrix3.h:268
Bimage::scale_to_reference
Bimage * scale_to_reference(Bimage *pref, Bimage *pmask, double scalemin, double scalemax, double step)
Scales and image to the given reference, searching for the correct scale.
Definition: Bimage_transform.cpp:764
Bimage::orient
Bimage * orient(View *views)
Calculates multiple copies oriented according to views.
Definition: Bimage_transform.cpp:527
Vector3< double >
View
Definition: View.h:26
Bimage::rotate
int rotate()
Rotates an image using parameters defined in the image in place.
Definition: Bimage_transform.cpp:253
UnitCell::size
void size(double a, double b, double c)
Definition: UnitCell.h:35
Bimage::center
int center(int fill_type=0, double fill=0)
Centers an image.
Definition: Bimage_transform.cpp:699
Bimage::coordinates
void coordinates(long i, long &nx, long &ny, long &nz)
Definition: Bimage.h:416
Bimage::fill
void fill(double v)
Definition: Bimage.h:698
VERB_FULL
#define VERB_FULL
Definition: utilities.h:109
Bimage::background
double background(long nn)
Definition: Bimage.h:542
error_show
int error_show(string message, string file, int line)
Displays the error with file and line reference.
Definition: utilities.cpp:755
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
math_util.h
Header file for general utilities.