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 789 - lsm files do not open
lsm files do not open
Status: CLOSED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Linux
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2014-06-16 06:29 CDT by Benoit Aigouy
Modified: 2014-06-19 02:19 CDT
2 users (show)

See Also:


Attachments
LUT not read properly (2.59 MB, application/zip)
2014-06-16 10:53 CDT, Benoit Aigouy
SCIFIO patch (914.93 KB, application/java-archive)
2014-06-17 07:52 CDT, Mark Hiner

Description Benoit Aigouy 2014-06-16 06:29:22 CDT
Hi everyone,

after my last update I can't open LSM files anymore (did not try other files). here is the log that pops up when I run File>open
(Fiji Is Just) ImageJ 2.0.0-rc-5/1.49b; Java 1.6.0_24 [64-bit]; Linux 3.13.0-29-generic; 28MB of 10155MB (<1%)
 
java.lang.NullPointerException
	at io.scif.filters.ChannelFillerMetadata.populateImageMetadata(ChannelFillerMetadata.java:118)
	at io.scif.filters.AbstractMetadataWrapper.wrap(AbstractMetadataWrapper.java:89)
	at io.scif.filters.AbstractReaderFilter.setParent(AbstractReaderFilter.java:155)
	at io.scif.filters.MasterFilterHelper.updateParents(MasterFilterHelper.java:190)
	at io.scif.filters.MasterFilterHelper.enable(MasterFilterHelper.java:130)
	at io.scif.filters.ReaderFilter.enable(ReaderFilter.java:66)
	at io.scif.img.ImgOpener.createReader(ImgOpener.java:543)
	at io.scif.img.ImgOpener.openImgs(ImgOpener.java:144)
	at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:257)
	at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:241)
	at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:78)
	at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50)
	at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:135)
	at net.imagej.legacy.DefaultLegacyHooks.interceptFileOpen(DefaultLegacyHooks.java:434)
	at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:156)
	at ij.IJ.runPlugIn(IJ.java)
	at ij.Executer.runCommand(Executer.java:131)
	at ij.Executer.run(Executer.java:64)
	at java.lang.Thread.run(Thread.java:662)

best,

benoit

Information about your version of Java:

  os.arch => amd64
  os.name => Linux
  os.version => 3.13.0-29-generic
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.X11GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => gnome
  file.separator => /

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: /home/benoit/Fiji.app/java/linux-amd64/jdk1.6.0_24//jre
  imagej.dir => /home/benoit/Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20140615004004)
Fiji: http://fiji.sc/update/ (last check:20140612230314)
IBMP-CNRS: http://www-ibmp.u-strasbg.fr/fijiupdates/ (last check:20140526164644)
ScientiFig: http://sites.imagej.net/Aigouy/ (last check:20140516135525)

Files not up-to-date:
  a5d02cb7 (LOCAL_ONLY) 20131005162326 plugins/Kymo_graph1001.jar
  740a32b3 (LOCAL_ONLY) 20140109112924 plugins/SplittedChannelsMerger_.class
  d31ed141 (LOCAL_ONLY) 20131016094131 plugins/Stack_Focuser_.class
  5f60d96e (LOCAL_ONLY) 20140306085844 plugins/Watershed_.jar
Comment 1 Mark Hiner 2014-06-16 07:23:57 CDT
Hi Benoit,

 This was an issue with assuming indexed color images always would have luts available. Looks like this is incorrect and there are false color images with no attached lookup table.

 Fixed in https://github.com/scifio/scifio/commit/2bf5781c2a96c0b5d837a80fa115e6ded0895d90 and should be uploaded to Fiji today.
Comment 2 Benoit Aigouy 2014-06-16 07:26:44 CDT
thanks for your quick answer and happy that you solved the problem.

best,

benoit
Comment 3 Mark Hiner 2014-06-16 08:31:01 CDT
This fix is now uploaded to Fiji. If you still have issues after updating your Fiji, please let us know!

Thanks for the report Benoit!
Comment 4 Benoit Aigouy 2014-06-16 08:57:23 CDT
it works partially, I mean I can now open the lsm file but the LUT is lost (maybe your non null LUT asumption was correct and the problem is rather that a bug occurs when you try to read Lut from the file). I also noticed and I don't know whether the two bugs are related or not, that when I open a composite RGB image, (that has green as first channel, red as second channel and blue as last channel) the LUTs are not read properly in IJ2, meaning the first channel is always red, the second is always green and the last is blue (as if again it would not read LuTs properly). Could it be that you just have a general pb with the LUTs ?

best,

benoit
Comment 5 Mark Hiner 2014-06-16 09:21:48 CDT
Hi Benoit,

 Would you mind opening another issue and using Help > Upload Sample Image to upload the GRB dataset? I need to look at it to see exactly how the LUT is being used.

 But this does seem like two separate issues - one with lut interpretation and one with reading. You could definitely be right that the lut on your LSM is not being read properly (or not propagated through the framework) leading to the null value. Could you use Help > Upload Sample Image for the LSM dataset that generated the initial NullPointerException on this issue?

 I had a test LSM lying around that generated the same error.. but it's false color, and Bio-Formats truly has no LUT for it, so I'd like to work with your data if possible.

 Anyway I think our LUT code needs some love at all layers, so thank you for providing the motivation to make it better.
- Mark
Comment 6 Benoit Aigouy 2014-06-16 09:39:56 CDT
Dear Mark,

I have uploaded a tila_000.lsm file that should reproduce the null bug. i have uploaded testGRB.tif file that you can use to test the RGB error and opened a new bug report for it let me know if there was a problem with the upload.

best,

B
Comment 7 Mark Hiner 2014-06-16 09:45:45 CDT
Hi Benoit,

Got the testGRB.tif but not the tila_000.lsm. Feel free to just attach it to this bug report if it's OK being public (Upload Sample Images puts it in a private location).

Thanks for opening #794.

- Mark
Comment 8 Benoit Aigouy 2014-06-16 10:53:20 CDT
Created attachment 162
LUT not read properly
Comment 9 Mark Hiner 2014-06-16 10:59:28 CDT
I don't know if this is the same thing that's happening with your data Benoit, but with my smaple dataset it seems there are some issues with reading color tables by the Zeiss LSM reader, and if your dataset is 16-bit then there is no way for the LUT to be retrieved right now (for the dataset I have, it's 16-bit but the color table has 500 entries in it... it is not clear why, or how that lut should be interpreted for 16-bit index values)

I've opened these issues in the Bio-Formats trac:

https://trac.openmicroscopy.org.uk/ome/ticket/12383

https://trac.openmicroscopy.org.uk/ome/ticket/12384
Comment 10 Benoit Aigouy 2014-06-16 11:19:49 CDT
Unfortunately I can't provide you with the lsm I initially used (since the data is important for my research and I can't make it public) but this file was generated using similar conditions and shows the same LUT error in my hands (by the way this not precious lsm I attached to bugzilla is 8 bits and shows no lut neither, the initial dataset I used was 16 bits so the bug seems to be independent of bit depth). No clue about the reason neither, I just can say that IJ 1.x used to load some green palette with this file.

thanks a lot for your answers and reports to the loci people.

have a nice day,

B
Comment 11 Mark Hiner 2014-06-16 12:43:57 CDT
Hi Benoit,

 Just wanted you to know that this sample LSM is very helpful. Bio-Formats definitely returns the LUT from this dataset so the problem is in how that information is used by IJ2 and its components. I will investigate and let you know when there is a fix in place.

 I just wanted to confirm.. does your 16 bit LSM that you can't share look appropriate when you open it with "File > Import > Bio-Formats"?

Thank you,
Mark
Comment 12 Benoit Aigouy 2014-06-17 01:27:42 CDT
Hi Mark,

I checked and indeed opening the file with file>import>bioformat does open the file correctly and with the right LUT (provided I select Colorized or composite in color mode. Hope this helps.

best,

B
Comment 13 Mark Hiner 2014-06-17 07:52:18 CDT
Created attachment 165
SCIFIO patch

potentially fixed SCIFIO jar
Comment 14 Mark Hiner 2014-06-17 07:57:23 CDT
Hi Benoit,

 I attached a potential new SCIFIO jar (see attachment: SCIFIO patch). It displays the tila_000.lsm with a green lut but I wanted you to test it on your private data as well to ensure that the fix is appropriate.

To test locally:
1) Download the SCIFIO patch (scifio-0.15.3-SNAPSHOT.jar)
2) In your Fiji.app/jars delete scifio-0.15.2.jar
3) Move scifio-0.15.3-SNAPSHOT.jar to Fiji.app/jars
4) Open your data

Let me know how the test goes.

Thanks!
- Mark
Comment 15 Benoit Aigouy 2014-06-17 08:20:14 CDT
Thanks Mark,

it works for the 8 bit image but not for the 16 bit one, I'll try to acquire a new mock 16bit image tomorrow which I can share with you so that you can finalize the fix for 16bits image as well.

best,

B
Comment 16 Mark Hiner 2014-06-17 08:38:11 CDT
That would be great. Thanks Benoit!

Just so you know, if you use Help > Upload Sample Image it does go to a protected page in the fiji.sc wiki that is only accessible by wiki accounts with credentials that we only give out to trusted Fiji developers. It is intended to allow users to upload sensitive/private data with the assurance it will not be distributed or exploited.

But I completely understand if you'd feel more comfortable acquiring a new dataset!
Comment 17 Benoit Aigouy 2014-06-18 03:16:27 CDT
Hi mark,

I have just uploaded a file called crap16.lsm that is 16 bits with a green LUT. Hope this is helpful.

best,

benoit
Comment 18 Mark Hiner 2014-06-18 07:12:37 CDT
Fantastic. Thanks Benoit, looking at it now.

Unsurprisingly, I found some significant problems with color table propagation and use yesterday. I'm hoping to get this wrapped up today.
Comment 19 Mark Hiner 2014-06-18 15:02:22 CDT
Should be fixed in the latest Fiji. Thanks again for the sample data Benoit.
Comment 20 Benoit Aigouy 2014-06-19 02:19:18 CDT
works like a charm. Great job!

best,

benoit