OME / bio-formats / Metadata type error

Tags: #<Tag:0x00007fd542040f78>


Hello everybody,

I’m trying to get the timing metadata from an image by duplicating this example:

However, on my code, I get a type error in this line:

The method meta.getPixelsTimeIncrement returns a Double instead of a ome.units.quantity.Time object.

I suspect this is a version error, but I can’t find how I should solve this.
For the record the dependencies I used are:


If you have any idea for solving this, thank you!


Hi @NicoKiaru,

You are indeed correct that this is an issue with versioning. The simplest option would likely be to upgrade the Bio-Formats plugin to the latest revision (5.7.0) to keep up to date with the latest improvements.

Or alternatively if you do not wish to update you can use the same code sample from the dev-5_0 branch:

David Gault


Hi @NicoKiaru,

I suggest you don’t override the versions inherited from pom-scijava unless really necessary for your project. (Eclipse should even warn you about that, no?) The goal of the pom-scijava parent is to define a set of fully compatible components:


Ok thanks @imagejan and @dgault,

I’m still not fully understanding all of this, but I think the right thing to do was for me to remove dependencies, as @imagejan told me, and then simply add this one, without any version:


With that, everything’s compiling!

I still get a NullPointerException, but that’s another story…

Thanks again!