AFQ tract segmentation using MRtrix3 WB tractography


#1

Hello MRtrix3 Community,

I’m wondering if anyone has experience working with MRtrix3 and AFQ. I have data that I preprocessed and conducted whole brain tractography for using MRtrix, and I would like to use AFQ to do tract segmentation. Does anyone have tips for creating the dt6.mat file required for AFQ based on data preprocessed in MRtrix?
Any guidance would be appreciated.

Thank you!
Meaghan


#2

Hi Meaghan,

I’m no expert, but I have successfully used AFQ with MRtrix3 before, so I’ll share what I know.

Creating a dt6.mat file should precede whole brain tractography. To create a dt6 file, you need a T1 image in ACPC and the corresponding diffusion scans, then you register the diffusion scans to the T1 image using dtiInit function in MrVista. This step produces the dt6 file you’re looking for.

After running dtiInit, you can then use the T1-registered diffusion scans with MRtrix to perform whole brain tractography. Once that’s done, the produced .tck file can then be fed into the AFQ pipeline, along with the corresponding dt6 file.

Hope that helped!

Cheers,
Joe


#3

Hi Joe,

Thanks for your response!
To make sure I understand, do I need to create the dt6 files before both preprocessing and whole brain tractography? Once I derive the dt6 file, can I run it through the standard mrtrix preprocessing pipeline, or does dtiInit accomplish some of the preprocessing steps as well?

Many thanks,
Meaghan


#4

Hey,

I’m assuming by “preprocessing” you mean motion, eddy current and susceptibility artifact correction? If that’s the case, then it depends on which program you want to use to preprocess your data.

dtiInit is capable of correcting motion and eddy current artifacts, but not susceptibility artifacts. You can use FSL’s topup function to correct susceptibility artifacts (if your data allows it), and then do the rest in dtiInit. Personally, I prefer to do all preprocessing using FSL and then use dtiInit only for aligning my preprocessed data to the T1 images. Alternatively, you can do your preprocessing using mrtriix if you want, but as far as I know it uses FSL functions anyway, so it really makes no difference.

So, the order I would suggest is: preprocess your data (in FSL directly or through mrtrix), then align your preprocessed data to T1 data using dtiInit, then use the aligned and preprocessed data for whole brain tractography. You definitely don’t want to align uncorrected data!

I would suggest quickly going through the dtiInit and MrDiffussion wikis just to get an idea of what dt6 files are and how they work.

Hope that made sense!

Cheers,
Joe


#5

Hi Joe,

This makes sense and seems to fit with what I’m trying to do. I have the data preprocessed through mrtrix/FSL, so I’ll use the outputs from that for dtiInit, and then go from there with the tractography.

Thanks!
Meaghan


#6

No worries. Glad I could be of help :slight_smile:

One last thing, make sure the bvecs produced by dtiInit are not flipped on any of the axes. For some reason, whenever I tried to align my diffusion data using dtiInit, the bvecs produced would be flipped on the x-axis. Not sure if that’s an issue with dtiInit, or if was a problem specific to my data, but just thought I should give you a heads up. Good luck!


#7

This could be the same bug that affected MRtrix3 until recently. It’s very subtle, and was not fully documented on the FSL wiki until we figured out the problem with Mark Jenkinson and issued the fix – I wouldn’t be surprised if other software packages were also affected by this… If you’re convinced there’s an issue in dtiInit, I think it would be worth reporting this to the MrVista developers.


#8

Hi Joe,

I’ve been reading more into the DtiInit processing on the Vistasoft wiki, and it seems that if I run the whole dtiInit process on my data, it will try to conduct preprocessing such as eddy correction, etc., which I have already completed in FSL. Do you just use dtiInitAlign on the data you have already preprocessed in FSL?
What is your motivation for doing this rather than using the dtiMakeDt6FromFsl option?

I appreciate your help as I’m trying to explore my options for this type of processing and analysis.

Thank you!
Meaghan


#9

Hey,

I haven’t used dtiInit in a while, so I don’t remember the exact details. What I do remember is that one of the parameters that you have to set before running dtiInit (named eddyCorrect, I believe) gives you 3 different options for correcting your data: 1 for eddy and motion correction, 0 for correcting only one of them (can’t remember which), and -1 for no correction at all. I set it to -1.

I don’t remember using a separate function for only aligning the data, but then I again maybe I didn’t need to use dtiInit and one of these functions would have sufficed. I really can’t help you there, I was pretty much following a pipeline set up by someone else, so I didn’t really explore that much. There’s a good chance the functions I used are outdated by now, I really can’t tell.

That being said, the general idea is still the same, preprocess data, align to T1, perform whole brain tractography, then run AFQ.

Sorry I couldn’t be of more help. I’m sure there’s some message board for MrVista/AFQ where you could get more help. Good luck!

Cheers,
Joe