Skip to content
Snippets Groups Projects
Commit 42ab7e80 authored by Andrew Cohen's avatar Andrew Cohen
Browse files

Merge branch 'master' of git-bioimage.coe.drexel.edu:bioimage/leverjs

parents 44f2b0d3 d19b02da
Branches
Tags
No related merge requests found
...@@ -29,10 +29,27 @@ if ~isempty(editQ) ...@@ -29,10 +29,27 @@ if ~isempty(editQ)
continue; continue;
end end
% any cells that were the result of a split where cellID=trackID
% mean those cells weren't tracked.
% BUT there is an exception. If we split the cell, and it worked,
% and then later that cell turns out to be a sibling in a mitosis,
% then we can't undo the split
cmd=['SELECT cellID,trackID FROM tblCells where cellID IN ('... cmd=['SELECT cellID,trackID FROM tblCells where cellID IN ('...
cellIDs(2:end-1) ') AND cellID=trackID']; cellIDs(2:end-1) ') AND cellID=trackID'];
mergeQ=fetch(conn,cmd); mergeQ=fetch(conn,cmd);
if ~isempty(mergeQ) if ~isempty(mergeQ)
% we have untracked cells in the split (cellID==trackID)
% before undoing, check for any of the split cells are in a mitosis
idSplitStr=['(' cellIDs(2:end-1) ')'];
cmd=['select * from tblFamilies where cellID_parent in ' idSplitStr...
' or cellID_child1 in ' idSplitStr ' or cellID_child2 in ' idSplitStr];
q=fetch(conn,cmd);
if ~isempty(q)
% can't undo this split -- one of the splittees is a child
continue
end
% ok -- we have untracked cells in the split, and none of the
% splittees are involved in a mitosis. undo it.
fprintf(1,'found untracked cells from reseg split -- merging\n'); fprintf(1,'found untracked cells from reseg split -- merging\n');
Write.undoEdit(conn,editQ{i,1},0); Write.undoEdit(conn,editQ{i,1},0);
end end
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment