Hi Mrtrix3 community,
I’m new to MRtrix3 and tractography analysis, and I’d like to share my code with this community for feedback. Currently my data is a single shell diffusion (b value =1500).
Here are the following codes I have used so far:
-
Converting
mrconvert DICOM_dwi-64db1500-acc6_dir-PA_20240212123741_3.nii dwi_raw.mif -fslgrad dicom_dwi-64db1500-acc6_dir-PA_20230511121012_3.bvec dicom_dwi-64db1500-acc6_dir-PA_20230511121012_3.bval -
Denoising
dwidenoise dwi_raw.mif dwi_den.mif -noise noise.mif -
Calculating the difference between the raw and denoised images
mrcalc dwi_raw.mif dwi_den.mif -subtract residual.mif -
Unringing
mrdegibbs dwi_den.mif dwi_den_unr.mif –axes 0,1 -
Motion and distortion correction
a. mrconvert dicom_dwi-b0_acq-acc6_dir-AP_20230511121012_9.nii AP.mif
b. mrconvert AP.mif - | mrmath - mean mean_b0_AP.mif -axis 3
c. dwiextract dwi_den_unr_with_gradients.mif - -bzero | mrmath - mean mean_b0_PA.mif -axis 3
d. mrcat mean_b0_PA.mif mean_b0_AP.mif –axis 3 b0_pair.mif
e. dwifslpreproc dwi_den_unr_with_gradients.mif dwi_den_unr_preproc.mif -nocleanup -pe_dir PA -rpe_pair -se_epi b0_pair.mif -eddy_options " --slm=linear " -
Bias field Correction
dwibiascorrect ants dwi_den_unr_preproc.mif dwi_den_unr_preproc_unbiased.mif -bias bias.mif -
Brain mask estimation
dwi2mask dwi_den_unr_preproc_unbiased.mif mask_den_unr_preproc_unb.mif
In this step, the dwi2mask command did not work as well and had a few holes. I used the following steps to change the default setting.
mrconvert dwi_den_unr_preproc_unbiased.mif sub-02_unbiased.nii
bet2 sub-02_unbiased.nii sub-02_masked_0.3 -m -f 0.3
mrconvert sub-02_masked_0.3_mask.nii.gz mask_0.3.mif -
Response function estimation
dwi2response tournier dwi_den_unr_preproc_unbiased.mif wm.txt -mask mask_0.3.mif -voxels voxels.mif -
Estimation of Fiber Orientation Distributions
dwi2fod csd dwi_den_unr_preproc_unbiased.mif wm.txt wmfod.mif -mask mask_0.3.mif -
Intensity Normalization
mtnormalise wmfod.mif wmfod_norm.mif -mask mask_0.3.mif
For now this is what I have. Please let me know what you think.
Thank you for all your help.