ijpb / MorphoLibJ

Collection of mathematical morphology methods and plugins for ImageJ
http://imagej.net/MorphoLibJ
GNU Lesser General Public License v3.0
98 stars 49 forks source link

Fill holes in labels #67

Closed tischi closed 1 year ago

tischi commented 2 years ago

@dlegland

For one of our projects it would be very useful to have a "Fill holes in labels" option. Would that be within scope to add?

dlegland commented 2 years ago

Hi, yes, could be a good idea, but there would be problems when some labels are enclosed into other labels... What behaviour would you expect in that case?

tischi commented 2 years ago

Hm, I guess I would expect that the outer label is filled until it hits the inner label, thus not changing the inner label. Essentially, I would say that the algorithm only is allowed to change the values of background (0) pixels.

dlegland commented 2 years ago

yes, sounds logical. However I am not sure this is that easy to implement (not straightforward to differentiate inner hole to non-inner background...).

dlegland commented 1 year ago

Implemented in a664ec191008bce8b4c1a0610110be6bff8961b6, and released within MorphoLibJ 1.6.0.