Watershed process get splitting points

imagej
watershed

#1

Dear Forum,
is already implemented somewhere an easy way to get splitting points of the watershed process?
08

from this API:
https://imagej.net/ij/developer/api/ij/plugin/filter/EDM.html
it doesn’t seem.

Any suggestion?
thank you,
Emanuele


#2

Hi @emartini,

from your question it doesn’t get clear if you need these points inside a java plugin or simply as a readout.

Here would be a possibility to get them via a macro. might not be the most elegant way but works.

The only drawback is, that it sometimes gives you a 1-pixel shift of the point depending on the orientation of the splitting line. but it might help to get started as an idea.

originalImage = getTitle();
run("Duplicate...", "title=[" + originalImage + "_ws]");
watershededImage = getTitle();
run("Watershed");
imageCalculator("Difference", originalImage, watershededImage);
selectWindow(originalImage);
setOption("BlackBackground", true);
run("Skeletonize");
run("Analyze Skeleton (2D/3D)", "prune=none show");
IJ.renameResults("Branch information", "Results");

#3

Dear @biovoxxel,
thank you for your suggestion.

I prefer a python plugin but it’s ok even this macro.

Have a nice day,
thank you


#4

What you want, I think, are the boundary points of maximal concavity.
See:
Sati M & Laroye GJ. A simple algorithm for measuring the the concavtity/convexity ratio and lobe counting of a closed contour. Analytical and Quantitative Cytology and Histology, 1996. 16: 269-283.