dipy icon indicating copy to clipboard operation
dipy copied to clipboard

ENH: Add commentary on median otsu tutorial/change default parameters

Open alexrockhill opened this issue 11 months ago • 8 comments

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 ).

alexrockhill avatar Mar 15 '24 16:03 alexrockhill

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

pjsjongsung avatar Mar 18 '24 13:03 pjsjongsung

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 ?

skoudoro avatar Mar 18 '24 13:03 skoudoro

It only corrects for the two mentioned errors: holes and non connected masks. We could change it to something like correct_mask?

pjsjongsung avatar Mar 18 '24 15:03 pjsjongsung

We could change it to something like correct_mask?

fill_holes() ?

skoudoro avatar Mar 18 '24 15:03 skoudoro

But it does also remove non connected masks. fill_holes_select_largest sounds too long though.

pjsjongsung avatar Mar 18 '24 15:03 pjsjongsung

You could also split it into fill_holes and remove_islands or some such since those don't necessarily need to be paired.

alexrockhill avatar Mar 18 '24 16:03 alexrockhill

That does sound reasonable. I'll go ahead and do that.

pjsjongsung avatar Mar 18 '24 16:03 pjsjongsung

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.

pjsjongsung avatar Mar 20 '24 15:03 pjsjongsung