Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bioimage Analysis
Active Contour
Commits
6474f6ca
Commit
6474f6ca
authored
Jun 09, 2020
by
Stephane Dallongeville
Browse files
small fix
parent
7f869b1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/adufour/activecontours/ActiveContours.java
View file @
6474f6ca
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment