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
ttk
spam
Commits
83a5c5ca
Commit
83a5c5ca
authored
Mar 16, 2021
by
Edward Andò
Browse files
general safety in getImagettesLabelled
parent
921c3086
Pipeline
#62465
passed with stages
in 13 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tools/label/label.py
View file @
83a5c5ca
...
...
@@ -679,8 +679,10 @@ def getImagettesLabelled(lab1, label, Phi, im1, im2, searchRange, boundingBoxes,
Coordinates of the top of the pixelSearch range in im1, i.e., the displacement that needs to be
added to the raw pixelSearch output to make it a im1 -> im2 displacement
"""
returnStatus
=
1
returnStatus
=
1
imagette1
=
None
imagette1mask
=
None
imagette2
=
None
imagette2mask
=
None
intDisplacement
=
numpy
.
round
(
Phi
[
0
:
3
,
3
]).
astype
(
int
)
...
...
@@ -738,8 +740,6 @@ def getImagettesLabelled(lab1, label, Phi, im1, im2, searchRange, boundingBoxes,
# If all of imagette2 is nans it fell outside im2 (or in any case it's going to be difficult to correlate)
if
numpy
.
all
(
numpy
.
isnan
(
imagette2
)):
returnStatus
=
-
5
else
:
imagette2
=
None
return
{
'imagette1'
:
imagette1
,
'imagette1mask'
:
imagette1mask
,
...
...
Write
Preview
Supports
Markdown
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