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

Merged in mask export method

parent c87e46e4
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,11 @@ def write_accessor_data_to_file(fpath: Path, accessor: GenericImageDataAccessor,
[0, 1, 2, 3]
)
if accessor.is_mask():
tifffile.imwrite(fpath, zcyx.astype('uint8'), imagej=True)
if accessor.dtype == 'bool':
data = (zcyx * 255).astype('uint8')
else:
data = zcyx.astype('uint8')
tifffile.imwrite(fpath, data, imagej=True)
else:
tifffile.imwrite(fpath, zcyx, imagej=True)
except:
......
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