Mislabelled voxels from 5ttgen fsl

Hi MRtrix3 experts,

I’m a newbie trying to create structural connectomes using ACT. I’ve come across 2 issues with the 5tt image created by 5ttgen fsl that I’m hoping you can help me resolve.

  1. Voxels adjacent to the subcortex are labelled as cortical grey matter. I’m assuming that FIRST is under-estimating subcortical grey matter relative to FAST, as discussed here: Freesurfer 5tt & cortical ROIs?.

  2. Hyperintensities outside the cortex (e.g. optic nerve) are labelled as white matter. I’ve tried using a mask, and this resolves the issue considerably, but there are still some problematic voxels that remain. And tckgen then proceeds to track streamlines through this area.

I’ve noticed that both these issues are resolved when using 5ttgen freesurfer, but this produces much more voxelised edges, and is less accurate in the subcortical and white matter segmentations. So I’m wondering what’s the better option in this situation - fsl or freesurfer? Is it possible to combine the 2 algorithms somehow, or are there other workarounds to these issues?

Thanks in advance!

Nandi

Welcome Nandi!

Voxels adjacent to the subcortex are labelled as cortical grey matter.

Yes, this is a limitation of the specific algorithmic combination of information from different sources in the 5ttgen fsl algorithm. It simply takes the whole-brain WM-GM-CSF segmentation from FAST, and over-writes the segmentations from FIRST over the top of it. There is a hidden assumption here that any voxels within / around the sub-cortical grey matter structures that FAST classifies in any fraction as GM will be a subset of the voxels segmented by FIRST. Where this is broke,m and there are voxels outside of the FIRST segmentation that FAST classified as GM in some part, they are simply left as-is. This wasn’t a problem for any of the datasets I tested on when I first developed this algorithm so it got left as-is… in reality it’s a pretty “dumb” algorithm.

Hyperintensities outside the cortex (e.g. optic nerve) are labelled as white matter.

Yeah, that happens; I can only really suggest a better-derived mask.

Is it possible to combine the 2 algorithms somehow, or are there other workarounds to these issues?

Pending update comes with a new 5ttgen algorithm that is based primarily on FreeSurfer, but doesn’t come with the voxelised edges. Not expecting it to be perfect by any means, but will be curious to see how it goes on a wider array of data.

Cheers
Rob

Hi Rob,

I finally had a chance to use the 5ttgen hsvs algorithm, and it seems to perform much better than 5ttgen freesurfer and 5ttgen fsl! I initially used -hippocampi first, and noticed a few voxels adjacent to the amygdala and hippocampus that are still labelled as cortical grey matter, although considerably less than 5ttgen fsl. When comparing this with the -hippocampi aseg flag, its easy to see that FIRST underestimates these regions relative to FreeSurfer. Here is an image showing 5ttgen -hippocampi first in yellow with 5ttgen -hippocampi aseg in blue:

So I’m trying to understand how this issue will ultimately affect tckgen and tck2connectome. The gmwm interace from -hippocampi aseg and -hippocampi first end up being pretty similar, given that both subcortical and cortical grey matter are used to create this boundary. But I wasn’t sure if the incorrectly labelled voxels with FIRST could influence tckgen termination rules that differ between the cortex and subcortex? If so, is it better to use aseg? Or am I just being unreasonably pedantic?

And then I started wondering whether my choice of amyg/hippo segmentation in 5ttgen needs to align with the parcellations provided to tck2connectome. In other words, if I use -hippocampi first, do I need to use labelsgmfix -sgm_amyg_hipp? Alternately if I use -hippocampi aseg, can I use labelsgmfix -sgm_amyg_hipp? The subcortical parcels from FreeSurfer are still quite pixelated in this latter step, and I’m assuming that is because smoothing was not applied. But perhaps it does not matter so much that it is pixelated, given that tck2connectome is just trying to find the closest parcel within a given distance?

Thanks again!

Nandi

1 Like

I initially used -hippocampi first , and noticed a few voxels adjacent to the amygdala and hippocampus that are still labelled as cortical grey matter

I believe that I have observed similar in some circumstances myself. The issue is that the FreeSurfer white and pial surfaces do in fact separate from one another spatially at that location, and therefore in the process of mapping those two surfaces to partial volume images and using their difference as the cortical GM fraction there does end up being some erroneously-segmented voxels. What I’d need to do to fix this is to additionally read from the binary vertex masks generated by FreeSurfer to indicate which vertices are cortex and which are “false” vertices generated in order to provide closed surfaces, and modify the surface-to-image conversion process to take this into account, which is unfortunately quite clumsy and requires a decent amount of change. It would make my own life a lot easier if the two FreeSurfer surfaces simply didn’t diverge from one another spatially where there’s no cortex… :pleading_face:

When comparing this with the -hippocampi aseg flag, its easy to see that FIRST underestimates these regions relative to FreeSurfer.

I wouldn’t say “under-estimates”; personally I trust the FIRST segmentations moreso than aseg. “Estimates a smaller volume” maybe?

Also note that if you use the FreeSurfer hippocampal subfields module, 5ttgen hsvs will utilise its output. That’s probably the preferable of the three.

So I’m trying to understand how this issue will ultimately affect tckgen and tck2connectome. … If so, is it better to use aseg?

As long as the thickness of that erroneous “cortical” GM band is less than the maximum distance in the tck2connectome radial search maximum distance, streamlines that should actually be intersecting the hippocampus will still be assigned as such in either case, even if in one instance streamlines may project into the hippocampus whereas in the other they are terminated immediately. If there are any pathways that run parallel to the surface between the hippocampus and the WM, then there’s a chance that those streamlines may terminate prematurely in the former case whereas in the latter they will continue further through the WM.

And then I started wondering whether my choice of amyg/hippo segmentation in 5ttgen needs to align with the parcellations provided to tck2connectome. In other words, if I use -hippocampi first , do I need to use labelsgmfix -sgm_amyg_hipp ?

It’s preferable for the tissue segmentation for ACT and the parcellation for tck2connectome to not have gross discrepancies between them. The default assignment mechanism in tck2connectome does tolerate some mismatch at the cost of some false positives in other scenarios, but if you can use the same source of information for segmentation of a particular structure that’s almost certainly going to be preferable than using different ones. This is essentially the result shown in the appendix of this manuscript, which is where labelsgmfix came from.

Cheers
Rob

Nandi

I was just reading the FreeSurfer 7 changelog for another purpose and came across this:

The pial surface in the medial wall is now pinned to the white surface (ie, no more pial surfaces cutting through hippocampus/amygdala).

So it’s possible that re-running the same data through FreeSurfer 7 will alleivate the issue?

Rob

Thanks for the detailed explanation Rob! We have already processed our relatively large dataset (~400) through FreeSurfer 6.0 and thoroughly quality checked the output. So I’m reluctant to re-run everything through FreeSurfer 7.0. But perhaps I’ll look into adding hippocampal subfields, as you recommend. I’m also curious how I would go about testing whether the thickness of the erroneous cortical GM band is larger/smaller than the radial search maximum distance in tckconnectome? Is there a command or some tricks that would allow me to do this?