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

Don't try to write PNG if > 3 channels

parent 91333047
No related branches found
No related tags found
No related merge requests found
......@@ -224,7 +224,7 @@ def export_patches_from_zstack(
def _export_patch(roi):
patch = patches_acc.iat_yxcz(i)
ext = 'tif' if make_3d else 'png'
ext = 'tif' if make_3d or patches_acc.chroma > 3 else 'png'
fname = f'{prefix}-la{roi.label:04d}-zi{roi.zi:04d}.{ext}'
if patch.dtype is np.dtype('uint16'):
......@@ -249,7 +249,7 @@ def export_multichannel_patches_from_zstack(
roiset,
rgb_overlay_channels: list = None,
rgb_overlay_weights: list = [1.0, 1.0, 1.0],
rgb_white_channel: int = None,
white_channel: int = None,
**kwargs
):
"""
......@@ -294,7 +294,7 @@ def export_multichannel_patches_from_zstack(
# mstack = InMemoryDataAccessor(mdata)
# rgb_roiset = RoiSet(roiset.acc_obj_ids, mstack, roiset.params)
# return export_patches_from_zstack(where, rgb_roiset, **kwargs)
kwargs['white_channel'] = rgb_white_channel
kwargs['white_channel'] = white_channel
kwargs['rgb_overlay_channels'] = rgb_overlay_channels
kwargs['rgb_overlay_weights'] = rgb_overlay_weights
return export_patches_from_zstack(where, roiset, **kwargs)
\ No newline at end of file
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