How to dilate a binary mask using FSL?

Dear all,

Apologies for such a simple question!! I cannot find the answer for this one for some reason and I am struggling to understand fslmaths help section.
I do have a binary mask (spherical). I would like to dilate it a certain number of voxels (1,2,3 etc.).
How can I do this with fslmaths?

Thank you!
Meka

Hi Meka,

You should be able to use the -dilM option repeatedly, e.g.:

fslmaths <image> -dilM -dilM -dilM -bin <dilated-image>

Hi Paul,

Thank you so much! I will try this asap and let you know!

Kind regards,
Merve