@@ -1502,7 +1502,6 @@ def remove_stroke(self, delete_points=True, stroke_ind=-1):
1502
1502
stroke = np .array (self .strokes [stroke_ind ])
1503
1503
cZ = self .currentZ
1504
1504
inZ = stroke [0 , 0 ] == cZ
1505
- print (inZ .sum ())
1506
1505
if inZ :
1507
1506
outpix = self .outpix [cZ , stroke [:, 1 ], stroke [:, 2 ]] > 0
1508
1507
self .layerz [stroke [~ outpix , 1 ], stroke [~ outpix , 2 ]] = np .array ([0 , 0 , 0 , 0 ])
@@ -1688,7 +1687,6 @@ def add_set(self):
1688
1687
color = self .colormap [self .ncells , :3 ]
1689
1688
median = self .add_mask (points = self .current_point_set , color = color )
1690
1689
if median is not None :
1691
- print (median )
1692
1690
self .removed_cell = []
1693
1691
self .toggle_mask_ops ()
1694
1692
self .cellcolors = np .append (self .cellcolors , color [np .newaxis , :],
@@ -1728,7 +1726,6 @@ def add_mask(self, points=None, color=(100, 200, 50), dense=True):
1728
1726
ar , ac = ar + vr .min () - 2 , ac + vc .min () - 2
1729
1727
# get dense outline
1730
1728
contours = cv2 .findContours (mask , cv2 .RETR_EXTERNAL , cv2 .CHAIN_APPROX_NONE )
1731
- print (contours [- 2 ][0 ].shape )
1732
1729
pvc , pvr = contours [- 2 ][0 ][:,0 ].T
1733
1730
vr , vc = pvr + vr .min () - 2 , pvc + vc .min () - 2
1734
1731
# concatenate all points
@@ -1745,15 +1742,13 @@ def add_mask(self, points=None, color=(100, 200, 50), dense=True):
1745
1742
mask [ar - vr .min () + 2 , ac - vc .min () + 2 ] = 1
1746
1743
contours = cv2 .findContours (mask , cv2 .RETR_EXTERNAL ,
1747
1744
cv2 .CHAIN_APPROX_NONE )
1748
- print (contours [- 2 ][0 ].shape )
1749
1745
pvc , pvr = contours [- 2 ][0 ][:,0 ].T
1750
1746
vr , vc = pvr + vr .min () - 2 , pvc + vc .min () - 2
1751
1747
ars = np .concatenate ((ars , ar ), axis = 0 )
1752
1748
acs = np .concatenate ((acs , ac ), axis = 0 )
1753
1749
vrs = np .concatenate ((vrs , vr ), axis = 0 )
1754
1750
vcs = np .concatenate ((vcs , vc ), axis = 0 )
1755
- print ("HI" , ars , acs )
1756
-
1751
+
1757
1752
self .draw_mask (z , ars , acs , vrs , vcs , color )
1758
1753
median .append (np .array ([np .median (ars ), np .median (acs )]))
1759
1754
0 commit comments