converting FSL FAST segmentation into 5ttgen format

Hi all,

Sorry if this is a very simple question, I am an MRtrix newbie!

I have ex-vivo macaque data that I’d like to run ACT on. I was trying to use 5ttgen fsl to get the required file, but the FIRST command is not optimized for macaque data and the function failed while trying to segment out subcortical structures.

I was able to use FAST to get simple GM-WM-CSF segmentations in NIFTI format, which I think will suffice for our current needs. How do I convert these segmentations into 5TT format?

Hello @pmn1113 and welcome!

I have an edited version of the 5ttgen fsl script that does just that, accepting the path to the directory where your FAST segmentations are, and using them instead of re-running FAST. It does expect a specific file prefix though, something that I still have to fix :o

The script will still attempt to perform FIRST on your data, unless you comment out those sections. I think, however, that you do need a subcortical GM segmentation to perform ACT, as some of the logic regarding truncating and including streamlines depends upon this information. Not sure whether tractography would run without it, or if it is advisable. Maybe @rsmith can expand on this.

Cheers,
Nick

Welcome @pmn1113!

The most “robust” to do this is to generate a new 5ttgen algorithm that is distinct from the provided 5ttgen fsl (e.g. “5ttgen fast”), which performs the image processing operations necessary to get from the data you have (an anatomical image on which FAST should be run, or pre-calculated FAST outputs) to a 5TT image. Such an algorithm could even be distributed as part of MRtrix3 and used by others; I’ve recently been through this process with @mblesac:

Alternatively, if you “just want to get my data into the 5TT format for ACT”, the description of the format itself is in the documentation here. In the simplest case, it’s just a matter of doing an mrcat -axis 3 call to construct the 4D image with the tissues in the correct order. You’ll also need to generate a volume containing all zeroes to concatenate in there as the tissues for which you don’t have any segmentation data; you can do that using a trick like “mrcalc FAST_WM.nii 0 -lt” (i.e. select all voxels where the WM density is negative; that is, none of them).

Cheers
Rob