vitessce-python icon indicating copy to clipboard operation
vitessce-python copied to clipboard

ValueError: data too large for non-BigTIFF file

Open J-Yash opened this issue 2 years ago • 4 comments

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!

J-Yash avatar Jan 26 '24 20:01 J-Yash

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

keller-mark avatar Jan 26 '24 20:01 keller-mark

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!

J-Yash avatar Jan 26 '24 21:01 J-Yash

Another workaround for now would be to use the tifffile code within those functions directly https://github.com/vitessce/vitessce-python/blob/83b1411f170a96394e6e5e05f5970ca1c0e0dd0c/vitessce/data_utils/ome.py#L41 and manually add the bigtiff=True parameter

keller-mark avatar Jan 26 '24 21:01 keller-mark

Thanks @keller-mark. This works!

J-Yash avatar Jan 31 '24 15:01 J-Yash