dipy
dipy copied to clipboard
ENH: Add commentary on median otsu tutorial/change default parameters
Using dipy_median_otsu
CLI without flags tends to give holes in the mask for multiple people. Per @skoudoro a discussion of this in the tutorial would help (to use median_radius=4
and numpass=4
).
If holes are the main problem, we could move the correct_minor_errors
from dipy.nn.utils to segment utils and use that. The function is intended to exactly do that and remove any non connected masks
Thanks @pjsjongsung, we might need to rename this function correct_minor_errors
. Hard to guess, it is not very explicit. is this function correcting only this "minor errors" or there are other errors ?
It only corrects for the two mentioned errors: holes and non connected masks. We could change it to something like correct_mask?
We could change it to something like correct_mask?
fill_holes()
?
But it does also remove non connected masks. fill_holes_select_largest
sounds too long though.
You could also split it into fill_holes and remove_islands or some such since those don't necessarily need to be paired.
That does sound reasonable. I'll go ahead and do that.
Just realized the current implementation is not separable. Will go with remove_holes_and_islands. I guess the name can be long since it will mostly be an internal function.