5ttgen warning and error

Hi all experts,

I am very new to use MRtrix3.
Recently, I followed the tutorial from Andy’s Brain Book to learn how to use MRtrix3.
I’ve been encountering an issue with the use of the 5ttgen.
(5ttgen fsl T1.mif 5tt_nocoreg.mif)
Please see the following error message.
I am wondering whether this issue is related to my MacBook Pro M2, although I have correctly installed FSL.

Thank you in advance.

Lin


5ttgen: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
5ttgen:
5ttgen: Generated scratch directory: /Users/lincai/Downloads/AAA/sub-CON02/ses-preop/dwi/5ttgen-tmp-LKB6ZF/
Command: mrconvert /Users/lincai/Downloads/AAA/sub-CON02/ses-preop/dwi/T1.mif /Users/lincai/Downloads/AAA/sub-CON02/ses-preop/dwi/5ttgen-tmp-LKB6ZF/input.mif
5ttgen: Changing to scratch directory (/Users/lincai/Downloads/AAA/sub-CON02/ses-preop/dwi/5ttgen-tmp-LKB6ZF/)
Command: mrconvert input.mif T1.nii -strides -1,+2,+3
Command: maskfilter /usr/local/fsl/data/standard/MNI152_T1_1mm_brain_mask_dil.nii.gz dilate mni_mask.nii -npass 4
Command: standard_space_roi T1.nii T1_preBET.nii.gz -maskMASK mni_mask.nii -roiFOV
5ttgen: [WARNING] FSL script ‘standard_space_roi’ did not complete successfully; attempting to continue by providing un-cropped image to BET
Command: bet T1.nii T1_BET.nii.gz -f 0.15 -R

5ttgen: [ERROR] bet T1.nii T1_BET.nii.gz -f 0.15 -R (fsl.py:157)
5ttgen: [ERROR] Information from failed command:
5ttgen:
/usr/local/fsl/bin/bet failed during command:T1.nii T1_BET.nii.gz -f 0.15 -R

    Fatal error: cannot open file: -
        Function: (main)

5ttgen:
5ttgen: [ERROR] For debugging, inspect contents of scratch directory: /Users/lincai/Downloads/AAA/sub-CON02/ses-preop/dwi/5ttgen-tmp-LKB6ZF/
5ttgen: Scratch directory retained; location: /Users/lincai/Downloads/AAA/sub-CON02/ses-preop/dwi/5ttgen-tmp-LKB6ZF/

Hello

I had exactly the same error, but reading several forums and posts, I realized that adding -premask at the end of the line works, i.e. the code would look like this:

5ttgen fsl T1.mif 5tt_nocoreg.mif -premask

Greetings

Luis