-
Notifications
You must be signed in to change notification settings - Fork 0
NSB Pipeline for T1
- MRIQC
- Run MRIQC at the individual level - quantifies various measures of SNR in a T1 according
- Run MRIQC at the group level - identify outliers across these metrics
- Run Alex Holmes’ MRIQC PCA - identify the participants who are outliers across the metrics altogether
- Inspect the outlier data, remove if necessary
- FreeSurfer recon
- Run
recon-all
- Run
- FreeSurfer Euler function (a script for it can be found at
/projects/freesurfer_holmesQC/step1_autoQC/Step1c.euler.sh)- Run the Freesurfer euler function to identify participants with an excessive number of holes in their reconstructed surface mesh. This is used to identify participants where Freesurfer reconstruction is poor.
- Identify outliers in euler number
- Inspect outliers and remove data if necessary
- FreeSurfer recon inspection
- Depending on the amount and novelty of the data (e.g. maybe the T1 is collected using unusual parameters such as 7T Tesla MP2RAGE), you may want to inspect all/some of the reconstructed data.
- Inspect the data by loading the pial surfaces into Freesurfer along with the original anatomical data. If reconstruction was accurate, you should see that the tracings follow the grey/white matter boundaries in a predictable manner.
In the MP2Rage sequence, two T1 measurements are taken at slightly different inversions (typically ending in _inv1 and _inv2). These images are combined into one MP2RAGE image (a*_uni image). Combining images this way enhances grey and white matter tissue contrasts at the expense of increasing noise in the CSF, sinuses and air pockets around the subject. If we were to just pass the noisy uni image to Freesurfer, the algorithm would struggle to yield unbiased results because of the level of noise (e.g. tracing issues). We thus need to remove this noise using some method. Various methods are available:
- MP2Rage cleaning in SPM
- SUSAN in FSL
- Some github repositories claim to be able to automatically clean by introducing a scrubbing parameter
The best method of cleaning we have come across is the presurfer package - this creates a series of masks based on the non-noisy, high contrast inv2 image using AFNI to get a map of the CSF and the air outside of the skull, which is then applied to the unified image (since it is in the same space), thereby cutting out areas affected by problematic noise. The end result of presurfer is a skullstripped image - which the creators say is intended to be passed to Freesurfer for reconstruction. However, freesurfer requires a full head for accurate Talairach registration (you will also need intracranial volume estimation). Hence, we just use the full uni image once it has been noise scrubbed (includes brain and skull).
https://github.com/srikash/presurfer
To run presurfer, clone the repository into your utils directory. You may also need your own copy of spm12.
I set up my own presurfer function in a matlab file like below (ie. where s is a subject number ie. 10 for sub-10):
function Step2_presurfer_function(s)
addpath(genpath('~/kg98_scratch/Toby/utils/presurfer'))
addpath(genpath('~/kg98_scratch/Toby/utils/spm12'))
direc = fullfile(sprintf('~/kg98_scratch/Toby/WHOLEMBBP/workspace/DICOM_DIR/MRH106_MBBP%i_MR01', s));
cd(direc)
% MP2RAGE pre-processing Start-to-finish
UNI=fullfile(pwd, (sprintf('%i_uni_T1w.nii', s)));
INV2=fullfile(pwd, (sprintf('%i_inv2_T1w.nii', s)));
% ########################################################################
% STEP - 0 : (optional) MPRAGEise UNI
% ########################################################################
UNI_out = presurf_MPRAGEise(INV2,UNI); % Outputs presurf_MPRAGEise directory
% ########################################################################
% STEP - 1 : Pre-process INV2 to get STRIPMASK
% ########################################################################
presurf_INV2(INV2); % Outputs presurf_INV2 directory
% ########################################################################
% STEP - 3 : Pre-process UNI to get BRAINMASK
% ########################################################################
% Change UNI path to that of the MPRAGEised UNI if Step-0 was done
if exist('UNI_out','var')
presurf_UNI(UNI_out); % Outputs presurf_UNI directory
else
presurf_UNI(UNI);
end
% ########################################################################
% STEP - 4 : Prepare for Freesurfer
% ########################################################################
% Load the MPRAGEised UNI image and STRIPMASK in ITK-SNAP
% Clean the mask in the regions-of-interest and save
% Multiply the MPRAGEised UNI with the manually edited STRIPMASK
% Supply to recon-all
endI then typically call on the script from the command line e.g.
#Move to directory of the .mat file first then run. Make sure $s is set
matlab -nodisplay -r "cd('/home/tconstab1/kg98_scratch/Toby/WHOLEMBBP/workspace'); Step2_presurfer_function($s);exit"
Freesurfer has limbic reconstruction currently available (08/2023) - but we caution that this is still a work in progress. We hope that more research will become available on the accuracy of Freesurfer’s sclimbic.
- 0.0 Home
- 0.1 Neuroscience fundamentals
- 0.2 Reproducible Science
- 0.3 MRI Physics, BIDS, DICOM, and data formats
- 0.4 Introduction to Diffusion MRI
- 0.5 Introduction to Functional MRI
- 0.6 Measuring functional and effective connectivity
- 0.7 Connectomics, graph theory, and complexity
- 0.8 Statistical and Mathematical Tidbits
- 0.9 Introduction to Psychopathology
- 0.10 Introduction to Genetics and Bioinformatics
- 0.11 Introduction to Programming
- 1.0 Working on the Cluster
- 2.0 Programming Languages
- 2.1 Python
- 2.2 MATLAB
- 2.3 R and RStudio
- 2.4 Programming Intro Exercises
- 2.5 git and GitHub
- 2.6 SLURM and Job Submission
- 3.0 Neuroimaging Tools and Packages
- 3.1 BIDS
- 3.2 FreeSurfer
- 3.2.1 Qdec
- 3.3 FSL
- 3.3.1 ICA-FIX
- 3.4 Connectome Workbench/wb_command
- 3.5 fMRIPrep
- 3.6 QSIPrep
- 3.7 HCP Pipeline
- 3.8 tedana
- 4.0 Quality control
- 4.1 MRIQC
- 4.2 Common Artefacts
- 4.3 T1w
- 4.4 rs-fMRI
- 5.0 Specialist Tools
- 6.0 Putting it all together
- 7.0 Data management