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
370 stars 241 forks source link

bfconvert: issue after changing tile size in ome.tiff #4176

Open alexeykurbako opened 2 months ago

alexeykurbako commented 2 months ago

Hey everyone. I'm trying to change tile size of OME-TIFF image using bfconvert using following command: ./bftools3/bfconvert -bigtiff -tilex 4096 -tiley 4096 -option BF_MAX_MEM 64g in.ome.tiff out.ome.tiff After successful command execution I open out.ome.tiff into AVIVATOR(https://avivator.gehlenborglab.org/?image_url=https://viv-demo.storage.googleapis.com/LuCa-7color_Scan1/) and see black screen(original file opens without issues) I unsuccessfully tried different tile sizes (from 256 to 8192) and adding -compression LZW I guess something is wrong with metadata because after extracting OME-XML from both files I found out that MapAnnotation in out.ome.tiff file is missing. Do you have any ideas why this issue occurs and how I can solve it or what tool I can use as alternative for changing tile size of ome.tiff image

Bfconvert version: 7.2.0 Mac OS: 13.6.1

melissalinkert commented 2 months ago

@alexeykurbako : if the original OME-TIFF had a pyramid of resolutions, you will need to include the -noflat option in the bfconvert command in order to preserve the pyramid structure. Could you please try with that option and let us know if that helps? See https://bio-formats.readthedocs.io/en/stable/users/comlinetools/conversion.html#cmdoption-bfconvert-noflat for additional documentation.

Also note that -option BF_MAX_MEM 64g is likely not doing what you expect. If you want to allow bfconvert to use up to 64GB of memory, then BF_MAX_MEM=64g bfconvert ... is the correct syntax.