vitessce/vitessce-python

ValueError: data too large for non-BigTIFF file

Closed this issue · 4 comments

J-Yash commented

Hi,
I am trying to save a numpy array (RGB image of an H&E histology slide; dtype=uint8) as an ome.tif file using multiplex_img_to_ome_tiff(). The array is a little over 4 GB (based on the original image file). Does Vitessce not support ome.tif files over 4GB? How can I display files over that size? (Note: I tried downsampling the array by a factor of 2 and everything worked fine.)

Thanks!

Ah thanks for reporting this @J-Yash , we probably need to add a parameter to tell the tifffile library to use the BigTiff format

J-Yash commented

Got it @keller-mark. I didn't try it but assume rgb_img_to_ome_tiff() would have a similar issue. I'll work with downscaled images in the meantime!

Another workaround for now would be to use the tifffile code within those functions directly

tiff_writer = TiffWriter(output_path, ome=True)
and manually add the bigtiff=True parameter

J-Yash commented

Thanks @keller-mark. This works!