Bio-Formats ICS writer bug?

Hello, @dgault @s.besson

I am trying in Fiji to save a 3D image to .ics with the Bio-Formats Exporter and am getting this error:

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_202 [64-bit]; Mac OS X 10.14.6; 156MB of 7422MB (2%)
	at loci.formats.out.ICSWriter.setId(
	at loci.formats.FormatWriter.changeOutputFile(
	at ij.plugin.filter.PlugInFilterRunner.processOneImage(
	at ij.plugin.filter.PlugInFilterRunner.<init>(
	at ij.IJ.runUserPlugIn(
	at ij.IJ.runPlugIn(
	at ij.Executer.runCommand(

It starts to do something, writing below file, but then it crashes with above error.

1 Like

@Christian_Tischer I can confirm your observation (on MacOS) when trying to save the Bat Cochlea Volume sample image via Bio-Formats Exporter.

Interestingly, this seems to try writing ICS version 2.0 now, whereas in the past I’ve been using it to save ICS 1.0 files.

I was also trying to save to ICS 1.0 format by providing a filename ending on .ids, but this produces the same error and writes a zero-byte .ids file in addition to the incomplete .ics file you reported.

As a workaround, you can use #scifio to write ics/ids files.

  • Via the menu: File > Export > Image…
  • In a script:
    #@ Dataset img
    #@ DatasetIOService io, "/path/to/image.ics")

Both methods worked fine in my tests just now.


Looking at the line in the source code where the NullPointerException occurs:

… this seems to be caused by missing spatial calibration metadata. And indeed, after setting some value for pixel width and height in Image > Properties…, saving the Bat Cochlea Volume sample image works just fine.

So another workaround (in addition to the above using SCIFIO) is to specify pixel calibration before saving :tada: :slightly_smiling_face:


Thank you for reporting the issue. I have opened a fix in which will hopefully be included in the patch release.

1 Like

See also: