Bio-Formats can't open newer AM files (version 3.0)

Hi,
there is a problem with opening of new AM (AmiraMesh) files using bio-formats. The old files can be opened fine, but the new ones are not. Tested with Matlab-bioformats v6.6.1.
I believe the problem in slightly modified hearer of AM file, where tags with “&” character were added (for example “&Pixels_per_meter__X_”, “&Pixels_per_meter__Y_”, etc).

I am attaching an archive with a small 100x100 pixels dataset saved as

  • BF_Check.tif - the image in TIF format
  • BF_CheckMIB.am - the image in older AM format that can be opened using bio-formats
  • BF_CheckAmira.am - the image in the new AM format that can’t be open using bio-formats
    BF_check.zip (25.7 KB)

The reported error is:

Java exception occurred:
loci.formats.FormatException: Syntax Error:19:10: Invalid key

	at loci.formats.tools.AmiraParameters.syntaxError(AmiraParameters.java:152)

	at loci.formats.tools.AmiraParameters.readMap(AmiraParameters.java:383)

	at loci.formats.tools.AmiraParameters.readMap(AmiraParameters.java:387)

	at loci.formats.tools.AmiraParameters.readTopLevel(AmiraParameters.java:196)

	at loci.formats.tools.AmiraParameters.readFile(AmiraParameters.java:111)

	at loci.formats.tools.AmiraParameters.<init>(AmiraParameters.java:74)

	at loci.formats.in.AmiraReader.initFile(AmiraReader.java:142)

	at loci.formats.FormatReader.setId(FormatReader.java:1421)

	at loci.formats.ImageReader.setId(ImageReader.java:849)

	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)

	at loci.formats.ChannelFiller.setId(ChannelFiller.java:223)

	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)

	at loci.formats.ChannelSeparator.setId(ChannelSeparator.java:293)

	at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)

	at loci.formats.Memoizer.setId(Memoizer.java:690)

Thank you!

Thanks @Ilya_Belevich for investigating the issue and providing sample files. I was able to reproduce the exception with the sample files and put in place a fix to add support for the new key types. I have opened a PR which should hopefully resolve the issue Amira: Support for Amira 3.0 keys by dgault · Pull Request #3675 · ome/bioformats · GitHub

1 Like