Ilastik refuses to load image file

Dear all and specially @k-dominik

Ilastik has been running super well on my laptop (Win10) and I had no problem loading pictures until today with this Apo 1.tif (5.6 MB) where I get an error message and the following log:

Starting ilastik from "C:\Program Files\ilastik-1.3.2post1".
ERROR 2021-02-05 19:12:23,052 log_exception 14532 8152 Traceback (most recent call last):
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\ilastik\ilastik\applets\dataSelection\dataSelectionGui.py", line 604, in _configureOpWithInfos
    self.topLevelOperator.DatasetGroup[laneIndex][roleIndex].setValue( info )
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 118, in call_in_setup_context
    return func(self, *args, **kwargs)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1232, in setValue
    self._changed()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1433, in _changed
    c._changed()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1433, in _changed
    c._changed()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1433, in _changed
    c._changed()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1439, in _changed
    self._configureOperator(self)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1453, in _configureOperator
    self.operator._setupOutputs()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\operator.py", line 455, in _setupOutputs
    self.setupOutputs()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\ilastik\ilastik\applets\dataSelection\opDataSelection.py", line 358, in setupOutputs
    opReader.FilePath.setValue(datasetInfo.filePath)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 118, in call_in_setup_context
    return func(self, *args, **kwargs)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1232, in setValue
    self._changed()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1439, in _changed
    self._configureOperator(self)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1453, in _configureOperator
    self.operator._setupOutputs()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\operator.py", line 455, in _setupOutputs
    self.setupOutputs()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\operators\ioOperators\opInputDataReader.py", line 193, in setupOutputs
    self.internalOperators, self.internalOutput = openFunc(filePath)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\operators\ioOperators\opInputDataReader.py", line 609, in _attemptOpenAsTiff
    opReader.Filepath.setValue(filePath)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 118, in call_in_setup_context
    return func(self, *args, **kwargs)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1232, in setValue
    self._changed()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1439, in _changed
    self._configureOperator(self)
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\slot.py", line 1453, in _configureOperator
    self.operator._setupOutputs()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\operator.py", line 455, in _setupOutputs
    self.setupOutputs()
  File "C:\Program Files\ilastik-1.3.2post1\ilastik-meta\lazyflow\lazyflow\operators\ioOperators\opTiffReader.py", line 97, in setupOutputs
    assert shape[-3:] == (Y,X,S)
AssertionError

ERROR 2021-02-05 19:12:23,060 log_exception 14532 8152 Wasn't able to load your dataset into the workflow.  See error log for details.

This is specific to images of the same series, which open correctly in Fiji. No idea why or what is missing… I tried more recent version of Ilastik but got the same error.

Can you help?

Sincerely,

Matthieu

First, the file contains corrupted OME metadata (SamplesPerPixel mismatch: OME=1, TIFF=4). Second, the version of tifffile.py in Ilastik is outdated (2014.8.24) and in this case does not correctly fall back to the generic, non-OME, reader.

2 Likes

Hi @MatthieuV,

thank you for the report and also thank you very much for providing the data! That makes things easier :slight_smile:

Also thank you @cgohlke for your insight. How do you keep track of those threads that might touch tifffile?

In any case, if a newer version of tifffile solves the problem, @MatthieuV, you could try our latest beta (1.4.0b13 at the time of writing) - we have recently updated the tifffile version (currently 2021.1.14). I have verified, that your file is loading fine there.

Are you using version 1.3.2post1 for a particular reason?

Cheers

Hi @k-dominik

I am not using version 1.3.2post1 for a specific reason. I actually stumbled on the issue with 1.3.3post3 and tried with 1.4.0b5. Thinking wrongly that Ilastik was somehow corrupt, I uninstalled the software and went for a previous version. Then I realised that the issue was the images…

I’ll re-instal the new version :slight_smile:

Sincerely,

Matthieu

1 Like