5tt file, mouse brain, tracts detected only in the subcortical gray matter

Dear experts,
my objective is to do tractography in mouse brain using your software but I am able to detect tracts only located the subcortical gray matter:

I have the impression that the problem is in the 5TT file that I built by myself, however, since I am not an expert, I will summarize here what I have done counting on your help.
I follow more or less the step described in the HCP tutorial.

DIFFUSION IMAGE PREPROCESSING

mrconvert data.nii.gz DWI.mif -fslgrad bvecs bvals -datatype float32 -stride 0,0,0,1

dwi.mif generated:

dwi2mask:

dwi2response -nthreads 8 DWI.mif response.txt -mask mask.mif
response.txt: 155223424 -39325424 9820988 -1983875.25

dwi2fod -nthreads 8 DWI.mif response.txt csd.mif -mask mask.mif

csd.mif volume 0:

csd.mif, volume1:

The csd file is composed of 28 volumes, and if I well understand, this means that I have 28 different spherical harmonic components, is it reasonable?

STRUCTURAL IMAGE PROCESSING:

I built by myself the 5TT file (that you can find attached here) and I registered it in the diffusion space (also if I think that it is not strictly necessary). Respecting the instruction that I found in your documentation, the 5TT file is a 4D 32 bit floating image, where the dimension of the 4th axis is five: here there are the images of the overlap between the dwi.mif file and the 5 volumes of the 5TT file that I built:

Volume0: cortical gray matter

Volume1: subcortical gray matter

Volume2: white matter

Volume3: CSF

Volume4: pathological tissue

mrconvert 5TTfile_diffusionSpace.nii.gz 5TTfile.mif5tt2gmwmi 5TTfile.mif gmwmi.mif

Here it is the overlap between dwi and gmwmi

CONNECTOME GENERATION:
tckgen -nthreads 8 -num 500000 -seed_gmwmi gmwmi.mif -act
5TTfile_diffusionSpace.mif -mask mask.mif -unidirectional -maxlength 100000 -step 0.05 csd.mif brain.tck
(I know that I used big values for -num, -maxlength and -step, but was to exclude that was that one the problem)
tcksift brain.tck csd.mif brain-sift.tck -act 5TTfile_diffusionSpace.mif

Here it is the overlap between brain-sift.tck and dwi:

It seems that the algorithm detects tracts only in volume 1 of the 5tt file, where am I wrong?

The problem is solved when I use as seed image for tckgen the dwi mask (as described in your documentation in the tutorial Basic DWI processing):

Please find here https://www.dropbox.com/sh/knxoj5wnfoekpvb/AADP8E0nQaMZESoi4UJWzGZqa?dl=0 the 5TT file that I used.

Thanks in advance for your time,

Francesca

Hi Francesca,

Okay, a lot to get through here…
buckles seat belt
These may not come out in any particular order, so just bear with me.

  • ACT with EPI distortions: From the signal pileup (bright strips) I see, it looks like you don’t have the necessary data for performing EPI susceptibility distortion correction. This is generally considered a prerequisite for applying ACT, since otherwise you cannot guarantee that image data from the same anatomy is being accessed from both images for any given point in space. I don’t know how isolated these inhomogeneities are for in vivo mouse imaging, it might only be a localised effect, but it’s something to consider nonetheless.

  • dwi2response version: If the command you have quoted is precisely what you specified at the command line, then it looks like you’re using an out-of-date MRtrix3 installation. In the current version, dwi2response is a script rather than a binary command, with slightly different usage. More importantly, the recommended algorithm differs from that used in the older binary version, since the latter was observed to misbehave in a number of scenarios. So I would strongly recommend updating your MRtrix3 and re-trying your processing pipeline from the very beginning.

  • bvecs / bvals import: Eyeballing your tracking data in the absence of much detailed mouse brain anatomical knowledge, it’s possible that the gradient table imported from these files is being interpreted incorrectly. This can most certainly occur if your MRtrix3 version is earlier than 0.3.14, which I believe is the case given the prior point regarding dwi2response. If you have access to the raw data from the scanner, you can try converting directly to .mif rather than going first to .nii / bvecs / bvals and then to .mif. But even if that works I would update your MRtrix3 installation anyway :smiley:

The csd file is composed of 28 volumes, and if I well understand, this means that I have 28 different spherical harmonic components, is it reasonable?

Yes, that’s correct: 28 volumes corresponds to lmax=6. All but the first volume don’t make much sense to visualise as scalar maps; it’s better to use the ODF tool in mrview to visualise these data. This would also give more clues as to whether or not the diffusion gradient table is a problem: if it is, the ODF glyphs won’t align properly with the expected fibre directions.

I built by myself the 5TT file (that you can find attached here) and I registered it in the diffusion space (also if I think that it is not strictly necessary).

If your animal is secured stereotactically, and your scanner calibrates its resonance frequency properly, then there’s a good chance that there won’t be any appreciable translations or rotations between DWI and anatomical scans. You would however want to be confident that this is indeed the case before omitting an explicit registration step from your processing chain.

  • Using ACT in mouse brain: Rather than trying to precisely duplicate the HCP pipeline, I would more carefully consider what methods are appropriate to use given the data you are dealing with. Probably the primary strength of ACT is constraining streamline propagation to the white matter (with the exception of limited propagation into sub-cortical grey matter structures); however this is based on human data, where the white matter is large in volume, sub-cortical grey matter structures are comparatively small, and terminating streamlines precisely at the interface between cortical grey matter and white matter gives accurate information about which area of the cortex that streamline should be associated with. In your data, the white matter is extremely thin, so streamlines are unlikely to make it very far before they exit the white matter. Also, there are no streamlines in the cortical GM since they are terminated as soon as they enter it; but there exists significant oriented structure within this tissue that can be tracked.
    I would try two things here:
    • Add your ‘cortical GM’ segmentation to the ‘sub-cortical GM’ volume, and use an empty volume for the ‘cortical GM’ component of the 5TT image. This will allow streamlines to propagate into this tissue.
      (Note: This also works for allowing tracking into the cortex for human images…)
    • Simply try tracking without ACT. You may find that for your data, it introduces more problems than it solves. You could still use the CSF volume as an exclusion mask for tracking.

It seems that the algorithm detects tracts only in volume 1 of the 5tt file, where am I wrong?

You should find that streamlines overlap with volumes 1 and 2 of your 5TT image. This is precisely what ACT is designed to do: Permit streamlines propagation only within white matter, and into sub-cortical white matter structures. The problem is probably that the behaviour of ACT, which was designed with human data in mind, contradicts your expectations of what should be reconstructed in a mouse brain.

The problem is solved when I use as seed image for tckgen the dwi mask (as described in your documentation in the tutorial Basic DWI processing)

I think you’ll find that the key difference in these results is not the difference in streamline seeding, but that you have not used ACT.

wipes brow

Phew, wasn’t that fun?!

I would start with an MRtrix3 update and some basic whole-brain non-ACT tracking to make sure that your gradient table is correct and the FODs are pointing in the right directions. From there you can start experimenting with different aspects of processing / reconstruction to see what works for you.

Cheers
Rob

1 Like

Thank you very much Rob for this race :slight_smile: now I will need time to do the racetrack step by step

However I already have a question before starting my walk:

I did not get if you suggest to

  • not use ACT since it is designed for human and so it will not work in mouse since the proportion of sub-cortical GM and WM in human and mouse is significantly different
  • not use ACT since the images that I show you are not corrected for distortion.

In the second case we could fix the problem by acquiring 2 b=0 images with the appropriate phase encoding and we will apply the dwipreproc using the -rpe_pair option (as described in https://mrtrix.readthedocs.io/en/0.3.16/workflows/act.html?highlight=act) in order to correct the image distorsion, isn’t it?

Thanks again,
Francesca

Colleague of Francesca’s here, amazing response Rob, thanks very much for the info. A few quick comments / questions:

As a reference, the results reported by Francesca are for mrtrix3 git hash 02ff4a8a40c8 which is mid May last year. I had set it up on our cluster and forgot to update…

For EPI distortion correction, we need a two-pass protocol (AP, PA), right? For the moment, I’m pretty sure that’s not being done, but maybe it can be.

As you suggest, we’ll start over with the non-ACT tracing and work on from there.

I did not get if you suggest to

  • not use ACT since it is designed for human and so it will not work in mouse since the proportion of sub-cortical GM and WM in human and mouse is significantly different
  • not use ACT since the images that I show you are not corrected for distortion.

In general I advise against using ACT if the susceptibility distortions are not corrected, based on the observed magnitude of those distortions in human data and the resulting mismatch with a corresponding anatomical image. I do not however have enough experience with animal data to know whether or not these distortions have a sufficient magnitude to render ACT unusable if the distortions are not corrected.

Whether or not ACT is appropriate for mouse data is a secondary question; so I guess the two are compounded. I would compare with and without to see if it’s actually doing anything for you; and if you do continue to use it, I would suggest placing all GM segmentation into volume 1 rather than volume 0, so that streamlines are allowed to propagate into the cortex.

In the second case we could fix the problem by acquiring 2 b=0 images with the appropriate phase encoding and we will apply the dwipreproc using the -rpe_pair option (as described in Anatomically-Constrained Tractography (ACT) — MRtrix 3.0 documentation ) in order to correct the image distortion, isn’t it?

For EPI distortion correction, we need a two-pass protocol (AP, PA), right? For the moment, I’m pretty sure that’s not being done, but maybe it can be.

Yes, that’s generally the recommended method. If you have control over the acquisition I would definitely add that to your protocol: it doesn’t take much time but can improve reconstruction accuracy considerably.

As a reference, the results reported by Francesca are for mrtrix3 git hash 02ff4a8a40c8 which is mid May last year. I had set it up on our cluster and forgot to update…

Out of 4951 total commits, you’re 2654 commits behind. You’re basically on MRtrix2.5 :laughing:

Dear Francesca,
I am currently trying manually segmentation for mouse brain to create 5tt file. However I got problem with identify WM, GM, sub-cortical GM. How did you deal with that?
I based on a atlas and a segmentation results retrieved from internet, but that’s not enough for accurately segmentation.
And Could you describe more about how to create 4D 5TT file?

Hi Trang,

If you’re trying to construct a 5TT file from some other source of segmentation, you simply need to perform the appropriate image operations to ensure that the result conforms to the expectations of the 5TT format. This will likely involve some form of volume concatenations, but the particulars will depend on the exact formatting of the data you have.

Rob