| Bsoft 2.0.5 Bernard's software package

Bimage_combine.cpp
Go to the documentation of this file.
1
9 #include "Bimage.h"
10 #include "utilities.h"
11
12 // Declaration of global variables
13 extern int verbose; // Level of output to the screen
14
23 void Bimage::sum(long m, Bimage** p)
24 {
25 long i, j, k, cc, ds(x*y*z*n);
26
27 clear();
28
29 vector<double> b(n);
30 for ( i=0; i<n; i++ ) b[i] = 0;
31
32 for ( j=0; j<m; j++ ) {
33 for ( i=0; i<ds; i++ )
34 for ( cc=0, k=i*c; cc<c; cc++, k++ )
35 add(k, (*p[j])[k]);
36 for ( i=0; i<n; i++ ) b[i] += p[j]->image[i].background();
37 }
38
39 for ( i=0; i<n; i++ ) image[i].background(b[i]);
40
41 statistics();
42 }
43
52 void Bimage::catenate(long m, Bimage** p)
53 {
54 long i, j, k, l, ds;
55 long imgsize(c*x*y*z);
56
57 for ( i=n=0; i<m; i++ ) if ( p[i] ) n += p[i]->n;
58
59 if ( n < 1 ) {
60 error_show("Error: No images to concatenate!", __FILE__, __LINE__);
61 return;
62 }
63
64 data_type(p[0]->datatype);
65 compoundtype = p[0]->compoundtype;
66 c = p[0]->c;
67 x = p[0]->x;
68 y = p[0]->y;
69 z = p[0]->z;
70
71 sampling(p[0]->sampling());
72
73 images(n);
74
75 data_alloc();
76
77 if ( verbose & VERB_PROCESS )
78 cout << "Catenating " << n << " images" << endl;
79
80 for ( i=j=0; i<m; i++ ) if ( p[i] ) {
81 ds = imgsize*p[i]->n;
82 for ( k=j*imgsize, l=0; l<ds; k++, l++ ) set(k, (*p[i])[l]);
83 for ( k=0; k<p[i]->n; k++, j++ )
84 image[j] = p[i]->image[k];
85 }
86
87 statistics();
88 }
89
90
108 Bimage* Bimage::blend(Bimage* p, long number)
109 {
110 if ( !check_if_same_size(p) ) {
111 error_show("Bimage::blend", __FILE__, __LINE__);
112 return NULL;
113 }
114
115 if ( number < 3 ) number = 3;
116
117 if ( verbose & VERB_LABEL )
118 cout << "Blending two images to create a series of " << number << " sub-images" << endl;
119
120 long i, j, nn;
121 double fraction1, fraction2;
122
123 calculate_background();
124 p->calculate_background();
125
126 // Copy the first image into the new image structure with a new number of sub-images
127 Bimage* pnu = copy_header(number);
128 pnu->data_type(Float);
129 pnu->data_alloc();
130
131 // cout << pnu->meta_data() << endl;
132
133 if ( verbose & VERB_DEBUG )
134 cout << "DEBUG img_morph_blend: datasize=" << datasize << endl;
135
136 for ( i=nn=0; nn<number; nn++ ) {
137 fraction2 = nn*1.0/(number - 1.0);
138 fraction1 = 1 - fraction2;
139 if ( verbose & VERB_PROCESS )
140 cout << "Calculating image " << nn+1 << ": dnew = " << fraction1
141 << " x image1 + " << fraction2 << " x image2" << endl;
142 for ( j=0; j<datasize; j++, i++ )
143 pnu->set(i, fraction1*(*this)[j] + fraction2*(*p)[j]);
144 // pnu->image[nn].background(fraction1*image->background() +
145 // fraction2*p->image->background());
146 pnu->image[nn].background(fraction1*background(long(0)) +
147 fraction2*p->background(long(0)));
148 }
149 if ( verbose & VERB_PROCESS ) cout << endl;
150
151 pnu->statistics();
152
153 return pnu;
154 }
155
178 int Bimage::place(long nn, Bimage* p, Vector3<double> loc,
179 double radius, double scale, double shift, int operation)
180 {
181 if ( radius <= 0 ) radius = (x > y)? x: y;
182
183 long i, si, xx, yy, zz;
184 long sz, sy, sx;
185 double sx2, sy2, sz2, r2(radius*radius), v;
186 Vector3<double> start = loc - p->image[nn].origin() + 0.5;
187 Vector3<long> lo(start);
188 Vector3<long> hi(p->size());
189 hi += lo;
190 lo = lo.max(0);
191 hi = hi.max(1);
192 hi = hi.min(size());
193
194 if ( verbose & VERB_FULL ) {
195 cout << "Placing a small image into a larger image:" << endl;
196 cout << "Small image size: " << p->size() << endl;
197 cout << "Location: " << loc << endl;
198 cout << "Low limits: " << lo << endl;
199 cout << "High limits: " << hi << endl << endl;
200 }
201
202 for ( zz=lo[2]; zz<hi[2]; zz++ ) {
203 sz = (long) zz - start[2];
204 sz2 = p->image[nn].origin()[2] - sz;
205 sz2 *= sz2;
206 for ( yy=lo[1]; yy<hi[1]; yy++ ) {
207 sy = (long) yy - start[1];
208 sy2 = p->image[nn].origin()[1] - sy;
209 sy2 *= sy2;
210 for ( xx=lo[0]; xx<hi[0]; xx++ ) {
211 sx = (long) xx - start[0];
212 sx2 = p->image[nn].origin()[0] - sx;
213 sx2 *= sx2;
214 if ( sx2 + sy2 + sz2 <= r2 ) {
215 i = index(xx, yy, zz, nn);
216 si = p->index(sx, sy, sz);
217 v = (*p)[si] * scale + shift;
218 switch ( operation ) {
219 case 1: if ( v < (*this)[i] ) set(i, v); break;
220 case 2: if ( v > (*this)[i] ) set(i, v); break;
221 default: add(i, v);
222 }
223 }
224 }
225 }
226 }
227
228 return 0;
229 }
230
242 int Bimage::place_with_addition(Bimage* p, long nn)
243 {
244 if ( !next ) next = new Bimage(Float, compoundtype, size(), n);
245
246 long i, j, cc, tx, ty, tz, xx, yy, zz;
247 float* count = (float *) next->data_pointer();
248
249 if ( verbose & VERB_FULL ) {
250 cout << "Adding tile:" << endl;
251 cout << "Location: " << p->image[nn].origin() << endl;
252 }
253
254 zz = p->image[nn].origin()[2];
255 for ( tz=0; tz<p->z && zz<z; tz++, zz++ ) {
256 yy = p->image[nn].origin()[1];
257 for ( ty=0; ty<p->y && yy<y; ty++, yy++ ) {
258 xx = p->image[nn].origin()[0];
259 for ( tx=0; tx<p->x && xx<x; tx++, xx++ ) {
260 i = p->index(0, tx, ty, tz, nn);
261 j = index(0, xx, yy, zz, 0);
262 for ( cc=0; cc<c; cc++, i++, j++ ) {
263 add(j, (*p)[i]);
264 count[j] += 1;
265 }
266 }
267 }
268 }
269
270 return 0;
271 }
272
284 int Bimage::place_with_overlap(Bimage* p, long nn)
285 {
286 long i, j, cc, tx, ty, tz, xx, yy, zz;
287 double wvol;
288 Vector3<double> d, w, imin, imax(p->size());
289
290 // Determine overlap in all dimensions
291 for ( i=0; i<p->n; i++ ) if ( i != nn ) {
292 d = p->image[nn].origin() - p->image[i].origin();
293 if ( d.abs() < p->size() ) {
294 if ( d[0] > p->x/2 ) imin[0] = p->x - d[0];
295 if ( d[0] < -p->x/2 ) imax[0] = -d[0];
296 if ( d[1] > p->y/2 ) imin[1] = p->y - d[1];
297 if ( d[1] < -p->y/2 ) imax[1] = -d[1];
298 if ( d[2] > p->z/2 ) imin[2] = p->z - d[2];
299 if ( d[2] < -p->z/2 ) imax[2] = -d[2];
300 }
301 }
302 imin = imin.max(0);
303 imax = imax.min(p->size());
304
305 Vector3<double> wmin(1,1,1);
306 Vector3<double> wmax(1,1,1);
307
308 for ( i=0; i<3; ++i ) {
309 if ( imin[i] ) wmin[i] = 1.0L/imin[i];
310 if ( imax[i] ) wmax[i] = 1.0L/(p->size()[i] - imax[i]);
311 }
312
313 if ( verbose & VERB_FULL ) {
314 cout << "Placing tile:" << endl;
315 cout << "Location: " << p->image[nn].origin() << endl;
316 cout << "Tile size: " << p->size() << endl;
317 cout << "Overlap minima: " << imin << endl;
318 cout << "Overlap maxima: " << imax << endl << endl;
319 }
320
321 zz = p->image[nn].origin()[2];
322 for ( tz=0; tz<p->z; tz++, zz++ ) {
323 w[2] = 1;
324 if ( tz < imin[2] ) w[2] = tz*wmin[2];
325 else if ( tz > imax[2] ) w[2] = (p->z - tz)*wmax[2];
326 yy = p->image[nn].origin()[1];
327 for ( ty=0; ty<p->y; ty++, yy++ ) {
328 w[1] = 1;
329 if ( ty < imin[1] ) w[1] = ty*wmin[1];
330 else if ( ty > imax[1] ) w[1] = (p->y - ty)*wmax[1];
331 xx = p->image[nn].origin()[0];
332 for ( tx=0; tx<p->x; tx++, xx++ ) {
333 w[0] = 1;
334 if ( tx < imin[0] ) w[0] = tx*wmin[0];
335 else if ( tx > imax[0] ) w[0] = (p->x - tx)*wmax[0];
336 i = p->index(0, tx, ty, tz, nn);
337 j = index(0, xx, yy, zz, 0);
338 wvol = w[0]*w[1]*w[2];
339 // wvol = 1;
340 for ( cc=0; cc<c; cc++, i++, j++ ) add(j, (*p)[i] * wvol);
341 }
342 }
343 }
344
345 return 0;
346 }
347
358 int Bimage::place_central_part(Bimage* p, long nn)
359 {
360 long i, j, cc, tx, ty, tz, xx, yy, zz;
361 double ww;
362 Vector3<double> d, w, imin, imax;
363
364 // Determine overlap in all dimensions
365 for ( i=0; i<p->n; i++ ) if ( i != nn ) {
366 d = p->image[nn].origin() - p->image[i].origin();
367 if ( fabs(d[0]) < p->x ) {
368 if ( d[0] > 0 ) imin[0] = (p->x - d[0])/2;
369 else imax[0] = (p->x - d[0])/2;
370 }
371 if ( fabs(d[1]) < p->y ) {
372 if ( d[1] > 0 ) imin[1] = (p->y - d[1])/2;
373 else imax[1] = (p->y - d[1])/2;
374 }
375 if ( fabs(d[2]) < p->z ) {
376 if ( d[2] > 0 ) imin[2] = (p->z - d[2])/2;
377 else imax[2] = (p->z - d[2])/2;
378 }
379 }
380
381 if ( verbose & VERB_FULL ) {
382 cout << "Placing tile:" << endl;
383 cout << "Location: " << p->image[nn].origin() << endl;
384 cout << "Tile size: " << p->size() << endl;
385 cout << "Overlap minima: " << imin << endl;
386 cout << "Overlap maxima: " << imax << endl << endl;
387 }
388
389 zz = p->image[nn].origin()[2];
390 for ( tz=0; tz<p->z; tz++, zz++ ) {
391 w[2] = 1;
392 if ( tz < imin[2] ) w[2] = 0;
393 else if ( tz > imax[2] ) w[2] = 0;
394 yy = p->image[nn].origin()[1];
395 for ( ty=0; ty<p->y; ty++, yy++ ) {
396 w[1] = 1;
397 if ( ty < imin[1] ) w[1] = 0;
398 else if ( ty > imax[1] ) w[1] = 0;
399 xx = p->image[nn].origin()[0];
400 for ( tx=0; tx<p->x; tx++, xx++ ) {
401 w[0] = 1;
402 if ( tx < imin[0] ) w[0] = 0;
403 else if ( tx > imax[0] ) w[0] = 0;
404 // ww = w.volume();
405 ww = w[0]*w[1]*w[2];
406 if ( ww ) {
407 i = p->index(0, tx, ty, tz, nn);
408 j = index(0, xx, yy, zz, 0);
409 for ( cc=0; cc<c; cc++, i++, j++ ) set(j, (*p)[i]);
410 }
411 }
412 }
413 }
414
415 return 0;
416 }
417
432 int Bimage::assemble_tiles(Bimage* pt, int flag)
433 {
434 clear();
435
436 for ( long nn=0; nn<pt->n; nn++ ) {
437 if ( flag == 1 ) {
438 place_with_overlap(pt, nn);
439 } else if ( flag == 2 ) {
440 place_central_part(pt, nn);
441 } else {
442 place_with_addition(pt, nn);
443 }
444 }
445
446 if ( flag == 0 && next ) {
447 for ( long i=0; i<data_size(); ++i )
448 if ( (*next)[i] > 1 ) set(i, (*this)[i]/(*next)[i]);
449 delete next;
450 next = NULL;
451 }
452
453 return 0;
454 }
455
476 double Bimage::linear_fit(Bimage* p, Bimage* pmask, double max_exclude)
477 {
478 if ( !check_if_same_size(p) ) {
479 error_show("Bimage::linear_fit", __FILE__, __LINE__);
480 return -1.0;
481 }
482
483 if ( max_exclude >= 1 ) max_exclude /= 100; // Assume it is a percentage
484 if ( max_exclude > 0.5 ) max_exclude = 0.5; // At least half of the data must be fit
485
486 long i, j, nn, nm, nfit, best_excl(0);
487 long imgsize(x*y*z*c), num(imgsize);
488 int bin;
489 double sx, sx2, sy, sxy, sd, dy, denominator, a, b, R, bestR(1e30), best_a(0), best_b(0);
490 double excl_voxels, diff, maxdiff, diff_cutoff;
491
492 int hist[1024];
493 for ( i=0; i<1024; i++ ) hist[i] = 0;
494 int* inc_mask = new int[imgsize];
495 for ( i=0; i<imgsize; i++) inc_mask[i] = 1;
496
497 if ( pmask ) pmask->change_type(UCharacter);
498
499 if ( verbose & VERB_LABEL ) {
500 cout << "Linear least squares fit: image2 = intercept + slope x image1" << endl;
501 cout << "Maximum voxels to exclude: " << 100.0*max_exclude << " %" << endl;
502 }
503
504 if ( verbose & VERB_FULL )
505 cout << " %Set\t Voxels \t%Excluded\tIntercept\tSlope\t\tR" << endl;
506 else if ( verbose & VERB_PROCESS )
507 cout << "Intercept\t Slope\t R-factor\tExcluded\t%" << endl;
508
509 for ( nn=0; nn<n; nn++) {
510 best_excl = 0;
511 best_a = best_b = 0;
512 bestR = 1e30;
513 if ( pmask ) {
514 nm = nn;
515 if ( pmask->images() < n ) nm = 0;
516 for ( num=j=0, i=nm*imgsize; j<imgsize; j++,i++ ) {
517 if ( (*pmask)[i] ) {
518 inc_mask[i] = 1;
519 num++;
520 } else inc_mask[j] = -1;
521 }
522 }
523 for ( excl_voxels = 0; excl_voxels < max_exclude+0.01; excl_voxels += 0.01 ) {
524 nfit = 0;
525 a = b = sx = sx2 = sy = sxy = sd = dy = maxdiff = 0;
526 for ( j=0, i=nn*imgsize; j<imgsize; j++, i++ ) if ( inc_mask[j] > 0 ) {
527 sx += (*this)[i];
528 sy += (*p)[i];
529 sx2 += (*this)[i]*(*this)[i];
530 sxy += (*this)[i]*(*p)[i];
531 nfit++;
532 }
533 denominator = nfit*sx2 - sx*sx;
534 if ( denominator ) {
535 a = (sx2*sy - sx*sxy)/denominator;
536 b = (nfit*sxy - sx*sy) /denominator;
537 }
538 sy /= nfit;
539
540 for ( j=0, i=nn*imgsize; j<imgsize; j++, i++ ) if ( inc_mask[j] >= 0 ) {
541 diff = a + b*(*this)[i] - (*p)[i];
542 if ( inc_mask[j] ) {
543 dy += diff*diff;
544 sd += ((*p)[i]-sy)*((*p)[i]-sy);
545 }
546 diff = fabs(diff);
547 if ( maxdiff < diff ) maxdiff = diff;
548 }
549 R = 1e30;
550 if ( dy < 1e-30 ) R = 0;
551 else if ( sd ) R = sqrt(dy/sd);
552 if ( bestR > R ) {
553 bestR = R;
554 best_a = a;
555 best_b = b;
556 best_excl = num - nfit;
557 }
558
559 if ( verbose & VERB_FULL )
560 cout<< 100*excl_voxels << tab << nfit << tab
561 << 100.0-nfit*100.0/num << tab << a << tab << b << tab << R << endl;
562
563 if ( verbose & VERB_DEBUG )
564 cout << "DEBUG img_linear_fit: maxdiff=" << maxdiff << endl;
565 if ( maxdiff < 1e-30 ) maxdiff = 1;
566 for ( i=0; i<1024; i++ ) hist[i] = 0;
567 for ( j=0, i=nn*imgsize; j<imgsize; j++, i++ ) if ( inc_mask[j] >= 0 ) {
568 diff = fabs(a + b*(*this)[i] - (*p)[i]);
569 bin = (int) (1000*diff/maxdiff);
570 if ( bin > 999 ) bin = 999;
571 hist[bin]++;
572 }
573
574 i = 999;
575 j = hist[i];
576 while ( i > 1 && j < num*excl_voxels ) {
577 i--;
578 j += hist[i];
579 }
580 diff_cutoff = i*maxdiff/1000.0;
581
582 for ( j=0, i=nn*imgsize; j<imgsize; j++, i++ ) if ( inc_mask[j] >= 0 ) {
583 diff = fabs(a + b*(*this)[i] - (*p)[i]);
584 inc_mask[j] = 1;
585 if ( diff > diff_cutoff ) inc_mask[j] = 0;
586 }
587 }
588
589 for ( j=0, i=nn*imgsize; j<imgsize; j++, i++ )
590 set(i, best_a + best_b*(*this)[i] - (*p)[i]);
591
592 image[nn].FOM(bestR);
593
594 if ( verbose & VERB_PROCESS )
595 cout << best_a << tab << best_b << tab << bestR << tab << best_excl << tab << best_excl*100.0/num << " %" << endl;
596 }
597
598 delete[] inc_mask;
599
600 if ( verbose >= VERB_PROCESS ) cout << endl;
601
602 return bestR;
603 }
604
614 int Bimage::histomatch(Bimage* p, long bins)
615 {
616 if ( !check_if_same_size(p) ) {
617 error_show("Bimage::histomatch", __FILE__, __LINE__);
618 return -1;
619 }
620
621 long i;
622 long h1, h2;
623 double denom, fraction;
624 int* hist1 = new int[bins];
625 int* hist2 = new int[bins];
626 int* map = new int[bins];
627 double* dens = new double[bins];
628
629 for ( i=0; i<bins; i++ )
630 hist1[i] = hist2[i] = 0;
631
632 if ( verbose & VERB_LABEL )
633 cout << "Matching histograms in " << bins << " bins:" << endl << endl;
634
635 for ( i=0; i<datasize; i++ ) {
636 h1 = (long) (bins*((*this)[i] - min)/(max - min));
637 h2 = (long) (bins*((*p)[i] - p->minimum())/(p->maximum() - p->minimum()));
638 if ( h1 >= bins ) h1 = bins - 1;
639 if ( h2 >= bins ) h2 = bins - 1;
640 hist1[h1]++;
641 hist2[h2]++;
642 }
643
644 if ( verbose & VERB_DEBUG )
645 cout << "Histograms done" << endl;
646
647 for ( i=bins-1; i>0; i-- ) {
648 hist1[i-1] += hist1[i];
649 hist2[i-1] += hist2[i];
650 }
651
652 if ( verbose & VERB_DEBUG )
653 cout << "Integration done" << endl;
654
655 for ( h2=0; h2<bins; h2++ ) {
656 h1 = 0;
657 while ( ( h1 < bins ) && ( hist1[h1] > hist2[h2] ) ) h1++;
658 if ( h1 > 0 ) h1--;
659 if ( h2 < bins - 1 )
660 denom = hist1[h1+1] - hist1[h1] - hist2[h2+1] + hist2[h2];
661 else
662 denom = hist1[h1] - hist1[h1-1] - hist2[h2] + hist2[h2-1];
663 if ( denom != 0 )
664 fraction = (hist2[h2] - hist1[h1])/denom;
665 else
666 fraction = 0.5;
667 map[h2] = h1;
668 dens[h2] = (h2 + fraction)*(max - min)/bins + min;
669 }
670
671 if ( verbose & VERB_DEBUG ) {
672 cout << "Mapping calculated" << endl;
673 cout << "Bin\tHist1\tHist2\tMapping\tDensity" << endl;
674 for ( i=0; i<bins; i++ )
675 cout << i << tab << hist1[i] << tab << hist2[i] << tab
676 << map[i] << tab << dens[i] << endl;
677 }
678
679 for ( i=0; i<datasize; i++ ) {
680 h2 = (int) (bins*((*p)[i] - p->minimum())/(p->maximum() - p->minimum()));
681 if ( h2 >= bins ) h2 = bins - 1;
682 set(i, dens[map[h2]]);
683 }
684
685 statistics();
686
687 if ( verbose & VERB_DEBUG )
688 cout << "Histogram matching done" << endl;
689
690 delete[] hist1;
691 delete[] hist2;
692 delete[] map;
693 delete[] dens;
694
695 return 0;
696 }
697
Bimage::change_type
void change_type(char letter)
Get the data type indicated by a single letter code.
Definition: Bimage.cpp:1743
Bimage::copy_header
Bimage * copy_header()
Definition: Bimage.h:650
Bimage::catenate
void catenate(long m, Bimage **p)
Catenates an array of images of the same size into a multi-image structure.
Definition: Bimage_combine.cpp:52
Bimage.h
Header file for image class.
Bimage::sampling
Vector3< double > sampling()
Definition: Bimage.h:505
Bimage::add
void add(long j, double v)
Definition: Bimage.h:308
utilities.h
Header file for general utilities.
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::place_central_part
int place_central_part(Bimage *p, long nn)
Packs a tile with overlap into a new composite image.
Definition: Bimage_combine.cpp:358
Bimage::index
long index(long nx, long ny) const
Definition: Bimage.h:383
verbose
int verbose
Bimage::place
int place(long nn, Bimage *p, Vector3< double > loc, double radius=0, double scale=1, double shift=0, int operation=0)
Places a small image into a large image.
Definition: Bimage_combine.cpp:178
Bimage::assemble_tiles
int assemble_tiles(Bimage *pt, int flag=0)
Assembles overlapping tiles into this image.
Definition: Bimage_combine.cpp:432
VERB_PROCESS
#define VERB_PROCESS
Definition: utilities.h:107
Bimage::Bimage
Bimage()
Initializes an image.
Definition: Bimage.cpp:44
Float
Definition: utilities.h:157
Vector3::max
Type max()
Definition: Vector3.h:175
Bimage
General image parameter class.
Definition: Bimage.h:163
Bimage::data_alloc
unsigned char * data_alloc()
Definition: Bimage.h:256
Bimage::shift
int shift(Vector3< double > vec, int fill_type=0, double fill=0)
Shifts an image.
Definition: Bimage_transform.cpp:587
Bimage::linear_fit
double linear_fit(Bimage *p, Bimage *pmask, double max_exclude)
Linear least squares fit of two images.
Definition: Bimage_combine.cpp:476
Bimage::maximum
double maximum()
Definition: Bimage.h:535
Bimage::statistics
long statistics()
Calculates the statistics for an image.
Definition: Bimage_stats.cpp:22
Bsub_image::FOM
double FOM()
Definition: Bimage.h:151
Bimage::sum
void sum(long m, Bimage **p)
Sums an array of images with their FOM blocks.
Definition: Bimage_combine.cpp:23
Bimage::size
Vector3< long > size() const
Definition: Bimage.h:373
Bimage::calculate_background
int calculate_background(long nn, int flag)
Calculates the background for one sub-image.
Definition: Bimage_background.cpp:27
Bsub_image::origin
void origin(double x, double y, double z)
Definition: Bimage.h:127
Bimage::set
void set(long j, double v)
Sets a single value at the given index.
Definition: Bimage.cpp:1096
Bimage::next
Bimage * next
Definition: Bimage.h:165
Bimage::data_pointer
unsigned char * data_pointer()
Definition: Bimage.h:261
UCharacter
Definition: utilities.h:149
Bimage::clear
void clear()
Definition: Bimage.h:697
Vector3< double >
Bimage::place_with_addition
int place_with_addition(Bimage *p, long nn)
Packs a tile with overlap into a new composite image.
Definition: Bimage_combine.cpp:242
Vector3::min
Type min()
Definition: Vector3.h:169
Bimage::histomatch
int histomatch(Bimage *p, long bins)
Fits two images by matching the histogram of the second to the first.
Definition: Bimage_combine.cpp:614
Bimage::check_if_same_size
bool check_if_same_size(Bimage *p)
Check if two images are the same size.
Definition: Bimage.cpp:536
Bimage::images
long images()
Definition: Bimage.h:491
VERB_FULL
#define VERB_FULL
Definition: utilities.h:109
Bimage::background
double background(long nn)
Definition: Bimage.h:542
VERB_LABEL
#define VERB_LABEL
Definition: utilities.h:106
Bimage::data_type
DataType data_type()
Definition: Bimage.h:349
Bimage::minimum
double minimum()
Definition: Bimage.h:534
Bimage::data_size
long data_size()
Definition: Bimage.h:255
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::blend
Bimage * blend(Bimage *p, long number)
Blends the two images, creating a new set of sub-images.
Definition: Bimage_combine.cpp:108
Bimage::place_with_overlap
int place_with_overlap(Bimage *p, long nn)
Packs a tile with overlap into a new composite image.
Definition: Bimage_combine.cpp:284