Czi files not opening with the bioformats importer

Hi,
I am getting this error message.
can anybody help

(Fiji Is Just) ImageJ 2.0.0-rc-15/1.49k; Java 1.6.0_65 [64-bit]; Mac OS X 10.10; 39MB of 9983MB (<1%)
 
java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Integer.java:417)
	at java.lang.Integer.parseInt(Integer.java:499)
	at loci.formats.in.ZeissCZIReader.translateExperiment(ZeissCZIReader.java:2144)
	at loci.formats.in.ZeissCZIReader.translateMetadata(ZeissCZIReader.java:1207)
	at loci.formats.in.ZeissCZIReader.initFile(ZeissCZIReader.java:689)
	at loci.formats.FormatReader.setId(FormatReader.java:1317)
	at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:494)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:144)
	at loci.plugins.in.Importer.showDialogs(Importer.java:141)
	at loci.plugins.in.Importer.run(Importer.java:79)
	at loci.plugins.LociImporter.run(LociImporter.java:81)
	at ij.IJ.runUserPlugIn(IJ.java:202)
	at ij.IJ.runPlugIn(IJ.java:166)
	at ij.IJ.runPlugIn(IJ.java:155)
	at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:421)
	at HandleExtraFileTypes.run(HandleExtraFileTypes.java:57)
	at ij.IJ.runUserPlugIn(IJ.java:202)
	at ij.IJ.runPlugIn(IJ.java:166)
	at ij.IJ.runPlugIn(IJ.java:155)
	at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:460)
	at ij.io.Opener.openImage(Opener.java:315)
	at ij.io.Opener.openImage(Opener.java:338)
	at ij.io.Opener.open(Opener.java:145)
	at ij.io.Opener.openAndAddToRecent(Opener.java:248)
	at ij.plugin.DragAndDrop.openFile(DragAndDrop.java:176)
	at ij.plugin.DragAndDrop.run(DragAndDrop.java:152)
	at java.lang.Thread.run(Thread.java:695)

Hi @embbmc,

thanks for the bug report. We have fixed a couple of similar issues over the last few months as part of recent Bio-Formats releases. Could you let us know which Bio-Formats version is running on your Fiji distribution (Help > About Plugins > Bio-Formats Plugins...)?

If this is not the latest (currently 5.5.1), could you try upgrading and see if that fixes the issue? Otherwise, you can send us a sample file at http://qa.openmicroscopy.org.uk/qa/upload/

Best,
Sebastien

2 Likes

Hi,
I got the same error using BF.openImagePlus command in my code (and depending the czi I am opening …).
I checked the maven version and there is no version under 5.0.0 here https://mvnrepository.com/artifact/loci/loci_plugins , did i miss something ? Is there some where i can find it in maven server ?

Best,

Tristan

@Titus the current stable version of Bio-Formats is 6.2.1.

  • if you are using Fiji, you can install it using the Java8 update site
  • if you are using ImageJ, you can download the bioformats_package bundle from the OME downloads page
  • if you are building from source, you should be able to retrieve the JARs from the OME Artifactory

Best,
Sebastien

1 Like

Thank you i found the maven link here https://mvnrepository.com/artifact/ome/bioformats_package/6.2.1 .
I still got the following errors :

Exception in thread "main" java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Integer.java:542)
	at java.lang.Integer.parseInt(Integer.java:615)
	at loci.formats.in.ZeissCZIReader.translateExperiment(ZeissCZIReader.java:2151)
	at loci.formats.in.ZeissCZIReader.translateMetadata(ZeissCZIReader.java:1214)
	at loci.formats.in.ZeissCZIReader.initFile(ZeissCZIReader.java:699)
	at loci.formats.FormatReader.setId(FormatReader.java:1315)
	at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:494)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:144)
	at loci.plugins.BF.openImagePlus(BF.java:95)
	at loci.plugins.BF.openImagePlus(BF.java:80)

But i’m not sure that problem is not coming from the image because calibration parameters are with 1 .

Best,
Tristan

Thanks,

surprisingly the error reported by the stack trace does not seem to match the reader. Can you confirm the version of the library used by your script either via the UI (Help > About Plugins) or programmatically using the BF.getVersionNumber(version) API?

Sebastien

Thanks for your help ,

So surprisingly i checked the version in my code and i m surprise to find this information :

And in my maven file it write :

<dependency>
	<groupId>ome</groupId>
	<artifactId>bioformats_package</artifactId>
	<version>6.2.1</version>
	<type>pom</type>
</dependency>

And if i remove this dependancy in the xml file it doesn’t work because the librairy is not found. Any idea ?

Best ,

Tristan

Hi Tristan, if you run mvn clean (in IntelliJ View > Tools Windows > Maven Projects and then find clean under Lifecycle) first do you still see the old version?

Hi David ,
I tried but i still got the same jar in version 5.0.2 for BF…
Very strange think because when i check folder it seems i got it :

Capture%20d%E2%80%99%C3%A9cran%20de%202019-10-12%2010-27-47

I checked the bioformats_folder/6.2.1 folder and compare to the bio-formats_plugins/5.0.2 folder i don’t have jar. Not sure to really understand what’s happen …

best ,

Tristan

Is there a dependency for bioformats_plugins in your pom file as well or is it just bioformats_package? (Using package alone is fine as it should contain everything, removing the older plugins version from your local repo should resolve the conflict).

No i don’t have bioformats_plugins dependency in my pom file only bioformat_plugin.
So do you mean removing the ~/.m2/repository/ome/bio-formats_plugins/5.0.2/ directory ?
Because i already tried and if do that IntelliJ is not abble to find the BF class. And if i actualyse (Reimport my pom ) the ~/.m2/repository/ome/bio-formats_plugins/5.0.2/ is download again i find the BF class from the ~/.m2/repository/ome/bio-formats_plugins/5.0.2/bio-formats_plugins-5.0.2.jar :

And the most stange thinks as i said upper is, if i remove the dependency in the pom :

<dependency>
	<groupId>ome</groupId>
	<artifactId>bioformats_package</artifactId>
	<version>6.2.1</version>
	<type>pom</type>
</dependency>

bioformats_plugins is not downloaded so the BF class is not found again … Did i missed something else ?
Best

Do you have a link to the pom file that I can see somewhere?
If you add in the below does the correct version get picked up:

<dependency>
    <groupId>ome</groupId>
    <artifactId>bio-formats_plugins</artifactId>
    <version>6.2.1</version>
</dependency>

Hi David ,

I solved the problem … In fact I juste removed :

<type>pom</type>

from

<dependency>
	<groupId>ome</groupId>
	<artifactId>bioformats_package</artifactId>
	<version>6.2.1</version>
	<type>pom</type>
</dependency>

it’s working now, really sorry for that “stupid” question …

Best

so it’s not reccomended to have also LOCI and Bioformats update sites checked?
thanks,
Emanuele

The Java-8 update site should be used for Bio-Formats release updates and has been used from v5.2.0 onwards.

just a question
so Loci and bioformats update sites what are used for?

The https://sites.imagej.net/Bio-Formats/ update site has been used in the past and is still used for testing non release builds. The official releases should always be from the Java-8 site.

1 Like