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

small fix

parent 7f869b1c
......@@ -648,21 +648,6 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
if (iteration > 0)
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");
......@@ -1007,7 +1009,7 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
{
if (isHeadLess())
return false;
// take sequence ROI
rois = inputData.getROIs();
}
......@@ -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;
}
}
......@@ -1423,7 +1427,7 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
// maximum number of iteration allowed raised ?
if (iter >= convergence_nbIter.getValue())
{
// consider that all current evolving contours converged here
// consider that all current evolving contours converged here
for (ActiveContour contour : evolvingContoursAtTimeT)
contour.setLastConvergedFrame(t);
......
Supports Markdown
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