Bfconvert throwing an error for an *.vsi file

Sample image and/or macro code

  • Upload an original image file here directly or share via a link to a file-sharing site (such as Dropbox).
  • Share a minimal working example of your macro code.

(If this is your first post, you may not be able to attach images, in which case make a post with a link or a first post without the image attachment and a second one with)

Background

  • What is the image about? Provide some background and/or a description of the image. Try to avoid field-specific “jargon”.

Converting to bigtiff by running :

Blockquote
bfconvert -noflat -overwrite -bigtiff ID01_Wk7d3_1D_Section01.vsi ID01_Wk7d3_1D_Section01.ome.tif
Blockquote

throws the error:

Blockquote
Series 0: converted 1/1 planes (100%)
Exception in thread “main” loci.formats.FormatException: Buffer is too small; expected 560640 bytes, got 249318 bytes.
at loci.formats.FormatWriter.checkParams(FormatWriter.java:476)
at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:229)
at loci.formats.out.OMETiffWriter.saveBytes(OMETiffWriter.java:218)
at loci.formats.out.OMETiffWriter.saveBytes(OMETiffWriter.java:208)
at loci.formats.FormatWriter.saveBytes(FormatWriter.java:132)
at loci.formats.ImageWriter.saveBytes(ImageWriter.java:252)
at loci.formats.tools.ImageConverter.convertPlane(ImageConverter.java:801)
at loci.formats.tools.ImageConverter.testConvert(ImageConverter.java:719)
at loci.formats.tools.ImageConverter.main(ImageConverter.java:1096)
Blockquote

Analysis goals

  • What information are you interested in getting from this image?
    Getting an ome.tif file

Challenges

  • What stops you from proceeding?
    The exception thrown

  • What have you tried already?
    The command bfconvert as mentioned above

  • Have you found any related forum topics? If so, cross-link them.
    No

  • What software packages and/or plugins have you tried?

Blockquote
bfconvert -version
Version: 6.4.0
Build date: 11 March 2020
Blockquote

ID01_Wk7d3_1D_Section01.zip (314.3 KB)

Hi @serban,

welcome to the image.sc forum and thanks for your clear and detailed bug report. I was able to reproduce the issue successfully and tracked the origin of the bug which was introduced in Bio-Formats 6.4.0.

I have opened a Pull Request to address this regression and hope to have it released in an upcoming patch release of Bio-Formats. In the meantime, a workaround would be to use Bio-Formats 6.3.1 which should convert your sample file without issue.

Best,
Sebastien

Hi Sebastien,

I tested with 6.3.1 and it was working.
However, I tried it also with the latest 6.5.0 (released yesterday) and the error is still present there.

Thanks,

Serban

Hi Serban.

yes the fix has been opened too late for inclusion into the Bio-Formats 6.5.0 release so the error persistence is expected. The next Bio-Formats release, either 6.5.1 or 6.6.0, should fix the regression.

Best,
Sebastien