Problem opening .ics image with SLIM curve

Hello,

I am a long time user of TRI2 software and was hoping to move to using SLIM curve instead. I have installed SLIM curve and successfully opened a test image downloaded from a link on the info page https://imagej.net/SLIM_Curve.

However, I am unable to open any of my own data, all I get is an IllegalArgumentException (detailed below). My data is in .ics format, the .ics files are created by my own C code. I have no problem opening and analysing these files with the TRI2 software.

I have tried opening several of my .ics files with SLIM curve on both on Linux and Windows systems and I always get the same error.

Does anyone have any idea of what could be wrong? Maybe the .ics header in my files needs updating?

Thank you for your help,
Liisa

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52n; Java 1.8.0_66 [64-bit]; Linux 4.15.0-48-generic; 228MB of 9724MB (2%)
 
java.lang.IllegalArgumentException: (minimum <= value <= maximum) is false
	at javax.swing.SpinnerNumberModel.<init>(SpinnerNumberModel.java:125)
	at javax.swing.SpinnerNumberModel.<init>(SpinnerNumberModel.java:164)
	at loci.slim.ui.UserInterfacePanel.createCursorPanel(UserInterfacePanel.java:833)
	at loci.slim.ui.UserInterfacePanel.<init>(UserInterfacePanel.java:405)
	at loci.slim.SLIMProcessor.doFits(SLIMProcessor.java:634)
	at loci.slim.SLIMProcessor.process(SLIMProcessor.java:411)
	at loci.slim.SLIM_PlugIn.run(SLIM_PlugIn.java:46)
	at ij.IJ.runUserPlugIn(IJ.java:229)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:745)

Sorry for the delay in reply, @lmhirvonen!

Are you able to import the ICS file into Fiji using the File › Import › Image… dialog? Does it look correct? This command uses the SCIFIO library to read the data, which is what SLIM Curve uses under the hood.

I was unable to reproduce the error message you reported with an up-to-date Fiji on macOS with SLIM-Curve site enabled. My guess is that it is specific to your ICS file(s). Would you be able to attach a non-working file here in this topic?

The line of code giving you an error is:

_transientStartModel =
	new SpinnerNumberModel(0.0, 0.0, _maxBin * _xInc, _xInc);

Meaning it is detecting:

  • value = 0
  • minimum = 0
  • maximum = maxBin * xInc
  • step = xInc

So probably either maxBin or xInc is being detected as negative. Seems like an error in how the ICS file is being read… or (less likely IMHO) an error in the ICS file itself.

Thank you for your reply. I can import my .ics files into Fiji from the “File” -> “Import” -> “Image” dialog, and it looks correct to me.

I have attached a small example .ics file (zipped because .ics is not an allowed file type), which I can open with Fiji but not with SLIM Curve.

Thanks again,
Liisa

190425-USAF1-decay.zip (188.0 KB)

Sorry for the delay in reply, @lmhirvonen!

Together with @Xanthorapedia, we dug into what is going on with your ICS file.

The issue is that the dimensional axes are not being detected by SCIFIO as having a lifetime component. We were able to make it work with the SLIM Curve plugin by changing your ICS metadata as follows:

--- a/190425-USAF1-decay.ics
+++ b/190425-USAF1-decay.ics.working
@@ -2,7 +2,7 @@
 ics_version    2.0
 filename       test
 layout parameters      4
-layout order   bits    x       y       z
+layout order   bits    z       x       y
 layout sizes   16      92      62      62
 layout coordinates     video
 layout significant_bits        16
@@ -11,7 +11,7 @@ representation        sign    unsigned
 representation compression     uncompressed
 representation byte_order      1       2
 parameter      origin  0.000000        0.000000        0.000000        0.000000
-parameter      labels  intensity       x-position      y-position      z-position
+parameter      labels  intensity       micro-time      x-position      y-position
 history        type    Other
 history        labels  t x y
 history        extents 1.99341e-04 ? ?

That is: SCIFIO looks for a micro-time dimensional label to indicate that the dimension corresponds to lifetime bins. Without this, or any other hint that this is a lifetime dataset, it just reads it as plain X Y Z, and then SLIM Curve does not know what to do with that.

We are in the process of rewriting this plugin. We hope to support user-specified dimensional mappings (still with intelligent best initial guess) as part of that.

We also pushed a commit that fixes the exception you saw:

With your ICS file as written, it tries using the third (d=2 from 0-indexed) dimension as the lifetime dimension by default. However, based on how your data appears, that seems wrong in this case. Your easiest way forward is to tweak the ICS metadata as shown above. Alternately, we could add some hack to reinterpret the ICS metadata as desired for your ICS datasets, if there were some telltale in the metadata letting us know we should do this. But looking at it, we didn’t see anything obvious like that.

1 Like

Thank you for the solution, I really appreciate it!
I have changed my .ics header and it now opens with SLIM Curve.

Liisa

1 Like