Login  Register

Use BioFormat in java

Posted by CARL Philippe (LBP) on Oct 17, 2017; 1:09pm
URL: http://imagej.273.s1.nabble.com/Use-BioFormat-in-java-tp5019558.html

Dear all,

I’m using the last version of ImageJ (1.51r) running under Java 1.6.0_24
(64-bit) and using the Bio-formats 5.1.10 (which seems to be the last
version running with java < 1.7).

With this configuration, I tried to write a java code that would retrieve
the X and Y calibration values and symbols from a stack of pictures.

Thus I started with something quite easy at the beginning, by trying to make
run the code found under the following link (which should actually be
formatted for the version 5.1.10 of the Bio-formats):

https://github.com/openmicroscopy/bioformats/blob/v5.1.10/components/bio-for
mats-plugins/utils/Simple_Read.java

But this code is already not compiling as soon as it finds either one of the
two Bio-formats imports, i.e.:

import loci.formats.FormatException;

or

import loci.plugins.BF;

For trying to solve this issue, I moved the "bioformats_package.jar" file
from the "plugins" into the "plugins/jars" folder, but this had no effect.

What am I doing wrong?

Also I have the impression that it is quite easy to use the bio-formats
within a macro code, but once moving to java there are way more issues which
are as well connected with the library version. Am I right with this?

I thank you very much in advance for your answers and help.

My best regards,

Philippe

 

Philippe CARL

Laboratoire de Biophotonique et Pharmacologie

UMR 7213 CNRS - Université de Strasbourg

Faculté de Pharmacie

74 route du Rhin

67401 ILLKIRCH

Tel : +33(0)3 68 85 41 84

 


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html