Commit 83a5c5ca authored by Edward Andò's avatar Edward Andò
Browse files

general safety in getImagettesLabelled

parent 921c3086
Pipeline #62465 passed with stages
in 13 minutes and 41 seconds
......@@ -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,
......
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