that’s some interesting data. The analysis you want to carry out is not feasible in ilastik alone, and I do not know of any software that does exactly what you are doing. However, you could try something like the following:
a) create a binary mask of the whole worm
b) create a skeleton (+ cleanups) to extract just the centerline of the worm
c) extract the dots from your image (e.g. with object classification following pixel classification)
d) write some code that measures distances from dots to the centerline
A bit more detail:
prerequisites: for the proposed solution you should use ilastik 1.3.2post1 (will not work in the current beta)
a) you want to produce binary mask of your worm (so an image with zero in the background and nonzero wherever you have the worm). Do you acquire more than this boundary staining? In any case, using only the image you provided, you could try to:
- do pixel classification to enhance the boundaries
- use this boundary image as “raw data” in carving, together with the stained image as an overlay and carve the whole worm.
- segment the worm, save the object
- export the completed segments layer (assuming you have only one object there).
b) extract the centerline from the binary mask (that you have produced in carving) using a skeletonization algorithm in fiji (something like https://imagej.net/Skeletonize3D). Of course this is not perfect, you’ll have to come up with something to remove the branches (see image), but it would look like the following:
c) you need an image with only the “dots”. You could probably go via pixel classification to enhance just the dots. Then go to object classification for cleanup, and to extract the coordinates of your objects.
d) The final task would be combining everything by (i don’t think you can get around some custom code here) where you find the distance to the closes centerline/skeleton pixel for each of your dots.