Skip to content

Commit

Permalink
combineROIs.m: round coordinates to deal with ROIs that have non-inte…
Browse files Browse the repository at this point in the history
…ger coordinates
  • Loading branch information
julienbesle committed Oct 14, 2019
1 parent 2693102 commit 463f25f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mrLoadRet/ROI/combineROIs.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
elseif isempty(coords2)
newCoords = coords2;
else
newCoords = intersect(coords1,coords2,'rows');
newCoords = intersect(round(coords1),round(coords2),'rows');
end
case 'union'
if isempty(coords1)
Expand All @@ -89,15 +89,15 @@
elseif isempty(coords2)
newCoords = coords1;
else
newCoords = setxor(coords1,coords2,'rows');
newCoords = setxor(round(coords1),round(coords2),'rows');
end
case 'a not b'
if isempty(coords1)
newCoords = coords1;
elseif isempty(coords2)
newCoords = coords1;
else
newCoords = setdiff(coords1,coords2,'rows');
newCoords = setdiff(round(coords1),round(coords2),'rows');
end
otherwise
error('unknown action: %s',action);
Expand Down

0 comments on commit 463f25f

Please sign in to comment.