NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 555 - Axis mixup when opening *.lsm through imglib
Axis mixup when opening *.lsm through imglib
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Bio-Formats
unspecified
Macintosh Mac OS
: P5 enhancement
Assigned To: Johannes Schindelin
Depends on:
Blocks:
 
Reported: 2013-01-24 18:01 CST by Tobias Pietzsch
Modified: 2013-01-24 19:52 CST
2 users (show)

See Also:

Description Tobias Pietzsch 2013-01-24 18:01:21 CST
When opening an lsm file (attached) through imglib1 or imglib2, I get an XYT image, while opening the same file through the Bio-Formats Importer plugin I get a n XYZ as expected. I debugged into the imglib2 ImgOpener and it seems that the problem is not there but somewhere deeper in scifio (the IFormatReader.getSizeZ()
and getSizeT() etc return the wrong values).
Comment 1 Johannes Schindelin 2013-01-24 18:04:36 CST
Tobias, could you upload a small example file via ''Help>Upload Sample Image...'' for easier debugging? Thanks!
Comment 2 Johannes Schindelin 2013-01-24 18:42:34 CST
Thanks for uploading the sample file! A little debugging shows that this works correctly in Fiji:

-- snip --
import loci.formats.ChannelFiller;
import loci.formats.ChannelSeparator;
import loci.formats.ImageReader;
import loci.formats.services.OMEXMLServiceImpl;

r = new ImageReader();
r = new ChannelFiller(r);
r = new ChannelSeparator(r);

r.setMetadataStore( new OMEXMLServiceImpl().createOMEXMLMetadata() );

r.setId("/home/gene099/fiji/spim_TL71_Angle150.lsm");
print("z: " + r.getSizeZ() + ", t: " + r.getSizeT());
-- snap --

It prints:

z: 151, t: 1

However, Tobias reported in a private Chat that the corresponding Java class shows the opposite in Eclipse. So I think it might be an old Bio-Formats .jar in his class path. Continuing to investigate.
Comment 3 Johannes Schindelin 2013-01-24 19:52:10 CST
I pushed some commits to the 'tobi-test' branch of the minimal-ij1-plugin to illustrate the problem:

https://github.com/imagej/minimal-ij1-plugin/commits/tobi-test 

The problem is that without bio-formats-4.5-SNAPSHOT.jar in the classpath, SCIFIO has no option but to hand off to the TiffDelegateReader (which misinterprets .lsm metadata, no idea whether that is a problem of the .lsm format or a problem of the TiffDelegateReader or simply a shortcoming of the standard .tiff format).

With bio-formats-4.5-SNAPSHOT.jar in the classpath, the ZeissLSMReader is chosen instead, and that reader is able to interpret the metadata of the file correctly.

So the solution is top add the bio-formats .jar file to the classpath.