Problem exporting probability maps from pixel classification for use in imagej/fiji

I am using pixel classification in ilastik to then move into imagej to quantify. However when I try to export and convert the data type to unsigned 8-bit and renormalise to 0-255 in transformations, the output file says it is not supported in jpeg or png form due to the incorrect number of channels. I can export them as tiffs but Image J is not compatible with them because they are not unsigned 8/16 bit

How do I fix this??

Hi @username001,

it seems you are exporting a two channel pixel classification result. Both, jpg and png only support either greyscale (so just a single channel) or RGB (three channels). So exporting two channels doesn’t work with these data types. So in order to get your data into fiji, you have multiple options:

  1. export to hdf5 and use the ilastik import/export plugin in fiji to import the produced hdf5 file.
  2. export only a single channel by using the cutout subregion option in the export dialog:
    cutout_c
    With only a single channel you can export to png as a greyscale
  3. export as a sequence (tif sequence, png sequence, whatever…). This will produce one image per selected sequence axis. So make sure to reorder the image in the correct way. ilastik will always use the first axis for the sequence. You can change the axis order in the export dialog:
    sequence_c
    please note the transpose axis order setting as well as the description saying "2 YX images (stacked across C) indicating that you are doing the right thing. Also note the {slice_index} value in the file pattern - that way ilastik will produce a new file for every channel by adding the channel number to the file name.

Cheers

P.S.: please, never export to jpg, this adds lossy compression to your data.