Strange problem using Analyze Skeleton


I encounter strange problem when running analyze skeleton on an image - it output NaN values for “Average branch length” and “Maximum branch length” for all segments.

  • I start with an image that is Probability output from Ilastik (see (4.8 MB) , i tried to upload the h5 file directly without zipping it, but couldn’t)
  1. I take only the second channel
  2. threshold
  3. Skeletonize or Skeletonize 2D/3D
  4. Analyze skeleton

The strange thing is that if I save the image to a file at step 1 or 2 or 3 , open it again and continue the process. I get valid numbers for “Average branch length” and “Max branch length”.
I can use it as a workaround, but I would prefer not to if possible.

The image is 8-bit, 2058*1830 pixels
I use updated Fiji with ImageJ v1.52u


@iarganda - any thoughts on this one?

1 Like

That’s very strange. Also, I am not able to open the file you uploaded. Can you please put it in another format?

1 Like

Thanks Ignacio for looking into this,

The file is .h5 file generated by Ilastik
it should be opened with plugin=>Ilastik=>Import HDF5
the same happens when I run Ilastik through Fiji and got the Probabilities results directly into Fiji without saving them into file.
The problem reproduce when I import the h5 file and save it as tif fibers-data_Probabilities.tif (7.2 MB)


Hello @Ofra_Golani,

The TIFF file seems to imported with some errors, just by looking at its properties:

I have 1) copied the second channel, 2) thresholded it, and 3) corrected its calibration like this:

After that, Skeletonize 3D and AnalyzeSkeleton work as expected.



Thanks Ignacio,

This indeed solved the problem, both using the saved .h5 file and correcting properties and calling Ilastik directly from Fiji and correcting the properties of the returned probabilities image.
cc: @ilastik_team


1 Like