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

Test on expanded, padded patches

parent 6fee8b22
No related branches found
No related tags found
2 merge requests!18Completed (de)serialization of RoiSet,!16Completed (de)serialization of RoiSet
......@@ -242,6 +242,8 @@ class TestRoiSetMultichannelProducts(BaseTestRoiSetMonoProducts, unittest.TestCa
output_path / 'multichannel' / 'mono_2d_patches',
white_channel=3,
draw_bounding_box=True,
expanded=True,
pad_to=256,
)
result = generate_file_accessor(files[0])
self.assertEqual(result.chroma, 1)
......@@ -252,6 +254,8 @@ class TestRoiSetMultichannelProducts(BaseTestRoiSetMonoProducts, unittest.TestCa
white_channel=3,
draw_bounding_box=True,
bounding_box_channel=1,
expanded=True,
pad_to=256,
)
result = generate_file_accessor(files[0])
self.assertEqual(result.chroma, 3)
......@@ -263,7 +267,9 @@ class TestRoiSetMultichannelProducts(BaseTestRoiSetMonoProducts, unittest.TestCa
rgb_overlay_channels=(3, None, None),
draw_mask=True,
mask_channel=0,
rgb_overlay_weights=(0.1, 1.0, 1.0)
rgb_overlay_weights=(0.1, 1.0, 1.0),
expanded=True,
pad_to=256,
)
result = generate_file_accessor(files[0])
self.assertEqual(result.chroma, 3)
......@@ -274,7 +280,9 @@ class TestRoiSetMultichannelProducts(BaseTestRoiSetMonoProducts, unittest.TestCa
rgb_overlay_channels=(3, None, None),
draw_contour=True,
contour_channel=1,
rgb_overlay_weights=(0.1, 1.0, 1.0)
rgb_overlay_weights=(0.1, 1.0, 1.0),
expanded=True,
pad_to=256,
)
result = generate_file_accessor(files[0])
self.assertEqual(result.chroma, 3)
......@@ -283,14 +291,19 @@ class TestRoiSetMultichannelProducts(BaseTestRoiSetMonoProducts, unittest.TestCa
def test_multichannel_to_multichannel_tif_patches(self):
files = self.roiset.export_patches(
output_path / 'multichannel' / 'multichannel_tif_patches',
expanded=True,
pad_to=256,
)
result = generate_file_accessor(files[0])
self.assertEqual(result.chroma, 5)
self.assertEqual(result.nz, 1)
def test_multichannel_annotated_zstack(self):
file = self.roiset.export_annotated_zstack(
output_path / 'multichannel' / 'annotated_zstack',
'test_multichannel_annotated_zstack',
expanded=True,
pad_to=256,
)
result = generate_file_accessor(file)
self.assertEqual(result.chroma, self.stack.chroma)
......@@ -300,6 +313,8 @@ class TestRoiSetMultichannelProducts(BaseTestRoiSetMonoProducts, unittest.TestCa
file = self.roiset.export_annotated_zstack(
output_path / 'annotated_zstack',
channel=3,
expanded=True,
pad_to=256,
)
result = generate_file_accessor(file)
self.assertEqual(result.hw, self.roiset.acc_raw.hw)
......
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