MRtrix tutorial available on OSF


#22

Thanks zeydabadi,
As you mentioned, 5tt_noncoreg.nii.gz is a 4D volume. As 5tt_noncoreg.nii.gz is derived from T1_raw.mif (a 3D image), here should I have used T1_raw.mif (or nii.gz) instead of 5tt_noncoreg.nii.gz?
I have confirmed mean_b0_preprocessed.nii.gz is a 3D volume.


#23

I assume you should you use the 5tt_noncoreg.nii.gz but why it’s not in 3D, I don’t know. Maybe the Marlene can help.


#24

Thanks Mahmoud,
I think 5tt_noncoreg.nii.gz provided in Supplementary_Files have 5 volumes(, which means this is a 4D image), too. So I wonder I shouldn’t use 5tt_noncoreg.nii.gz here. Am I right? I would appreciate it if I could receive a comment from Marlene.


#25

Hi Mahmoud,

You can use labelconvert to do this. I show how to use this for the HCPMMP1 atlas in the tutorial. The procedure for the AAL atlas is very similar to this (section 8.1 in the appendix). However, a few things are different for the AAL atlas:

The AAL is – unlike the surface-based HCPMMP1 atlas – a volumetric atlas. This makes things easier for you since you do not have to do the FreeSurfer anatomical preprocessing in this case. However, you still have to register the AAL to the highresolution native T1 space in a first step (the AAL atlas is in standard space: MNI_152_2mm). There are several ways to do this, e.g. with MRtrix or FSL commands. I like to use FSL’s flirt tool for this. Here are a couple of commands with which you can achieve this (assuming you have done FSL’s anatomical preprocessing, which gave you a T1_biascorr_brain.nii.gz, and the AAL file in standard space is called “AAL.nii”):

flirt –in T1_biascorr_brain.nii.gz –ref $FSL_DIR/standard/MNI152_2mm_brain.nii.gz –omat highres2standard.mat –interp nearestneighbour –datatype int -inverse

convert_xfm –omat standard2highres.mat –inverse highres2standard.mat

flirt –in AAL.nii –ref T1_biascorr_brain.nii.gz –out aal2highres.nii.gz –applyxfm –init standard2highres.mat –interp nearestneighbour

You can then use labelconvert with the resultant file, e.g.

labelconvert aal2highres.nii.gz aalLUT_90_orig.txt aalLUT_90_ordered.txt aal2highres.mif

(In case you do not have these files, I uploaded the following three files on the OSF website: aalLUT_90_orig.txt, aalLUT_90_orig.txt, and AAL.nii. You can find those in the Supplementary Files directory here: https://osf.io/fkyht/files/. However, please note that the color lookup tables I provide are for the 90 parcellation AAL atlas, and I ask you to verify it before using it).

Regarding your second question,

I think using the AAL to identify the CST is not the way to go. I’m not an expert here, but aren’t there any atlases of white matter pathways? Alternatively, you could try to identify the CST in every of your subjects by tracking through a ROI (in the white matter) through which you know the CST must pass (e.g. how in section 4.4 in the tutorial, which shows how to use tckedit to identify the CST). However, this is a subjective procedure, so I recommend this only as an exploratory analysis. An atlas would be the preferrable option for a standardized analysis.

Hope this helps.

Cheers,
Marlene.


#26

Hi @tkimura,

the problem here is indeed the latest version of FSL (which I guess you have) expects a single 3D volume as a fieldmap (the old version would only read the first volume if the fieldmap was 4D; for another discussion on this see https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL;1e8be9c7.1811). One easy way around this is to split the 4D 5tt_nocoreg.nii.gz into 3D volumes. This can be achieved, e.g. with fslsplit:

fslsplit 5tt_nocoreg.nii.gz myprefix -t

This command will split the 5tt_nocoreg-image into 5 3D volumes, where “prefix” denotes the prefix of each of the volumes (like this, your outputs will be called “prefix0000.nii.gz” for the first 3D volume of 5tt_nocoreg, “prefix0001.nii.gz” for the second volume, etc.). Now you can use either of those 3D images with flirt, e.g.

flirt -in mean_b0_preprocessed.nii.gz -ref prefix0000.nii.gz -interp nearestneighbour -dof 6 -omat diff2struct_fsl.mat

I now this is a little complicated, but the best way I can think of right now. Let me know if you find a quicker way. However, I just ran these commands myself and can confirm that they work and that the resulting diff2struct_fsl.mat is correct.

Hope this helps.

Cheers,
Marlene.


#27

Hi Marlene,

Thanks for your helpful comment. Now command flirt works without error. But I checked the results and found that 5tt_noncoreg.mif has wrong direction (axial image has changed to saggital). As maybe I did something wrong, I will try to fix and let you know.

Takashi


#28

You definitely don’t want to be using the 5 separate tissue partial volume images for registration: apart from the fact that the registration algorithm may not be able to find a good alignment between an individual tissue image and a template T1-weighted image based on its internal image matching cost function, resulting in a bad alignment, doing this five separate times would give you five tissue images with five different transforms!

You want to perform the registration using the most appropriate images for such (e.g. T1-weighted image & mean b=0 image), and then apply the transformation that was optimised by the registration algorithm to any other images that you wish to undergo the same transformation. I.e. If your 5TT image is intrinsically aligned with the T1 image data (given it was calculated from such), and you then estimate a transformation that aligns the T1 image with the DWI data, then applying that same transformation to the 5TT image will make those data also align with the DWIs.