5ttgen fsl ERROR: only 9 of 10 structures were segmented successfully

Dear all,
I am trying to use 5ttgen fsl T1.mif 5tt_nocoreg.mif to segment the T1 image into different tissue types. Then I got the message below:

FSL FIRST has failed; only 9 of 10 structures were segmented successfully (check /Users/lixue/Documents/tian/5ttgen-tmp-ZHWWCD/first.logs)

Then I checked the information via : more first.logs/first*.o*.*

and it finally got a message from the file first.o12700.2, just as follows:

create shapeModel
done creating shapeModel
0.232922 0.0164308 -0.0214726
-0.0217154 0.277038 -0.041966
0.0171042 0.0419063 0.274706
NEw done imodes transform
Error: cannot find image first-R_Accu_first

I dont know if there is something wrong with my fsl or something else. My system is macOS Monterey version 12.2.1.
It would be grateful for your help on figuring this!

Welcome Li!

There are a number of historical threads on here relating to FSL’s FIRST failing to segment specific structures, which are worth searching through.

My suspicion is that the error you have reported here is downstream of the originating fault. You have some process reporting the absence of a particular image image, but what you are actually looking for is the fault that resulted in that image not being constructed (or a fault resulting in failure to generate the data from which that image is generated). From memory, the problem tends to be a failure of the flirt sub-cortical-masked registration step in the run_first_all script. So it requires a bit of investigation and tinkering to figure out what needs to change for that script to work. You should check whether or not the brain extraction step has produced an incorrect result, which could have downstream implications. Also knowing the spatial resolution of your T1w may be useful: from memory, low-resolution images would often fail at this step, so there’s now some logic in the 5ttgen fsl script that explicitly upsamples low-resolution images, and maybe it’s not kicking in for your data but it needs to.