ome / bioformats

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
376 stars 242 forks source link

Exposing original image tile bytes #3440

Open ebremer opened 4 years ago

ebremer commented 4 years ago

I've been converting a copius number of VSI images to bigtiff as our toolings won't work with VSI. I know bioformats insists on decoding and re-encoding image tiles when converting but since no loss of quality is of paramount importance, we use LZW compression which has the undesired affect of ballooning the image to almost 10x it's size. I was going to use JPG as a comparison to see if the image quality changed dramatically which spawned https://github.com/ome/bioformats/issues/3370. I tried an experiment and modified CellSenseReader.java to expose the original tile bytes. I was able to retrieve the VSI tiles and route them into a file tile.jpg. If the tile size is kept the same, it doesn't seem that there is any reason why the decoding/re-encoding process needs to occur making for a faster conversion from VSI->TIFF and possible other image formats. (unless I am missing something)

So here is the big ask, would it be difficult to augment the general Bioformats API to expose the original tile bytes and then just route them pass the decode/encode process of image conversion providing the tile size is not changed into the new tile "framing", tiff in this case?

melissalinkert commented 1 year ago

3992 is some initial work on this topic (though not implemented for VSI at the moment).

ebremer commented 6 months ago

Which readers does -precompressed work with?

melissalinkert commented 5 months ago

Which readers does -precompressed work with?

Only SVS at the moment. The API is in place for other readers to extend, but we have not yet expanded this feature to additional readers.

ebremer commented 4 months ago

Any timeline for when other formats will be supported for precompressed to work with?

imagesc-bot commented 2 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/vsi-to-dcm-file-conversion/98249/7