OK, no issue with your directions then, it’s just a matter of supplying them to any command that needs to know, including dwi2mask
. Since the gradient table isn’t stored in the NIfTI header, it needs to be supplied explicitly every time - which is why we recommend MRtrix3’s own mif
format.
In your case, you should only need to type:
$ dwi2mask DTI.nii -fslgrad DTI_bvecs.bvecs DTI_bvals.bvals DTI_mask.nii
to get this working… (don’t forget the filename suffix for the output, otherwise MRtrix3 won’t know what format you want for your output).