5ttgen gives empty mask image

Hi,

I am trying to run the 5ttgen fsl command to give as input to tckgen.
I have a few subjects of my dataset which fail to generate the mask at the 5ttgen step so tckgen gives empty mask error

Here is my 5ttgen command:
5ttgen fsl -nocrop -premasked $quiet -nthreads $mrtrixthreads $force -nocleanup $imputedimg 5tt.nii.gz

The imputedimg is an imputed T1w from my patient cohort.

For the unsuccessful cases, the orientation information was as follows:
Orientation : PSR
Primary Slice Direction: sagittal

However, I have a few other subjects with the same orientation information for which the 5ttgen ran successfully.

Could you please advise?

Thank you
Best,
Apoorva

I’m not sure, but this sounds similar to this thread. Maybe there’s some clues in there?

If the discussion in the other thread happens to not provide an answer to your issue, you have already utilised the -nocleanup option, which is implemented precisely for this sort of use case. You can go into the scratch directory, look at the contents of file “log.txt” to see the order in which the various intermediate images were genreated, and manually load them in that order in order to determine the first image that does not contain what it should; that then tells you which processing step led to the failure.

Hi,

Thank you so much for pointing me to the other thread. I tried the solutions suggested there, but it didn’t work.
I will go through the intermediate files and the log more closely to try to understand where it’s exactly failing.

Thank you so much for your help once again.
Best,
Apoorva