Difference between revisions of "Cortical Thickness"

From Brain Development & Education Lab Wiki
Jump to: navigation, search
Line 3: Line 3:
 
Page describing how we analyze cortical thickness with freesurfer
 
Page describing how we analyze cortical thickness with freesurfer
  
 +
==Create a T1 weighted nifti image for the subject==
 
Step 1: In a terminal, convert the PAR/REC files to nifti images. You may not need to do this if you have already gone through the [[Anatomy_Pipeline|Anatomy Pipeline]]
 
Step 1: In a terminal, convert the PAR/REC files to nifti images. You may not need to do this if you have already gone through the [[Anatomy_Pipeline|Anatomy Pipeline]]
 
  cd /home/projects/MRI/[subid]
 
  cd /home/projects/MRI/[subid]
 
  parrec2nii -c -b *.PAR
 
  parrec2nii -c -b *.PAR
Step 2: In MATLAB compute the root mean squared (RMS) image and then ac-pc align. If a subject has multiple images then the rms operation should be run on each image and then a cell-array with paths to all the images can be pushed through mrAnatAverageAcpcNifti resulting in a very nice anatomy
+
Step 2: In MATLAB compute the root mean squared (RMS) image. Once again this might have already been done in the [[Anatomy_Pipeline|Anatomy Pipeline]] so you can re-use that RMS image
 
  T1path = 'Path to t1 weighted image';
 
  T1path = 'Path to t1 weighted image';
 
  T1path = mri_rms(T1path); % Root mean squared image
 
  T1path = mri_rms(T1path); % Root mean squared image
im = niftiRead(T1path); % Read root mean squared image
 
voxres = diag(im.qto_xyz)'; % Get the voxel resolution of the image (mm)
 
mrAnatAverageAcpcNifti({T1path}, '/home/projects/anatomy/[subid]/t1_acpc.nii.gz', [], voxres(1:3))
 
  
 
==Freesurfer Segmentation==
 
==Freesurfer Segmentation==
 
Freesurfer is a useful tool for segmenting a T1-weighted image and building a cortical mesh. To segment the subject's T1-weighted image using freesurfer from the command line type:
 
Freesurfer is a useful tool for segmenting a T1-weighted image and building a cortical mesh. To segment the subject's T1-weighted image using freesurfer from the command line type:
 
  recon-all -i /home/projects/anatomy/[subid]/t1_acpc_.nii.gz -subjid [subid] -all
 
  recon-all -i /home/projects/anatomy/[subid]/t1_acpc_.nii.gz -subjid [subid] -all
Or even better use this handy matlab function written by Jon Winawer to run freesurfer and then also build some useful files that we like to use for data visualization such as a high resolution gray/white segmentation.
 
fs_autosegmentToITK([subid], '/home/projects/anatomy/[subid]/t1_acpc.nii.gz')
 

Revision as of 21:33, 2 November 2015

Page describing how we analyze cortical thickness with freesurfer

Create a T1 weighted nifti image for the subject

Step 1: In a terminal, convert the PAR/REC files to nifti images. You may not need to do this if you have already gone through the Anatomy Pipeline

cd /home/projects/MRI/[subid]
parrec2nii -c -b *.PAR

Step 2: In MATLAB compute the root mean squared (RMS) image. Once again this might have already been done in the Anatomy Pipeline so you can re-use that RMS image

T1path = 'Path to t1 weighted image';
T1path = mri_rms(T1path); % Root mean squared image

Freesurfer Segmentation

Freesurfer is a useful tool for segmenting a T1-weighted image and building a cortical mesh. To segment the subject's T1-weighted image using freesurfer from the command line type:

recon-all -i /home/projects/anatomy/[subid]/t1_acpc_.nii.gz -subjid [subid] -all