diff --git a/extensions/chaeo/products.py b/extensions/chaeo/products.py index 1e10205c0d93231a904f199bb4977c32bdb51188..88d8f3fa21c817170257e17286c059efead28068 100644 --- a/extensions/chaeo/products.py +++ b/extensions/chaeo/products.py @@ -56,7 +56,6 @@ def export_patches_from_zstack( assert len(patch.shape) == 4 assert patch.shape[2] == stack.chroma - # assert patch.shape[3] == 1 # should not get to zstacks by this point if rescale_clip is not None: patch = rescale(patch, rescale_clip) @@ -68,10 +67,6 @@ def export_patches_from_zstack( y1 = rbb['y1'] for zi in range(0, patch.shape[3]): - # pilimg = Image.fromarray(patch[:, :, 0, zi]) # drawing modifies array in-place - # draw = ImageDraw.Draw(pilimg) - # draw.rectangle([(x0, y0), (x1, y1)], outline='white', width=kwargs.get('linewidth', 1)) - # patch[:, :, 0, zi] = np.array(pilimg) patch[:, :, 0, zi] = draw_box_on_patch( patch[:, :, 0, zi], ((x0, y0), (x1, y1)), diff --git a/extensions/chaeo/tests/test_zstack.py b/extensions/chaeo/tests/test_zstack.py index fcbbb3e1fa6dc4502e9326f39d8ff13bc6a2a1b8..8ea85d796ade56ee2f3dc3905055cc2496c3705c 100644 --- a/extensions/chaeo/tests/test_zstack.py +++ b/extensions/chaeo/tests/test_zstack.py @@ -26,13 +26,12 @@ class TestZStackDerivedDataProducts(unittest.TestCase): self.obmap = InMemoryDataAccessor(self.pxmap.data > pipeline_params['threshold']) # write_accessor_data_to_file(output_path / 'obmap.tif', self.obmap) - def test_zmask_makes_correct_boxes(self, mask_type='boxes', filters=None, expand_box_by=None): + def test_zmask_makes_correct_boxes(self, mask_type='boxes', **kwargs): zmask, meta = build_zmask_from_object_mask( self.obmap.get_one_channel_data(0), self.stack.get_one_channel_data(0), mask_type=mask_type, - filters=filters, - expand_box_by=expand_box_by, + **kwargs, ) zmask_acc = InMemoryDataAccessor(zmask) self.assertTrue(zmask_acc.is_mask())