Authors: Luis C Sanmiguel, Soetkin Beun, Liza Vanhauwaert, Pim Pullens, Patricia Clement.
Pipeline Code to:
- Sort DICOM images with DICOM sort.
- Convert DICOM images to .nii.
- [Human]:
- Use Freesurfer to create a 3D map of the brain.
- Use FSL to register ASL and M0 images with the Freesurfer output.
- [QASPER]:
- Use FSL to register ASL and M0 images.
- Compare perfusion values for Human and QASPER in different sessions using Python.
- FSL - FMRIB Software Library and FreeSurfer.
- DICOM Sort.
- Software to convert DICOM to NIfTI (suggested).
- Python/Jupyter Notebook.
- Suggested: use Neurodesk.
Deface step:
mri_deface T1_mprage_SX.nii talairach_mixed_with_skull.gca face.gca t1_mprage_defaced_SX.niirecon-all: Creates a 3D map of the brain, identifying where gray and white matter are located (using the T1_mprage as input).
recon-all -s subject1_0X -i T1_mprage_sX.nii -allmri_convert Changes file formats so different software programs can read the brain maps.
mri_convert subject1_0X/mri/brain.mgz subject1_0X/mri/brain.nii.gzflirt Performs an initial "rough" alignment to get the ASL and T1 images into the same neighborhood.
flirt -in subject1_0X/M0X.nii -ref subject1_0X/mri/brain.nii.gz -omat subject1_0X/init1.mat -dof 6 -cost mutualinfobbregister Fine-tunes the alignment by matching the ASL image specifically to the boundary between gray and white matter.
bbregister --s subject1_0X --mov subject1_0X/M0X.nii --reg subject1_0X/initX.mat --o subject1_0X/cM0X.nii.gz --t2lta_convert Translates the alignment "instructions" into a format FreeSurfer understands.
lta_convert --inreg subject1_0X/initX.mat --src subject1_0X/M0X.nii --trg subject1_0X/mri/T1.mgz --outlta subject1_0X/fmriX_to_T1.ltamri_vol2vol Moves the ASL data into the T1 anatomical space using those alignment instructions
mri_vol2vol --mov subject1_0X/ASLX.nii --targ subject1_0X/mri/T1.mgz --lta subject1_0X/fmriX_to_T1.lta --o subject1_0X/cASLX.nii.gz --interp trilinearmri_convert Exports the final tissue segmentation (the labels for GM/WM) into a standard format for data extraction.
mri_convert subject1_0X/mri/aseg.mgz subject1_0X/asegX.nii.gzflirt (Step 1): Compares the "calibration" image from the X session to the first session to calculate exactly how the subject's “head” moved (the "map" of the shift).
flirt -in ScanX/M0X.nii -ref Scan1/M01.nii -omat ScanX/scanX_to_scan1.mat -dof 6 -out ScanX/cM0X.nii.gzflirt (Step 2): Uses that "map" to physically move the actual perfusion (ASL) data from the X session so it overlaps perfectly with the first session.
flirt -in ScanX/ASLX.nii -ref Scan1/M01.nii -applyxfm -init ScanX/scanX_to_scan1.mat -out ScanX/cASLX.nii.gz
