5ttgen waiitng for creation of new file

OK, full disclosure needed since people are still hitting this, in the hope that the next victim finds these details.


It is my most up-to-date hypothesis (thanks to help from @aszymanski) that the vast majority of users encountering this issue do so due to the following combination of events / details:

  • Registration of T1 image to DWIs using FSL flirt. In its default usage, flirt resamples the input image to match the target image. This is unnecessary for ACT. It is better to have flirt provide the calculated transformation matrix, then apply that linear transformation to the T1 image (either using flirt again, or combination of transformconvert and mrtransform), such that the image header transformation is altered but the image grid / intensities are not.

  • The nucleus accumbens is very small. If the image resolution is very coarse, FSL first is unable to find any voxels that lie entirely within the surface representation of this structure (reported in the FIRST log files as “no interior voxels to estimate mode”), and subsequently fails. Later aspects of the run_first_all script also fail because image / surface files that should have been created are instead absent.

  • If SGE is available, run_first_all will delegate sub-cortical segmentation processes to the local job queue, and terminate itself with a successful return code before waiting for completion of those jobs. This makes it difficult to tell whether FIRST has run locally but failed, has been submitted to SGE and will later succeed, or has been submitted to SGE but will later fail; hence the “Waiting for creation of file” message.

With fully up-to-date MRtrix3 code, the messages / warnings / errors reported by 5ttgen fsl have changed a little from what you have shown here:

  • If your system does not have SGE configured, it will terminate with an error if FIRST has failed to segment all sub-cortical structures.

  • If your system does have SGE installed, it will provide a message stating that it is going to wait for FIRST to produce the output files expected from it, but that if FIRST fails these files will never be created and the script will be left hanging indefinitely.


While I can continue to try to provide more meaningful warnings / errors in this script given the complexities of the run_first_all implementation (which is out of my control), I would suggest that the fundamental cause of the issue is that your T1 image has been undesirably down-sampled.

Cheers
Rob

2 Likes