Skip to content

Commit

Permalink
bug in 3D interpolation with multi-roi masks
Browse files Browse the repository at this point in the history
  • Loading branch information
carsen-stringer committed Sep 24, 2023
1 parent 8242b3e commit 5fb74fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cellpose/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit 5fb74fd

Please sign in to comment.