Closed tischi closed 2 years ago
Hi,
I would expect that it takes all regional maxima and extends them, This is not really how it works. In facts, some pixels/voxels may belong to a regional minima/maxima, without being included in an extended minima/maxima.
One way to consider things is to imagine the (morphological) reconstruction of the image, constrained by the same image minus the value of the dynamic. Then, a minima with a small dynamic will disappear after the reconstruction.
So the criterium to remove minima/maxima is the value of the dynamic value uused to remove them. Hope this makes things more clear? Maybe I will eed to update the manual also!!!
best, David
Thanks! So this is in fact something like the tolerance/h-maxima/prominence? I think it would be very helpful to have a (1D) example of the workflow, including how the images look before and after the reconstruction a.s.o. Do you think this is doable? Otherwise pretty hard to understand even for professional bioimage analysts ;-)
I have started an illustration in 1D case. You can find it here: https://github.com/ijpb/MorphoLibJ/blob/master/doc/MorphoLibJ-manual/images/reconstruction/extendedMaxima.png
I have the book of Soille under the eyes, the workflow is as follow:
On the example, a value of two units was used for the dynamic. Note that the position of the maxima may change for larger value of dynamic. For example, using a dynamic of 1 unit results in same number of maxima, but smaller. Using a value of 3 units will make the left-most maxima disappear.
It is possible to value the maxima depending on the dynamic value that make them disappear, but this is not (yet?) implemented in MLJ.
@dlegland This is great! Thank you very much! I think one has all the functions to do this in MLJ, right? So I could write a macro with line profiles in ImageJ to reproduce this, isn't it?
you're welcome! Figure should be included in manual as well, but I'm currently fighting with LaTeX...
Otherwise yes, you can reproduce with macro. The critical point is the reconstruction, but it is easily scriptable.
best! David
@dlegland triggered by the discussion on the forum (https://forum.image.sc/t/call4help-3d-dense-nuclei-segmentation-challenge/23462/21) I had a look at MLJ.
I am confused about this function: https://github.com/ijpb/MorphoLibJ/blob/26470aa8aef8203af303b8c0e60d1257753e5d87/src/main/java/inra/ijpb/morphology/MinimaAndMaxima3D.java#L299
And this (corresponding?) menu entry:
Plugins › MorphoLibJ › Minima and Maxima › Extended Min & Max 3D
Reading the name ("Extended Min & Max 3D") of the menu entry I would expect that it takes all regional maxima and extends them, including all connected pixels with
v > (v_regional_max - dynamic)
.However, what it seems to do is to (also?) filter out some maxima, i.e. I am getting less maxima using the "Extended" vs. the "Regional" algorithm. Is that correct? If so, according to which criteria does the "Extended" version filter maxima?