Skip to content
Snippets Groups Projects
Commit 2b4c611f authored by Mark Winter's avatar Mark Winter
Browse files

Some fixes from mitosis branch: Don't run ChangeTrackID if current and desired...

Some fixes from mitosis branch: Don't run ChangeTrackID if current and desired track are the same and avoid (startHash <= 0), also fix in ProcessNewborns to reflect GetHullID returning 0 if no hull is found.
parent eac1f209
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ end
% parentHullID = Tracks.GetHullID(CellTracks(trackID).startTime-1, CellTracks(trackID).parentTrack);
% childHullID = Tracks.GetHullID(CellTracks(trackID).startTime, trackID);
%
% if ( isempty(parentHullID) || GraphEdits(parentHullID,childHullID) > 0 )
% if ( (parentHullID == 0) || GraphEdits(parentHullID,childHullID) > 0 )
% continue;
% end
%
......@@ -185,7 +185,7 @@ for i=1:size
end
% Parent track must have a hull in the mitosis frame
if ( isempty(Tracks.GetHullID(CellTracks(childTrackID).startTime, parentTrackID)) )
if ( Tracks.GetHullID(CellTracks(childTrackID).startTime, parentTrackID) == 0 )
continue;
end
......
......@@ -40,6 +40,10 @@ if (time<CellTracks(desiredTrack).startTime)
error('DesiredTrack %d has to exist prior to time %d',desiredTrack,time);
end
if ( currentTrack == desiredTrack )
return;
end
droppedTracks = [];
currentParent = [];
......@@ -55,6 +59,10 @@ end
end
%Gather the hulls to move and leave the rest on the currentTrack
startHash = time-CellTracks(currentTrack).startTime+1;
if ( startHash <= 0 )
startHash = 1;
end
endHash = length(CellTracks(currentTrack).hulls);
hulls = CellTracks(currentTrack).hulls(startHash:endHash);
% else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment