Script ilastik .h5 image import in FIJI

I have a lot of ilastik .h5 probability images that I wish to batch post process in FIJI.

Importing ilastik HDF5 images works fine via Plugins > ilastik > Import HDF5 . In my case the dimensions are already correct as the default setting xyzc and I can successfully load the image by clicking “Load Raw”.

This command is macro recordable and I get the IJ-macro:

run("Import HDF5", "hdf5filename=path\\to\\my\\image_Probabilities.h5");

However, when I run this macro command it does not open the image but the dimensions selection splash screen instead.

Is there a way to include my dimension selection and “load raw” in the macro/script?
It does not have to be a IJ-macro, it could also be jython or groovy.

edit: tagging in @wolny as the maintainer of the plugins update site.



This will probably be not to hard to do with a groovy script.

Don’t have time to help in detail now, but for future reference, the relevant source code seems to be here:

Maybe this will help someone (maybe you? maybe me if/when I find time) put together a script.



Hi @CellKai,

we know about this problem with the Import/Export plugin not being script-able. It’s hopefully an easy fix - @wolny is probably up for the task :wink:

1 Like

Hi @k-dominik,
thank you, thats awesome! @bogovicj thank you for your comment as well, which probably contains the solution already, but I am unfortunately not yet on that level :wink:

Hi @CellKai,

thanks for reporting the issue. It’s been fixed in the latest release of our plugin (v1.3.0), so please update the plugin in your Fiji installation and the annoying ‘dimensions selection’ popups will be gone.
If you want more than just reading .h5 have a look at the sample macro of how to run pixel classification on multiple .h5:



Hi @wolny,
thank you very much for the fix & update as well the great sample macro! This is a really useful resource :slight_smile:

1 Like