@@ -66,10 +66,13 @@ public class SpotFeatureCalculator extends MultiThreadedBenchmarkAlgorithm imple
6666
6767 private String cancelReason ;
6868
69- public SpotFeatureCalculator ( final Model model , final Settings settings )
69+ private final boolean doLogIt ;
70+
71+ public SpotFeatureCalculator ( final Model model , final Settings settings , final boolean doLogIt )
7072 {
7173 this .settings = settings ;
7274 this .model = model ;
75+ this .doLogIt = doLogIt ;
7376 }
7477
7578 /*
@@ -116,7 +119,7 @@ public boolean process()
116119 }
117120
118121 // Do it.
119- computeSpotFeaturesAgent ( model .getSpots (), settings .getSpotAnalyzerFactories (), true );
122+ computeSpotFeaturesAgent ( model .getSpots (), settings .getSpotAnalyzerFactories (), doLogIt );
120123 return true ;
121124 }
122125
@@ -149,6 +152,7 @@ private void computeSpotFeaturesAgent( final SpotCollection toCompute, final Lis
149152 final long start = System .currentTimeMillis ();
150153 final Logger logger = doLogIt ? model .getLogger () : Logger .VOID_LOGGER ;
151154
155+
152156 // Can't compute any spot feature without an image to compute on.
153157 if ( settings .imp == null )
154158 return ;
@@ -200,6 +204,7 @@ public Void call() throws Exception
200204 if ( isCanceled () )
201205 return null ;
202206
207+
203208 @ SuppressWarnings ( "unchecked" )
204209 final SpotAnalyzer < ? > analyzer = factory .getAnalyzer ( img , frame , channel );
205210 // Fine-tune multithreading if we can.
@@ -234,6 +239,7 @@ public Void call() throws Exception
234239 executorService .shutdown ();
235240 logger .setProgress ( 1 );
236241 logger .setStatus ( "" );
242+
237243 final long end = System .currentTimeMillis ();
238244 processingTime = end - start ;
239245 }
0 commit comments