Skip to content

Commit

Permalink
BUG: fix bug when no cells on canvas. (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykevu committed Jan 28, 2023
1 parent 42fbac6 commit afe72b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/deepcell_label/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ def rewrite_labeled(labeled, cells):
overlap_values.append([value, group])

# Rewrite overlapping values with values higher than all cells
new_overlap_value = max(cells_at_t, key=lambda c: c['cell'])['cell'] + 1
if len(cells_at_t) == 0:
new_overlap_value = 0
else:
new_overlap_value = max(cells_at_t, key=lambda c: c['cell'])['cell'] + 1
for overlap_value, overlap_cells in overlap_values:
for cell in overlap_cells:
frame = labeled[:, t, :, :]
Expand Down

0 comments on commit afe72b5

Please sign in to comment.