From 5fb74fde155c35dafcd096fd66118b3cfdd174a0 Mon Sep 17 00:00:00 2001 From: Carsen Stringer Date: Sun, 24 Sep 2023 07:58:42 -0400 Subject: [PATCH] bug in 3D interpolation with multi-roi masks --- cellpose/gui/gui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cellpose/gui/gui.py b/cellpose/gui/gui.py index 4ddfdbeb..71694e9a 100644 --- a/cellpose/gui/gui.py +++ b/cellpose/gui/gui.py @@ -1672,7 +1672,7 @@ def add_mask(self, points=None, color=(100,200,50), dense=True): self.draw_mask(z, ars, acs, vrs, vcs, color) median.append(np.array([np.median(ars), np.median(acs)])) - mall[z-zmin, ar, ac] = True + mall[z-zmin, ars, acs] = True pix = np.append(pix, np.vstack((ars, acs)), axis=-1) mall = mall[:, pix[0].min():pix[0].max()+1, pix[1].min():pix[1].max()+1].astype(np.float32) @@ -1694,6 +1694,7 @@ def add_mask(self, points=None, color=(100,200,50), dense=True): vr, vc = vr+ymin, vc+xmin ar, ac = ar+ymin, ac+xmin self.draw_mask(z+zmin, ar, ac, vr, vc, color) + self.zdraw.append(zdraw) if self.NZ==1: d = datetime.datetime.now()