Login  Register

Filename problem leading to exception in latest Bioformat ?

Posted by lechristophe on Dec 17, 2010; 5:09am
URL: http://imagej.273.s1.nabble.com/Filename-problem-leading-to-exception-in-latest-Bioformat-tp3686158.html

Hi,

My macros that use the BioFormat macro extensions stopped working lately. I
finally got some time to try to narrow the problem and it was actually quite
puzzling. I finally isolated a minimal set of images and a test macro that
reproduce the problem. I'm using the latest (updated) Fiji with its current
BioFormats version, which is dev 4.2 rev 7334 (6 dec. 2010), under OSX
10.6.5 Java 1.6.0_22 (64bits).

The files necessary to reproduce the bug are available in this archive zip:
http://www.cleterrier.net/up/BioFormats_Filename.zip

Just run the Test.ijm macro, point it to the "Test Images" folder. It will
get the file name for the three images inside the folder and open it using
BioFormats through the macro extensions interface. It will progress through
the images but will throw an error message that I captured in Error.png (it
is a non-text window where you cannot copy and paste the text,
unfortunately).

Here is the text of the macro :

DIR_PATH=getDirectory("Select a directory");
ALL_NAMES=getFileList(DIR_PATH);
for (i=0; i<ALL_NAMES.length; i++) {
 run("Bio-Formats Macro Extensions");
FILE_PATH=DIR_PATH+ALL_NAMES[i];
 Ext.setId(FILE_PATH);
run("Bio-Formats Importer", "open=["+ FILE_PATH + "] " + "view=[Standard
ImageJ]" + " stack_order=Default split_channels ");
}


What I understand is that the three images are named 16.tif, 17.tif and
26.tif in the folder. For some reason BioFormats interprets that as a
logical serie of names and throws an error at the Ext.setId() instruction
because it expects for a fourth image called 27.tif that doesn't exist. In
fact the error appears for any combination of numbered images that have N,
N+1 and N+10 as indexes.

Is there something wrong in the code or some new option that I've missed and
that has to be taken care of when using Ext.setId() ? Thanks for your help
in solving this.

Christophe