File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -585,7 +585,7 @@ void APRConverter<ImageType>::auto_parameters(const MeshData<T>& input_img){
585585 }
586586 }
587587
588- T mean = counter > 0 ? total_p/(counter*1.0 ) : 1 ;
588+ float mean = counter > 0 ? total_p/(counter*1.0 ) : 1 ;
589589
590590 // now compute the standard deviation (sd) of the patches
591591
@@ -641,7 +641,7 @@ void APRConverter<ImageType>::auto_parameters(const MeshData<T>& input_img){
641641 }
642642
643643 float Ip_th = mean + sd;
644- float var_th = (img_mean/mean)*sd*min_snr;
644+ float var_th = (img_mean/( mean* 1 . 0f ) )*sd*min_snr;
645645
646646 float var_th_max = sd*min_snr*.5f ;
647647
Original file line number Diff line number Diff line change @@ -563,14 +563,15 @@ class APRAccess {
563563 apr_timer.start_timer (" forth loop" );
564564
565565 // iteration helpers for by level
566- global_index_by_level_begin.resize (apr.level_max ()+1 ,0 );
566+ global_index_by_level_begin.resize (apr.level_max ()+1 ,1 );
567567 global_index_by_level_end.resize (apr.level_max ()+1 ,0 );
568568
569569 cumsum= 0 ;
570570
571571 total_number_gaps=0 ;
572572
573573 uint64_t min_level_find = apr.level_max ();
574+ uint64_t max_level_find = apr.level_min ();
574575
575576 // set up the iteration helpers for by zslice
576577 global_index_by_level_and_z_begin.resize (apr.level_max ()+1 );
@@ -596,6 +597,7 @@ class APRAccess {
596597 for (int j = 0 ; j < y_begin.data [i][offset_pc_data].size (); ++j) {
597598
598599 min_level_find = std::min (i,min_level_find);
600+ max_level_find = std::max (i,max_level_find);
599601
600602 y_begin.data [i][offset_pc_data][j].second .global_index_begin = cumsum;
601603
@@ -626,6 +628,7 @@ class APRAccess {
626628
627629 // set minimum level now to the first non-empty level.
628630 level_min = min_level_find;
631+ level_max = max_level_find;
629632
630633 total_number_non_empty_rows=0 ;
631634
You can’t perform that action at this time.
0 commit comments