Commit c8b133d1 authored by Edward Andò's avatar Edward Andò
Browse files

skip ddic labels whose deformed state is wholly outside the image

parent eae598ad
Pipeline #50212 passed with stages
in 12 minutes and 39 seconds
......@@ -503,6 +503,7 @@ def slicePadded(im, startStop, createMask=False, padValue=0):
# OR the start are all bigger than im.shape
if numpy.any(stop < numpy.array([0, 0, 0])) or numpy.any(start >= numpy.array(im.shape)):
print("spam.helpers.slicePadded(): The extracted padded slice doesn't not touch the image!")
imSliced = imSliced.astype('<f4')
imSliced *= numpy.nan
if createMask:
return imSliced, numpy.zeros_like(imSliced, dtype=bool)
......
Markdown is supported
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