Skip to content

Commit

Permalink
corrected _postprocess_seg_3d funcion to actually work in 3D
Browse files Browse the repository at this point in the history
  • Loading branch information
lufre1 committed Jan 24, 2025
1 parent 0be3377 commit 5fc1c26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse_net/inference/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def _postprocess_seg_3d(seg, area_threshold=1000, iterations=4, iterations_3d=8)
props = regionprops(seg)
for prop in props:
# Get bounding box and mask.
bb = tuple(slice(start, stop) for start, stop in zip(prop.bbox[:2], prop.bbox[2:]))
bb = tuple(slice(start, stop) for start, stop in zip(prop.bbox[:3], prop.bbox[3:]))
mask = seg[bb] == prop.label

# Fill small holes and apply closing.
Expand Down

0 comments on commit 5fc1c26

Please sign in to comment.