@@ -52,6 +52,7 @@ class APRConverter {
5252 template <typename T>
5353 void auto_parameters (const PixelData<T> &input_img);
5454
55+
5556private:
5657
5758 // pointer to the APR structure so member functions can have access if they need
@@ -138,23 +139,22 @@ inline bool APRConverter<ImageType>::get_apr_method_from_file(APR<ImageType> &aA
138139 for (size_t i = 0 ; i < inputImage.mesh .size (); ++i) {
139140 inputImage.mesh [i] = (inputImage.mesh [i] - mm.min ) * maxValue / (mm.max - mm.min );
140141 }
141- }
142142
143- // normalize the input parameters if required
144- if (par.Ip_th !=-1 ){
145- std::cout << " Scaled input intensity threshold" << std::endl;
146- par.Ip_th = (par.Ip_th - mm.min )* maxValue / (mm.max - mm.min );
147- }
143+ // normalize the input parameters if required
144+ if (par.Ip_th !=-1 ){
145+ std::cout << " Scaled input intensity threshold" << std::endl;
146+ par.Ip_th = (par.Ip_th - mm.min )* maxValue / (mm.max - mm.min );
147+ }
148148
149- if (par.min_signal !=-1 ){
150- std::cout << " Scaled input min signal threshold" << std::endl;
151- par.min_signal = (par.min_signal )* maxValue / (mm.max - mm.min );
149+ if (par.min_signal !=-1 ){
150+ std::cout << " Scaled input min signal threshold" << std::endl;
151+ par.min_signal = (par.min_signal )* maxValue / (mm.max - mm.min );
152+ }
152153 }
153-
154154 }
155155
156156
157- auto_parameters (inputImage);
157+ // auto_parameters(inputImage);
158158 method_timer.stop_timer ();
159159
160160 return get_apr_method (aAPR, inputImage);
@@ -165,8 +165,13 @@ inline bool APRConverter<ImageType>::get_apr_method_from_file(APR<ImageType> &aA
165165 */
166166template <typename ImageType> template <typename T>
167167inline bool APRConverter<ImageType>::get_apr_method(APR<ImageType> &aAPR, PixelData<T>& input_image) {
168+
168169 apr = &aAPR; // in case it was called directly
169170
171+ if ( par.auto_parameters ) {
172+ auto_parameters (input_image);
173+ }
174+
170175 total_timer.start_timer (" Total_pipeline_excluding_IO" );
171176
172177 init_apr (aAPR, input_image);
0 commit comments