Exception thrown when importing Micro Manager dataset with Bioformats

Hi All,

I’m having an issue importing some Micro manager datasets with Bio Formats. If I select Plugins > Bio-formats > Bio-formats importer and select an OME TIFF file, the image opens without any issue. However, if I direct bioformats to the metadata.txt file (which, as I understand it, is the recommended approach), the following exception is thrown:

(Fiji Is Just) ImageJ 2.0.0-rc-65/1.52b; Java 1.8.0_151 [64-bit]; Windows 10 10.0; 441MB of 98162MB (<1%)

java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:592)
at java.lang.Integer.parseInt(Integer.java:615)
at loci.formats.in.MicromanagerReader.parsePosition(MicromanagerReader.java:757)
at loci.formats.in.MicromanagerReader.parsePosition(MicromanagerReader.java:433)
at loci.formats.in.MicromanagerReader.initFile(MicromanagerReader.java:297)
at loci.formats.FormatReader.setId(FormatReader.java:1397)
at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:499)
at loci.plugins.in.ImportProcess.execute(ImportProcess.java:142)
at loci.plugins.in.Importer.showDialogs(Importer.java:140)
at loci.plugins.in.Importer.run(Importer.java:76)
at loci.plugins.LociImporter.run(LociImporter.java:78)
at ij.IJ.runUserPlugIn(IJ.java:222)
at ij.IJ.runPlugIn(IJ.java:186)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

Some of my colleagues have reported seeings this exception regardless of whether they point bioformats to the OME TIFF file or the metadata file. Through a little investigation, I have found that the problem seems to be related to the “UserData” property in the metadata file - deleting this resolves the problem, which leads me to believe that it is not correctly formatted:

“UserData”: {
“IJType”: {
“PropVal”: “1”,
“PropType”: “String”
},
“GridRow”: {
“PropVal”: “0”,
“PropType”: “String”
},
“Comment”: {
“PropVal”: “”,
“PropType”: “String”
},
“UUID”: {
“PropVal”: “b8ff797d-4ca2-4770-bf46-17057f11bad7”,
“PropType”: “String”
},
“Height”: {
“PropVal”: “2048”,
“PropType”: “String”
},
“GridColumn”: {
“PropVal”: “0”,
“PropType”: “String”
},
“CameraTimeout”: {
“PropVal”: “20000”,
“PropType”: “String”
},
“Depth”: {
“PropVal”: “2”,
“PropType”: “String”
},
“BitDepth”: {
“PropVal”: “16”,
“PropType”: “String”
},
“KeepShutterOpenChannels”: {
“PropVal”: “false”,
“PropType”: “String”
},
“PixelType”: {
“PropVal”: “GRAY16”,
“PropType”: “String”
},
“Source”: {
“PropVal”: “Micro-Manager”,
“PropType”: “String”
},
“TimeFirst”: {
“PropVal”: “false”,
“PropType”: “String”
},
“ChColors”: {
“PropVal”: “[-1,-13382401,-65536,-16711834]”,
“PropType”: “String”
},
“SlicesFirst”: {
“PropVal”: “false”,
“PropType”: “String”
},
“Width”: {
“PropVal”: “2048”,
“PropType”: “String”
},
“Positions”: {
“PropVal”: “27”,
“PropType”: “String”
},
“ROI”: {
“PropVal”: “[0,0,2048,2048]”,
“PropType”: “String”
}
}

If anyone could shed any light on why micro manager appears to be generating incorrectly formatted metadata files, it would be much appreciated.

Dave.