Skip to content
Snippets Groups Projects
Commit f3391dbd authored by Nathan Spaeth's avatar Nathan Spaeth
Browse files

Give warning for non-existent track when using change label. Fix ProcessNewBorns bug

parent 9fc46725
Branches
Tags
No related merge requests found
...@@ -33,6 +33,11 @@ function ContextChangeLabel(time,trackID) ...@@ -33,6 +33,11 @@ function ContextChangeLabel(time,trackID)
if(isempty(newTrackID)),return,end; if(isempty(newTrackID)),return,end;
newTrackID = str2double(newTrackID(1)); newTrackID = str2double(newTrackID(1));
if(isempty(CellTracks(newTrackID).hulls))
warn = sprintf('Track %d does not exist, cannot change',newTrackID);
warndlg(warn);
return
end
curHull = CellTracks(newTrackID).hulls(1); curHull = CellTracks(newTrackID).hulls(1);
bErr = Editor.ReplayableEditAction(@Editor.ChangeLabelAction, trackID,newTrackID,time); bErr = Editor.ReplayableEditAction(@Editor.ChangeLabelAction, trackID,newTrackID,time);
......
...@@ -50,7 +50,7 @@ Tracker.PatchMatchedTracks(); ...@@ -50,7 +50,7 @@ Tracker.PatchMatchedTracks();
deadHulls = CellPhenotypes.hullPhenoSet(1,(CellPhenotypes.hullPhenoSet(2,:) == 1)); deadHulls = CellPhenotypes.hullPhenoSet(1,(CellPhenotypes.hullPhenoSet(2,:) == 1));
deadTracks = unique(Hulls.GetTrackID(deadHulls)); deadTracks = unique(Hulls.GetTrackID(deadHulls));
for i=1:length(deadTracks) for i=1:length(deadTracks)
Tracks.StraightenTrack(deadTracks); Tracks.StraightenTrack(deadTracks(i));
end end
% %Remove any newly created parasite tracks from tree % %Remove any newly created parasite tracks from tree
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment