Skip to content

Commit

Permalink
fix: correctly split by labelling before trying convexity defect
Browse files Browse the repository at this point in the history
  • Loading branch information
ElpadoCan committed Mar 7, 2025
1 parent 5b46d83 commit 0b36b8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cellacdc/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -9210,7 +9210,7 @@ def __init__(
self.undoIdx = 0
self.fontSize = fontSize
self.AllCutsCoords = []
self.setWindowTitle("Cell-ACDC - Segm&Track")
self.setWindowTitle("Split object")
# self.setGeometry(Left, Top, 850, 800)

self.gui_createActions()
Expand Down
6 changes: 3 additions & 3 deletions cellacdc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3446,7 +3446,7 @@ def split_connected_components(lab, rp=None, max_ID=None):
_slice = obj.slice # self.getObjSlice(obj.slice)
_objMask = obj.image # self.getObjImage(obj.image)
lab[_slice][_objMask] = lab_obj[_objMask]
setRp = True
split_occured = True
max_ID += 1
return split_occured

Expand All @@ -3457,8 +3457,8 @@ def split_along_convexity_defects(
# First try separating by labelling
lab_ID = lab_ID_bool.astype(int)
rp_ID = skimage.measure.regionprops(lab_ID)
setRp = split_connected_components(lab_ID, rp=rp_ID, max_ID=max_ID)
if setRp:
split_occured = split_connected_components(lab_ID, rp=rp_ID, max_ID=max_ID)
if split_occured:
success = True
lab[lab_ID_bool] = lab_ID[lab_ID_bool]
rp_ID = skimage.measure.regionprops(lab_ID)
Expand Down
1 change: 0 additions & 1 deletion cellacdc/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -24754,7 +24754,6 @@ def warnEditingWithCca_df(
return True

action = self.warnEditingWithAnnotActions.get(editTxt, None)
printl(action, update_images)
if action is not None:
if not action.isChecked():
if update_images:
Expand Down

0 comments on commit 0b36b8b

Please sign in to comment.