From 6eadad6bcbe5f66ec2a990e1190e868c43d26e1e Mon Sep 17 00:00:00 2001 From: Jean-Yves Tinevez Date: Wed, 24 May 2023 13:35:44 +0200 Subject: [PATCH] Fix OverlapTracker not working if the first frame was devoid of visible spots. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Noticed by Laura XĂ©nard @Mini-Miette Fix #260 --- .../plugin/trackmate/tracking/overlap/OverlapTracker.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/fiji/plugin/trackmate/tracking/overlap/OverlapTracker.java b/src/main/java/fiji/plugin/trackmate/tracking/overlap/OverlapTracker.java index 5b0983ce4..a49085ddc 100644 --- a/src/main/java/fiji/plugin/trackmate/tracking/overlap/OverlapTracker.java +++ b/src/main/java/fiji/plugin/trackmate/tracking/overlap/OverlapTracker.java @@ -203,7 +203,11 @@ public boolean process() final Map< Spot, Polygon2D > targetGeometries = createGeometry( spots.iterable( targetFrame, true ), method, enlargeFactor ); if ( sourceGeometries.isEmpty() || targetGeometries.isEmpty() ) + { + sourceGeometries = targetGeometries; + logger.setProgress( ( double ) progress++ / spots.keySet().size() ); continue; + } final ExecutorService executors = Threads.newFixedThreadPool( numThreads ); final List< Future< IoULink > > futures = new ArrayList<>();