Set of various tools for ordering and processing MRI data!
Also check my code for some basic R plots.
- DICOM to BIDS
- DWI pre-Processing
- Vector Correction for DWI data
- Freesurfer pre-processing
- Connectome Prediction Modeling CPM
- rois_volume.R
Example script to order a set of sorted DICOMS into BIDS (https://bids.neuroimaging.io).
Gorgolewski, Krzysztof J., et al. "The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments." Scientific data 3.1 (2016): 1-9. DOI: https://doi.org/10.1038/sdata.2016.44.
Pipeline for preprocessing Diffusion Weighted Images (DWI). I makes vector correction, denoise, bias field correction, motion and geometric distortion correction. It uses multiple tools such as: ants, fsl, mrtrix...
vector_corr
is a handy script to undestand the steps for correcting the diffusion vectors (bvecs) when the acquisition matrix is angled.
This requires and updated version or mrtrix, the transformation matrix from the acquisition of the DWI (omat), bvecs and bvals in column format, and the text file of corrected.eddy parameters obtained after topup/eddy from FSL.
- Check the code in the directory /vector_corr
Reference: Leemans, A., & Jones, D. K. (2009). The B‐matrix must be rotated when correcting for subject motion in DTI data. Magnetic resonance in medicine, 61(6), 1336-1349.
A practical guideline for preprocessing T1 weighted images with FreeSurfer. For further information and details check the official webpage here.
- This guideline requires the previous installation of Advance Normalization Tools (ANTs), FreeSurfer, and minc-toolkit.
- You can find the tutorial in /Freesurfer_preprocessing.
This is the R implementation (originally in matlab) of a connectome-based predictive modelling to predict individual behaviour from brain connectivity as described by Shen et al..
The original code in matlab can be found in this link.
I used this method with real structural data and a behavioural variable without succes, so included an ideal example of how this method would work if you have a strong linear relations between the connectomes Wij and a cognitive feature.
- All data an a matlab script for validation of the R implementation can be found here: /R_connectome_prediction_modelling
Reference: SHEN, Xilin, et al. Using connectome-based predictive modeling to predict individual behavior from brain connectivity. nature protocols, 2017, vol. 12, no 3, p. 506-518..
R script with a function that counts the number of voxels per ROI of a NIFTI file. For example a segmentation. It uses the R package oro.nifti
.