Commit a6c3ba3c authored by katharina.loeffler's avatar katharina.loeffler
Browse files

bug fix: splitting tracking masks - init new tracks after decision if track

is splitable
parent c1064ae9
...@@ -300,10 +300,6 @@ def split_tracks(all_tracks, split_track_id, n_splits, all_split_track_ids): ...@@ -300,10 +300,6 @@ def split_tracks(all_tracks, split_track_id, n_splits, all_split_track_ids):
track.successors.remove(s) track.successors.remove(s)
successors = [] successors = []
for track_id in new_track_ids:
all_tracks[track_id] = CellTrack(track_id, [])
all_tracks[track_id].successors = {}
# if segmentation mask (n pixels) smaller than number of objects to split into don't split # if segmentation mask (n pixels) smaller than number of objects to split into don't split
segm_masks = track.masks segm_masks = track.masks
is_too_small_mask = [len(mask[0]) < n_splits for mask in segm_masks.values()] is_too_small_mask = [len(mask[0]) < n_splits for mask in segm_masks.values()]
...@@ -317,6 +313,10 @@ def split_tracks(all_tracks, split_track_id, n_splits, all_split_track_ids): ...@@ -317,6 +313,10 @@ def split_tracks(all_tracks, split_track_id, n_splits, all_split_track_ids):
all_tracks[s].pred_track_id.remove(split_track_id) all_tracks[s].pred_track_id.remove(split_track_id)
return all_tracks return all_tracks
for track_id in new_track_ids:
all_tracks[track_id] = CellTrack(track_id, [])
all_tracks[track_id].successors = {}
if len(track.successors) == n_splits: if len(track.successors) == n_splits:
seed_positions = [all_tracks[s].get_first_position() for s in track.successors] seed_positions = [all_tracks[s].get_first_position() for s in track.successors]
elif len(predecessors) == n_splits: elif len(predecessors) == n_splits:
......
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