Skip to content
Snippets Groups Projects
Commit faae666d authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Removed success flag, which was non-informative and causing problems when no...

Removed success flag, which was non-informative and causing problems when no boxes were sent for export
parent cdc3ea35
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,6 @@ def export_patches_from_zstack(
ext = 'tif' if make_3d else 'png'
fname = f'{prefix}-la{obj.label:04d}-zi{obj.zi:04d}.{ext}'
success = _write_patch_to_file(where, fname, resample_to_8bit(patch))
_write_patch_to_file(where, fname, resample_to_8bit(patch))
exported.append(fname)
return success, exported
return exported
......@@ -67,13 +67,12 @@ class TestZStackDerivedDataProducts(unittest.TestCase):
filters={'area': (1e3, 1e4)},
expand_box_by=(64, 2)
)
success, files = export_patches_from_zstack(
files = export_patches_from_zstack(
output_path / '2d_patches',
self.stack.get_one_channel_data(channel=1),
meta,
draw_bounding_box=True,
)
self.assertTrue(success)
self.assertGreaterEqual(len(files), 1)
def test_make_3d_patches_from_zmask(self):
......@@ -81,11 +80,10 @@ class TestZStackDerivedDataProducts(unittest.TestCase):
filters={'area': (1e3, 1e4)},
expand_box_by=(64, 2),
)
success, files = export_patches_from_zstack(
files = export_patches_from_zstack(
output_path / '3d_patches',
self.stack.get_one_channel_data(channel=1),
meta,
make_3d=True)
self.assertTrue(success)
self.assertGreaterEqual(len(files), 1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment