Commit 42ab7e80 authored by Andrew Cohen's avatar Andrew Cohen

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

parents 44f2b0d3 d19b02da
......@@ -29,10 +29,27 @@ if ~isempty(editQ)
continue;
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 ('...
cellIDs(2:end-1) ') AND cellID=trackID'];
mergeQ=fetch(conn,cmd);
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');
Write.undoEdit(conn,editQ{i,1},0);
end
......
No preview for this file type
Markdown is supported
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