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

record entry returned by object class map export is no longer a dictionary of...

record entry returned by object class map export is no longer a dictionary of paths, but rather one path for object map
parent e694b90e
No related branches found
No related tags found
1 merge request!2Changed formatting of object classification path results
......@@ -506,11 +506,11 @@ class RoiSet(object):
if k == 'annotated_zstacks':
self.export_annotated_zstack(subdir, prefix=pr, **kp)
if k == 'object_classes':
record[k] = {}
# record[k] = {}
for kc, acc in self.object_class_maps.items():
fp = subdir / kc / (pr + '.tif')
write_accessor_data_to_file(fp, acc)
record[k][kc] = fp.__str__()
record[f'{k}_{kc}'] = fp.__str__()
if k == 'dataframe':
dfpa = subdir / (pr + '.csv')
dfpa.parent.mkdir(parents=True, exist_ok=True)
......
......@@ -148,9 +148,9 @@ class TestRoiSetMonoProducts(BaseTestRoiSetMonoProducts, unittest.TestCase):
'obmap',
RoiSetExportParams(object_classes=True)
)
opa = record['object_classes']['dummy_class']
acc = generate_file_accessor(opa)
opa = record['object_classes_dummy_class']
self.assertTrue(Path(opa).exists())
acc = generate_file_accessor(opa)
self.assertTrue(all(np.unique(acc.data) == [0, 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