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

loci.formats.FormatException while converting series to tiff format #4216

Open de9821 opened 3 months ago

de9821 commented 3 months ago

my current version bftools is below

Version: 7.3.1 Build date: 11 July 2024 VCS revision: 41e12f630ad7349caa0293cba23948c17d22732b

I am getting below error while converting vsi file series into tiff

../bftools/bfconvert -no-upgrade -bigtiff -series 1 -pyramid-scale 1 -noflat ./DATA_022/DATA_022.vsi ./DATA_022_1.tiff ./DATA_022/DATA_022.vsi CellSensReader initializing ./DATA_022/DATA_022.vsi [CellSens VSI] -> ./DATA_022_1.tiff [Tagged Image File Format] Tile size = 512 x 512 Converted 1/1 planes (100%) Tile size = 512 x 512 Exception in thread "main" loci.formats.FormatException: (w:512 + x:3584) must be <= 4034 at loci.formats.FormatWriter.checkParams(FormatWriter.java:469) at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:223) at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:469) at loci.formats.ImageWriter.saveBytes(ImageWriter.java:260) at loci.formats.tools.ImageConverter.convertTilePlane(ImageConverter.java:1076) at loci.formats.tools.ImageConverter.convertPlane(ImageConverter.java:908) at loci.formats.tools.ImageConverter.testConvert(ImageConverter.java:841) at loci.formats.tools.ImageConverter.main(ImageConverter.java:1318)

Series description is below

Image count = 1 RGB = true (3) Interleaved = true Indexed = false (false color) Width = 4034 Height = 4710 SizeZ = 1 SizeT = 1 SizeC = 3 (effectively 1) Tile size = 512 x 512 Thumbnail size = 109 x 128 Endianness = motorola (big) Dimension order = XYCZT (uncertain) Pixel type = uint8 Valid bits per pixel = 8 Metadata complete = true Thumbnail series = false

Plane #0 <=> Z 0, C 0, T 0

I referred documentation and tried various options but still getting error.

Also tried older version of 6.3.1 as it was suggested in old discussion in forum but no luck.

please suggest if you faced similar issue and have any solution

dgault commented 3 months ago

Hi @de9821, thank you for reporting the issue. If you leave out the -pyramid-scale 1 option, do you still see the same error?

de9821 commented 3 months ago

Hi @dgault thanks for the response.

I see similar error with out -pyramid-scale 1 option.

../bftools/bfconvert -no-upgrade -bigtiff -series 1 -noflat ./DATA_022/DATA_022.vsi ./DATA_022_1.tiff ./DATA_022/DATA_022.vsi CellSensReader initializing ./DATA_022/DATA_022.vsi [CellSens VSI] -> ./DATA_022_1.tiff [Tagged Image File Format] Tile size = 512 x 512 Converted 1/1 planes (100%) Tile size = 512 x 512 Exception in thread "main" loci.formats.FormatException: (w:512 + x:3584) must be <= 4034 at loci.formats.FormatWriter.checkParams(FormatWriter.java:469) at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:223) at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:469) at loci.formats.ImageWriter.saveBytes(ImageWriter.java:260) at loci.formats.tools.ImageConverter.convertTilePlane(ImageConverter.java:1076) at loci.formats.tools.ImageConverter.convertPlane(ImageConverter.java:908) at loci.formats.tools.ImageConverter.testConvert(ImageConverter.java:841) at loci.formats.tools.ImageConverter.main(ImageConverter.java:1318)

dgault commented 3 months ago

Thanks @de9821 for confirming. Would you be able to share a sample file showing the error that we can test? If you need a suitable upload location then you can upload files to the Bio-Formats Zenodo community.