You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -57,31 +56,18 @@ class APRConverter: public LocalIntensityScale, public ComputeGradient, public L
57
56
//pointer to the APR structure so member functions can have access if they need
58
57
const APR<ImageType> *apr;
59
58
60
-
MeshData<ImageType> image_temp; // global image variable useful for passing between methods, or re-using memory (should be the only full sized copy of the image)
61
-
MeshData<ImageType> grad_temp; // should be a down-sampled image
62
-
MeshData<float> local_scale_temp; // Used as down-sampled images for some averaging steps where it is useful to not lose precision, or get over-flow errors
63
-
MeshData<float> local_scale_temp2; // Used as down-sampled images for some averaging steps where it is useful to not lose precision, or get over-flow errors
64
-
65
-
//assuming uint16, the total memory cost shoudl be approximately (1 + 1 + 1/8 + 2/8 + 2/8) = 2 5/8 original image size in u16bit
66
-
//storage of the particle cell tree for computing the pulling scheme
//assuming uint16, the total memory cost shoudl be approximately (1 + 1 + 1/8 + 2/8 + 2/8) = 2 5/8 original image size in u16bit
106
+
//storage of the particle cell tree for computing the pulling scheme
107
+
MeshData<ImageType> image_temp; // global image variable useful for passing between methods, or re-using memory (should be the only full sized copy of the image)
108
+
MeshData<ImageType> grad_temp; // should be a down-sampled image
109
+
MeshData<float> local_scale_temp; // Used as down-sampled images for some averaging steps where it is useful to not lose precision, or get over-flow errors
110
+
MeshData<float> local_scale_temp2;
111
+
119
112
allocation_timer.start_timer("init and copy image");
//offset image by factor (this is required if there are zero areas in the background with uint16_t and uint8_t images, as the Bspline co-efficients otherwise may be negative!)
134
-
// Warning both of these could result in over-flow (if your image is non zero, with a 'buffer' and has intensities up to uint16_t maximum value then set this->image_type = "", i.e. uncomment the following line)
127
+
// Warning both of these could result in over-flow (if your image is non zero, with a 'buffer' and has intensities up to uint16_t maximum value then set image_type = "", i.e. uncomment the following line)
this->get_gradient(input_image,gradient,bspline_offset); //note in the current pipeline don't actually use these variables, but here for interface (Use shared member allocated above variables)
this->get_local_intensity_scale(input_image,local_scale); //note in the current pipeline don't actually use these variables, but here for interface (Use shared member allocated above variables)
this->get_local_particle_cell_set(local_scale,gradient); //note in the current pipeline don't actually use these variables, but here for interface (Use shared member allocated above variables)
std::cout << "AUTOPARAMTERS:**Warning** Detected that there is likely noisy background, instead assuming background subtracted and minimum signal of 5 (absolute), if this is not the case please set parameters manually" << std::endl;
566
-
this->par.Ip_th = 1;
567
-
this->par.sigma_th = 5;
568
-
this->par.lambda = 0.5;
569
-
this->par.sigma_th_max = 2;
570
-
this->par.rel_error = 0.125;
571
-
this->par.min_signal = 5;
572
-
this->par.SNR_min = 1;
555
+
par.Ip_th = 1;
556
+
par.sigma_th = 5;
557
+
par.lambda = 0.5;
558
+
par.sigma_th_max = 2;
559
+
par.rel_error = 0.125;
560
+
par.min_signal = 5;
561
+
par.SNR_min = 1;
573
562
} else {
574
563
std::cout << "AUTOPARAMTERS: **Assuming image has atleast 5% dark background" << std::endl;
575
564
}
576
565
577
566
578
567
float min_snr = 6;
579
568
580
-
if(this->par.SNR_min > 0){
581
-
min_snr = this->par.SNR_min;
569
+
if(par.SNR_min > 0){
570
+
min_snr = par.SNR_min;
582
571
} else {
583
572
std::cout << "**Assuming a minimum SNR of 6" << std::endl;
0 commit comments