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

Hi Stephanie,

Firstly, can you check that the gotcha reported here is not an issue on your system? I’ve in recent times had people with different issues manage to trace things back to that common underlying cause.

However from those error messages my suspicion is that there’s some kind of issue happening within the registration that is performed within FSL’s FIRST scripts. These are outside of my control so the extent of my assistance is kind of restricted by that… Only things I would suggest are:

  • Try to derive a good brain mask, and then use either the -mask or -premasked option to 5ttgen fsl.

  • Check the orientation of your input image relative to the MNI template image provided with FSL. If e.g. the axes are permuted such that there’s a 90-degree rotation between your image and the template, it’s entirely possible that the FIRST script is failing to identify this.

As far as SGE, I had a quick look, and my code is checking for the presence of that environment variable; in your case you’re setting it to an empty string, but it’s still nevertheless set, and that’s why the 5ttgen fsl script is choosing to wait for the appearance of new files in the future rather than terminating immediately. But ultimately that’s only affecting what type of terminal feedback you receive regarding the FIRST failure, not the failure itself.