Skip to content

Commit

Permalink
Make showing progress in the status service more correct.
Browse files Browse the repository at this point in the history
* The frameId previously used to update progress could in some cases be higher than numTimepoints.
  • Loading branch information
stefanhahmann committed Mar 15, 2024
1 parent 35c4ac7 commit 6da484f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ static void createSpotsFromLabelImage( final IntFunction< RandomAccessibleInterv
try
{
int numTimepoints = frames.size();
for ( TimePoint frame : frames )
for ( int i = 0; i < numTimepoints; i++ )
{
TimePoint frame = frames.get( i );
int frameId = frame.getId();
final RandomAccessibleInterval< RealType< ? > > rai = frameProvider.apply( frameId );
count += createSpotsForFrame( graph, rai, frameId, voxelDimensions, sigma );
if ( statusService != null )
statusService.showProgress( frameId + 1, numTimepoints );
statusService.showProgress( i + 1, numTimepoints );
}
model.setUndoPoint();
}
Expand Down

0 comments on commit 6da484f

Please sign in to comment.