Ilastik: importing multiple non-sequential labels


I use ilastik-1.3.3post1 for a Pixel Classification of 3D greyscale image (a set of 2D XY-slice images).
Say, I have a set of 100 slice images:

Slice 000.tif
Slice 099.tif

Now I’ve got few images labeled, but the label set is non-sequential:

Slice 013 Labels.tif
Slice 015 Labels.tif
Slice 025 Labels.tif
... (non-serial numbers)
Slice 099 Labels.tif

How do I import these non-sequential labels in batch, that is not via image-by-image manual import using the procedure suggested at

Thank you very much for the detailed response.

Hi @AKazak,

I know you’re close to a solution, would you mind sharing it here on the forum once you have it? :slight_smile:

Dear @ k-dominik,

Sure I will.

Recently got a reply from Dr. Anna Kreshuk with to following suggestions.

  1. Convert the data to hdf5 and store it as a single 3D volume. In the labeled volume, just add empty slices where there are no labels. This could be done using Python.

  2. Load the data the right way in Fiji and use the exporter of the Fiji plugin.

1) requires coding (for example in Python), while 2) does not.

I can code in Python and understand the trick with appending labeled dataset with a bunch of empty (dummy) slices to created a label 3D volume with dimensions equal to that of original. However this solution would require additional settings to determine dimensions of the original dataset.

Currently I can import my 3D volume (set of tiffs) to Fiji, but don’t understand how to do labeling in Fiji and export the labels of Ilastik.

1 Like

thanks a lot! :slight_smile:

Sorry I was a bit early marking this as the solution…

Can you share an experience of exporting labels from Fiji to Ilastik, please?

Hi @AKazak,

the easiest way would be to use the ilastik fiji import/export plugin and export an hdf5 file after loading the data appropriately into fiji (do you have a link on how to do this, or maybe could elaborate?).

I created a labeling 3D volume as a uint8 image stack (3D) in Fiji, exported is to h5 via Plugins->ilastik->Export HDF5 and tried to import the h5 file as labels to Ilastik.
However, it takes a lot of time with the following message:
2020-03-10 231928

Is there a way to accelerate the label import process?
Thank you.