Increase the size of the mask

Hi everybody

I would like to enlarge the size of the mask generated by dwi2mask
the purpose is to include the skull base to track cranial nerves
I need to get 10 mm more around the first mask

would you be kind to find a mrtrix command to do that ?
mrfilter ?
mrthreshold ?

thanks a lot !

tim

You could extend the mask via binary dilation in units of voxels using maskfilter mask.mif dilate -npass N output_mask.mif or apply a Gaussian smoothing filter (see mrfilter) to the mask followed by thresholding (mrthreshold).

thks max it works well :slight_smile:

Hi Max,
If I specify maskfilter mask.mif dilate -npass 1 output_mask.mif, would the algorithm basically take each voxel of the mask and create a 1mm sphere around it (considering we have a 1x1x1mm voxel size)?
Thank you for your help,
Franziska