|
Size: 2039
Comment: replaced tkmeditColorsCMA with FreeSurferColorLUT.txt
|
Size: 2017
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| Line 4: | Line 3: |
| *To follow this exercise exactly be sure you've downloaded the [wiki:Self:FsTutorial/Data tutorial data set] before you begin. If you choose not to download the data set you can follow these instructions on your own data, but you will have to substitute your own specific paths and subject names. | |
| Line 7: | Line 7: |
| The cortical and subcortical segmentations automatically generated by freesurfer can be mapped into the functional space, which can be useful for doing region of interest (ROI) analysis. There are two commands to perform this: aseg2feat (subcortical) and aparc2feat (cortical). Information about them can be obtained by running them with --help. To run them on the bert functional data, run: | The cortical and subcortical segmentations automatically generated by freesurfer can be mapped into the functional space, which can be useful for doing region of interest (ROI) analysis. This can be done with aseg2feat: |
| Line 9: | Line 9: |
| aseg2feat --feat fbert.feat | aseg2feat --feat fbert.feat --aseg aparc+aseg |
| Line 12: | Line 12: |
| {{{ aparc2feat --feat fbert.feat }}} The these commands will create three files in fbert.feat/reg/freesurfer: aseg.img, lh.aparc.img, and rh.aparc.img. These are segmentations, meaning that each voxel has an integer value that corresponds to a particular structure. The mapping from structure number to name for aseg (subcortical) is given in ${FREESURFER_HOME}/FreeSurferColorLUT.txt. For aparc (cortical), it can be found in ${FREESURFER_HOME}/Simple_surface_labels2005.txt. |
This command will create fbert.feat/reg/freesurfer/aparc+aseg.nii.gz. These are segmentations, meaning that each voxel has an integer value that corresponds to a particular structure. The mapping from structure number to name is given in ${FREESURFER_HOME}/FreeSurferColorLUT.txt. |
| Line 21: | Line 18: |
| avwmaths ./fbert.feat/reg/freesurfer/aseg.img \ | avwmaths ./fbert.feat/reg/freesurfer/aparc+aseg.nii.gz \ |
| Line 23: | Line 20: |
| ./fbert.feat/reg/freesurfer/lh.putamen.img | ./fbert.feat/reg/freesurfer/lh.putamen.nii.gz |
| Line 27: | Line 24: |
| tkmedit bert orig -aux brain \ -overlay ./fbert.feat/reg/freesurfer/lh.putamen.img \ |
tkmedit bert orig.mgz -aux brain.mgz \ -overlay ./fbert.feat/reg/freesurfer/lh.putamen.nii.gz \ |
| Line 31: | Line 28: |
| -segmentation ${SUBJECTS_DIR}/bert/mri/aseg \ | -segmentation ${SUBJECTS_DIR}/bert/mri/aparc+aseg.mgz \ |
[wiki:FsTutorial top] | [wiki:FsTutorial/FslFeatFreeSurfer previous]
Mapping automatic segmentations to the functional space
To follow this exercise exactly be sure you've downloaded the [wiki:FsTutorial/Data tutorial data set] before you begin. If you choose not to download the data set you can follow these instructions on your own data, but you will have to substitute your own specific paths and subject names.
1.0 Mapping the segmentations
The cortical and subcortical segmentations automatically generated by freesurfer can be mapped into the functional space, which can be useful for doing region of interest (ROI) analysis. This can be done with aseg2feat:
aseg2feat --feat fbert.feat --aseg aparc+aseg
and This command will create fbert.feat/reg/freesurfer/aparc+aseg.nii.gz. These are segmentations, meaning that each voxel has an integer value that corresponds to a particular structure. The mapping from structure number to name is given in ${FREESURFER_HOME}/FreeSurferColorLUT.txt.
2.0 Creating binary masks
The segmentation for a particular structure can be extracted to create a binary mask (i.e., a volume where the voxel value is 1 if it is in the structure and 0 otherwise). To make a binary mask of the left putamen, which has been assigned label 12 (see ${FREESURFER_HOME}/FreeSurferColorLUT.txt), use the following command:
avwmaths ./fbert.feat/reg/freesurfer/aparc+aseg.nii.gz \
-thr 12 -uthr 12 \
./fbert.feat/reg/freesurfer/lh.putamen.nii.gzTo view this binary mask on the anatomical:
tkmedit bert orig.mgz -aux brain.mgz \
-overlay ./fbert.feat/reg/freesurfer/lh.putamen.nii.gz \
-overlay-reg ./fbert.feat/reg/freesurfer/anat2exf.register.dat \
-fthresh 0.5 -fmid 1 -fslope 1 \
-segmentation ${SUBJECTS_DIR}/bert/mri/aparc+aseg.mgz \
${FREESURFER_HOME}/FreeSurferColorLUT.txtYou should see the image below:BR attachment:tkm-lh.putamen-cor-128-small.jpg
