Hello,
I am a complete beginner in this domain.
I’ve been trying to use dwi2response msmt_5tt to obtain multi-shell, multi-tissue response functions. I run the following command:
5ttgen fsl T1w_acpc_dc_restore_1.25.nii.gz 5TT.mif -premasked
5ttgen:
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 temporary directory: /Users/sahaa2/Desktop/599671/T1w/Diffusion/5ttgen-tmp-M1W2ZK/
Command: mrconvert /Users/sahaa2/Desktop/599671/T1w/Diffusion/T1w_acpc_dc_restore_1.25.nii.gz /Users/sahaa2/Desktop/599671/T1w/Diffusion/5ttgen-tmp-M1W2ZK/input.mif
5ttgen: Changing to temporary directory (/Users/sahaa2/Desktop/599671/T1w/Diffusion/5ttgen-tmp-M1W2ZK/)
5ttgen: [ERROR] Environment variable FSLDIR is not set; please run appropriate FSL configuration script
5ttgen: Changing back to original directory (/Users/sahaa2/Desktop/599671/T1w/Diffusion)
5ttgen: Contents of temporary directory kept, location: /Users/sahaa2/Desktop/599671/T1w/Diffusion/5ttgen-tmp-M1W2ZK/
I’m sorry I don’t really understand what’s going on under the hood, so it might be a very trivial issue
It’s a bit hidden in the avalanche of output there, but this one is the key bit:
[ERROR] Environment variable FSLDIR is not set; please run appropriate FSL configuration script
So basically, your FSL installation isn’t entirely “done”: when properly installing FSL, that environment variable would be set, and all would be well with the 5ttgen command. Once that generates the 5TT.mif file, the rest should run as well.
A more direct way to obtain your response functions, which doesn’t rely on this 5TT.mif segmentation, is to run dwi2response dhollander, like this:
It’s quite a bit faster, and slightly more accurate, even for the HCP data.
But in any case, you’d do well to resolve your FSL problem as well, as you might be needing FSL functionality for other commands at some point when you process your own data.