Commit d19b02da authored by Andrew Cohen's avatar Andrew Cohen

reframesegment -- don't undo splits where children have been id'ed by mitosis detectors.

everytime reframesegment runs, it looks for split outcomes where cellid==trackid. that can happen if the split is not tracked. that can also happen if the split was tracked, but then the mitosis detector picked that cell as a child. in that second case, if we undo the split that's bad. so don't.
parent 97b1e773
......@@ -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