dwi2mask synthstrip


I am trying to improve the mask for participants with lesions. I wanted to try running dwi2mask synthstrip on the dwi image since this worked well in FreeSurfer with the T1. However, I get the following error:

dwi2mask: [ERROR] Expected exactly 2 arguments (3 supplied)
dwi2mask: [ERROR] Usage: dwi2mask input output
dwi2mask: [ERROR] Yours: dwi2mask synthstrip P03_T3/P03_T3_dwi_den_unr_preproc_unb_upsampled.mif P03_T3/P03_T3_mask_den_unr_preproc_unb_upsampled.mif

I can’t find any documentation indicating the syntax is wrong. I appreciate any help!

Thank you!

Dear Trina

dwi2mask has nothing to do with synthstrip (see dwi2mask — MRtrix3 3.0 documentation). dwi2mask only expects an input and output. Any options are preceded with “-”

Synthtrip is part of freesurfer as mri_synthstrip or can be installed as, for example, a singularity container from SynthStrip

Hope this helps


In the developers branch, there is a new dwi2mask command that allows you to use different algorithms. One of them is synthstrip. To use that you need to install the developers branch, as (I think) this has not been yet officially merged. I hope this helps.

Best regards,


Hi Manuel,

Thanks very much for your reply. I tried downloading the dev branch but there are no compile or build scripts made when I follow these steps for the dev branch.

git clone GitHub - MRtrix3/mrtrix3: MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
cd mrtrix3
git checkout dev # <== switch over to the dev branch
git pull # <== make sure that branch is up to date with remote

The master branch works fine, it is just an issue when switching over to the dev branch (similar problem to this post): Build dev latest version