Commit 6474f6ca authored by Stephane Dallongeville's avatar Stephane Dallongeville
Browse files

small fix

parent 7f869b1c
......@@ -649,21 +649,6 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
System.out.println("[Active Contours] converged current contours on frame " + t + " in " + iteration
+ " iterations");
// no more contours for this time point ?
if (iteration == -1)
{
// detection of new objects disable ?
if (!tracking_newObjects.getValue().booleanValue() || (inputData.getSizeZ() != 1))
{
// no ROIs to work with in future ? --> we can stop process here
if(!hasFutureRois(t))
{
storeResult(t);
break;
}
}
}
if (Thread.currentThread().isInterrupted())
break;
......@@ -678,6 +663,23 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
System.out.println("=> evolving new contours...");
// evolve new contours
iteration = evolveContours(t, field);
// no more contours for this time point ?
if (iteration == -1)
{
// detection of new objects disable ?
if (!tracking_newObjects.getValue().booleanValue() || (inputData.getSizeZ() != 1))
{
// no ROIs to work with in future ? --> we can stop process here
if (!hasFutureRois(t))
{
storeResult(t);
break;
}
}
}
// log info
if (iteration > 0)
System.out.println(
"[Active Contours] converged new contours on frame " + t + " in " + iteration + " iterations");
......@@ -1017,16 +1019,18 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
return false;
// only pick ROI for current frame
for (ROI roi: rois)
for (ROI roi : rois)
{
if (roi instanceof ROI2D)
{
// we have new ROI for this time point or in future
if (((ROI2D) roi).getT() >= t) return true;
if (((ROI2D) roi).getT() >= t)
return true;
}
else if (roi instanceof ROI3D)
{
if (((ROI3D) roi).getT() >= t) return true;
if (((ROI3D) roi).getT() >= t)
return true;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment