Skip to content
GitLab
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
b846cf52
Commit
b846cf52
authored
Jan 29, 2020
by
Stephane Dallongeville
Browse files
Fixed possible NPE on exception handling
parent
1f8d60eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/adufour/activecontours/ActiveContours.java
View file @
b846cf52
...
...
@@ -339,7 +339,7 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
private
final
HashMap
<
TrackSegment
,
Double
>
volumes
=
new
HashMap
<
TrackSegment
,
Double
>();
public
final
EzVarBoolean
volume_constraint
=
new
EzVarBoolean
(
"Volume constraint"
,
false
);
public
final
EzVarDouble
volume_weight
=
new
EzVarDouble
(
"Volume weight"
,
0.01
,
0
,
1
,
0.01
);
public
final
EzVarDouble
volume_weight
=
new
EzVarDouble
(
"Volume weight"
,
0.01
,
0
,
1
,
0.01
);
public
final
EzButton
showTrackManager
;
...
...
@@ -615,7 +615,7 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
for
(
int
t
=
startT
;
t
<=
endT
;
t
++)
{
int
iteration
;
// if sizeT changed during AC processing (i already did it to shorthen processing time :p)
if
(
t
>=
inputData
.
getSizeT
())
break
;
...
...
@@ -1491,11 +1491,11 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
}
// we disabled volume constraint feature as it doesn't work and sometime end to crazy contour (Stephane)
// re-enabled volume constraint after taking into account both shrinking and growing contours instead of just growing ones(Daniel)
// re-enabled volume constraint after taking into account both shrinking and growing contours instead of just growing ones(Daniel)
if
(
volume_constraint
.
getValue
()
&&
volumes
.
containsKey
(
segment
))
{
contour
.
computeVolumeConstraint
(
volumes
.
get
(
segment
),
volume_weight
.
getValue
());
}
{
contour
.
computeVolumeConstraint
(
volumes
.
get
(
segment
),
volume_weight
.
getValue
());
}
}
else
{
...
...
@@ -1514,7 +1514,7 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
.
getCause
());
throw
new
RuntimeException
(
(
e
.
getCause
()
!=
null
)
?
e
.
getCause
()
:
e
);
}
if
(
coupling_flag
.
getValue
())
...
...
@@ -1640,8 +1640,7 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
}
catch
(
Exception
e
)
{
e
.
getCause
().
printStackTrace
();
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
((
e
.
getCause
()
!=
null
)
?
e
.
getCause
()
:
e
);
}
}
...
...
@@ -1675,8 +1674,7 @@ public class ActiveContours extends EzPlug implements EzStoppable, Block
}
catch
(
Exception
e
)
{
e
.
getCause
().
printStackTrace
();
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
((
e
.
getCause
()
!=
null
)
?
e
.
getCause
()
:
e
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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