Bioformat image name

Hi there,
I got a problem with bioformat image reader (v 6.2.1 i also tried with the last 6.4.0) used from java. I’m doing the following command in my code :

ImagePlus[] test =BF.openImagePlus("/home/titus/Bureau/AA_IMAGE_PB/test/raw/8A-CG-03_0_C0.tif");

i got the following error :

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1
	at loci.formats.in.ScreenReader.initFile(ScreenReader.java:325)
	at loci.formats.FormatReader.setId(FormatReader.java:1389)
	at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:499)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:142)
	at loci.plugins.BF.openImagePlus(BF.java:92)
	at loci.plugins.BF.openImagePlus(BF.java:77)
	at gred.nucleus.mains.test.main(test.java:20)

By random test i renamed the image from 8A-CG-03_0_C0.tif to 8A-CG-03_0.tif and it’s working … Is there any explanation for this C0 name bug ?

Best

Hi @Titus,

the exception is thrown by loci.formats.in.ScreenReader which has been fully removed from the core Bio-Formats since version 5.8.0. This class is not expected to be present in a standard ImageJ/Fiji environment.

Are you using Fiji and if so, what update sites are activated?

Hi ,
Thinks for the answer.
I can’t really figure out, i’m importing bioformat in IntelliJ with maven like that :

<dependency>
	<groupId>ome</groupId>
	<artifactId>bioformats_package</artifactId>
	<version>6.3.1</version>
</dependency>

Is it a wrong way ?

The declaration of the Bio-Formats as a Java dependency looks fine. I separately verified and ome:bioformats_package:5.3.1 does not bundle any loci.formats.in.ScreenReader class.

Is there a way to find how this class is pulled into your project in IntelliJ?

I solved the problem i was coming from the ImageJ version used in my parent dependencies i suppose.

Thanks again

1 Like