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

Confirm patch datatype before autoscaling

parent cd51beaa
No related branches found
No related tags found
No related merge requests found
......@@ -179,7 +179,11 @@ def export_patches_from_zstack(
ext = 'tif' if make_3d else 'png'
fname = f'{prefix}-la{obj.label:04d}-zi{obj.zi:04d}.{ext}'
_write_patch_to_file(where, fname, resample_to_8bit(patch))
if patch.dtype is np.dtype('uint16'):
_write_patch_to_file(where, fname, resample_to_8bit(patch))
else:
_write_patch_to_file(where, fname, patch)
exported.append({
'df_index': idx,
......
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