Skip to content

Commit 999a9d2

Browse files
committed
Fixes the previous fix after more thorough testing.
1 parent 537a2ce commit 999a9d2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

MATLAB/+smi_cluster/@ClusterInterface/combineBaGoLROIs.m

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,14 @@ function combineBaGoLROIs(pathnameR, filesR, pathnameB, filesB, MAPNfile, ...
160160
% end
161161
% If the original SR ROIs were chosen via GaussIm and then run
162162
% individually through BaGoL, ymin and ymax are flipped about the
163-
% center of the image, so need to be corrected. This problem
164-
% really should be fixed when the BaGoL ROI is defined, but for now
165-
% ...
166-
if GaussIm && (ymin > min(Ynm) || ymax < max(Ynm))
167-
ymin = XYsize(2) - ymax;
168-
ymax = XYsize(2) - ymin;
163+
% center of the image, so need to be corrected.
164+
if GaussIm %&& (ymin > min(Ynm) || ymax < max(Ynm))
165+
ymin_old = ymin;
166+
ymax_old = ymax;
167+
ymin = XYsize(2) - ymax_old;
168+
ymax = XYsize(2) - ymin_old;
169+
ROI(3:4) = [ymin, ymax];
170+
RoI{i}.ROI(3:4) = ROI(3:4);
169171
end
170172
l = xmin <= Xnm & Xnm <= xmax & ymin <= Ynm & Ynm <= ymax;
171173
fprintf('Cell %d ROI %d Label %d: %d points\n', c, i, j, sum(l));

0 commit comments

Comments
 (0)