Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structural Diffusion Weighted Imaging: mrtrix3 - Mohamad #138

Open
rkotikalapudi opened this issue Jan 20, 2023 · 2 comments · May be fixed by #157
Open

Structural Diffusion Weighted Imaging: mrtrix3 - Mohamad #138

rkotikalapudi opened this issue Jan 20, 2023 · 2 comments · May be fixed by #157
Assignees

Comments

@rkotikalapudi
Copy link

Example dataset to run for the mrtrix3

@rkotikalapudi
Copy link
Author

rkotikalapudi commented Jan 20, 2023

@mhmadAbs @spisakt
Aim: We need a dedicated Diffusion Weighted Imaging (DWI) processors (modules), that one can integrate to make a systematic DWI-data processing streamline.

What are we dealing with? At the umbrella level, DW images are a stack of 3D brain volumes (4D), that gives useful information on how different regions are of the brain (gray matter ROIs) are connected, i.e. each ROI is a 'node', and each connection is an 'edge' at the graph network level. And the idea is to input the 4D images, and obtain the graph network (i.e., a matrix with nodes and edges). If you have 20 brain regions, you get a 20 x 20 matrix, and so on.

Task 1. Any image is a signal, that is assumed to be corrupted with noise (i.e., confounded by noise). So, here we implement some noise-correction methods (google search key words: eddy correction in DTI, mrtrix3 dwidenoise, mrtrix3 mrdegibbs, etc).

Steps in the Task 1 (each subsequent step's input is a dependency)
Outline = eddy_correct > dwidenoise > degibbs and make a binary mask after running the first three steps.

  • input raw image, in = BIDSDir/sub-001/dwi/sub-001_dwi.nii.gz
  • eddy_correct the raw image (use eddy_correct), out = BIDSDir/derivatives/mrtrix3/sub-001/sub-001_dwi_eddy-correct.nii.gz
  • convert raw image to .mif (a format mrtrix3 understands: use mrconvert), out = BIDSDir/derivatives/mrtrix3/sub-001/sub-001_dwi_eddy-correct.mif
  • perform denoising (use dwidenoise -check the command), out = BIDSDir/derivatives/mrtrix3/sub-001/sub-001_dwi_eddy-correct_dwidenoise.mif
  • perform correction for Gibbs artefact (use mrdegibbs), out = BIDSDir/derivatives/mrtrix3/sub-001/sub-001_dwi_eddy-correct_dwidenoise_degibbs.mif
  • create a binary mask of the output from step 'd', out = BIDSDir/derivatives/mrtrix3/sub-001/sub-001_dwi_eddy-correct_dwidenoise_mask.mif

Few tips

  1. DWI data consists of a minimum of 3 informations: images, bvals (text files with numbers e.g. 0 1000 0 1000 1000 ), bvecs ([x,y,z coordinates] for each of the bval numbers). If you find more than one DWI image for the same 'session, e.g, ses-BL' and 'same run e.g. ses-BL_run-1' (which is not the case with the dataset link I provide below) simply pick the image that has the largest memory size.
  2. use this dataset available to download for free: https://openneuro.org/datasets/ds003097/versions/1.2.1 (to explore the BIDS structure and the data), most important from this is, e.g., sub-0001/anat, sub-0001/dwi (img, bval, bvec)
  3. nilearn has mrtrix3. You can already try to run the Task 1, and check if the code runs successfully.
  4. there is an mrtrix3 docker available. if you check the docker, all the dependency softwares will be much clearer (ants, fsl, freesurfer, etc).

@rkotikalapudi rkotikalapudi changed the title introduction to mrtrix3 pipeline - Mohamad Structural Diffusion Weighted Imaging: mrtrix3 - Mohamad Jan 20, 2023
@mhmadAbs mhmadAbs self-assigned this Feb 7, 2023
@rkotikalapudi
Copy link
Author

rkotikalapudi commented Mar 16, 2023

@mhmadAbs @spisakt
Task 2 - Structural T1w-processing - Part of the anatomical (anat) preprocessing
DWI processing will use the derivatives from this task.

Recap - In Task 1, we performed artifact correction on DWI images (e.g., sub-001.dwi.nii.gz). These correction steps included, 1. eddy correction, 2. denoise, 3. degibbs, and 4. creation of a brain mask from the artifact corrected image.

Why do we need Task 2?
Referring to Task 1 (section - What are we dealing with?), we need to obtain ROIs that are gray matter regions (cortical and sub-cortical), which will later be used to build the connectome matrix.

Preprocessing steps:

  1. Obtain the corresponding T1w image.
  2. Perform image segmentation. For image segmentation, there are two options i.e., using a software to generate segmentation or using an already available brain atlas. Software include: a) FastSurfer, b) FreeSurfer, c) brain atlases e.g., AAL (explore few more options). The most preferred way that is also less expensive will be to use a) and c). With correct multi-threading step b) can take ~4 hours, while a) can take ~1 hour. Also, step b) will be important for other structural analyses.

Few links:
FastSurfer: https://github.com/Deep-MI/FastSurfer
FreeSurfer: https://www.freesurfer.net/
Atlases: https://www.gin.cnrs.fr/en/tools/aal/

@mhmadAbs mhmadAbs linked a pull request Apr 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants