File tree Expand file tree Collapse file tree
src/main/java/bigtrace/math Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,6 @@ protected Void doInBackground() throws Exception
6565 runFullAutoTrace ();
6666 return null ;
6767 }
68-
6968
7069 public void runFullAutoTrace ()
7170 {
@@ -81,6 +80,7 @@ public void runFullAutoTrace()
8180 oneClickTrace .init ();
8281
8382 setProgress (0 );
83+ int nCurrRoiN = nCount ;
8484 for (int nTP = nFirstTP ; nTP <= nLastTP ; nTP ++)
8585 {
8686
@@ -115,23 +115,25 @@ public void runFullAutoTrace()
115115 if (!oneClickTrace .bStartLocationOccupied )
116116 {
117117 mask .markROI ( bt .roiManager .getActiveRoi () );
118+ nCount ++;
118119 }
119120 if ( bt .roiManager .getActiveRoi () instanceof LineTrace3D )
120121 {
121122 final LineTrace3D newtrace = (LineTrace3D )bt .roiManager .getActiveRoi ();
122123 if (newtrace .getNumberOfPointsInJointSegment () < nAutoMinPointsCurve )
123124 {
124125 bt .roiManager .deleteActiveROI ();
126+ nCount --;
125127 }
126- else
128+ }
129+ if ( bt .btMacro .bMacroMode )
130+ {
131+ if (nCurrRoiN != nCount )
127132 {
128- nCount ++;
129- if ( bt . btMacro . bMacroMode )
133+ nCurrRoiN = nCount ;
134+ if (nCount % 20 == 0 )
130135 {
131- if (nCount % 20 == 0 )
132- {
133- IJ .log ( "Auto trace progress: found " +Integer .toString ( nCount ) + " ROIs, current start intensity is " +Double .toString ( newMax .getA () )+"." );
134- }
136+ IJ .log ( "Auto trace progress: found " +Integer .toString ( nCount ) + " ROIs, current start intensity is " +Double .toString ( newMax .getA () )+"." );
135137 }
136138 }
137139 }
@@ -185,7 +187,7 @@ public void done()
185187
186188 public void wrapUp ()
187189 {
188- TaskBT .runOnEDTAndWait ( () ->
190+ TaskBT .runOnEDT ( () ->
189191 {
190192 if (butAuto != null && tabIconRestore != null )
191193 {
You can’t perform that action at this time.
0 commit comments