Closed maulakhan closed 11 months ago
ping @dlegland @iarganda
Hi,
Well, for the moment this is the expected kind of result, so nothing wrong a priori.
The aim to this plugin was to generalize erosion and dilation to label maps. Of course, one has to decide what to do when several labels are found in the neighborhood of current pixel! For erosion, I have made the decision to apply erosion only if a background pixel or voxel (label 0) is found in the neighborhood. Therefore, a the boundary of two regions, no erosion occur as there is no background.
I was thinking about this, and it could be possible to add an additionnal option, to erode if a different label (either 0 or another one) is present in the neighborhood. This would have some side effects on other kind of images, but if the option can be chosen by the user, this should be fine. I will try to add it in a future release. Stay tuned...
I was thinking about this, and it could be possible to add an additionnal option, to erode if a different label (either 0 or another one) is present in the neighborhood.
this is what I would have expected it to do....essentially erode each label as if it was a lonely binary mask.
it would be great if that could be added.
I would make it the default behaviour, as I don't know a use-case right now for the current implementation, do you have a use-case?
Hey guys! What about imposing label (zero) boundaries and then eroding?
I would make it the default behaviour, as I don't know a use-case right now for the current implementation, do you have a use-case?
Actually, in case of "dense" label maps (like a watershed result without dams), applying erosion would create new background pixels within groups of regions. The apparition of background may be questionable... But If the option to use background instead of other label is more natural, maybe I can change default option.
Hey guys! What about imposing label (zero) boundaries and then eroding?
This is a solution as well! But then it is necessary to iterate over labels, create new image for each label, and then concatenating the results.
Hi,
I have updated the plugin, and drafted a new release (https://github.com/ijpb/MorphoLibJ/releases/tag/v1.6.0-LabelMapFiltering)
You can play with the new jar, and tell me if this is better now!
fixed in release 1.6.2
Dear all,
I am trying to erode a label mask in such a way that I have non-touching labels using MorpholibJ
Label Morphological Filter
options. I get the following result:Left: original label mask, Right: label mask after erosion with radius = 9
I used
radius = 9
but was not able to separate them. Can you please help to get the non-touching labels, maybe I am doing something wrong or is it supposed to work that way?Attaching one example
Thanks a lot!