|
Size: 2884
Comment: missing edit-log entry for this revision
|
Size: 4708
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| == Overlaying FSL Feat statistical maps == | |
| Line 3: | Line 4: |
| == Overlaying FSL Feat statistical maps == | *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 13: | Line 14: |
| Use the following command to display the zmap (zstat1.img) overlaid onto the bert's orig volume. It will display the automatic segmentation, and will also set the threshold at z = 1.3: | Use the following command to display the zmap (zstat1.img) overlaid onto the bert's orig volume. It will display the automatic segmentation, and will also set the threshold at z = 2.3: |
| Line 15: | Line 16: |
| tkmedit bert orig -aux brain -overlay ./fbert.feat/stats/zstat1.img \ -overlay-reg ./fbert.feat/reg/freesurfer/anat2exf.register.dat \ -fthresh 1.3 -fmid 2.3 -fslope 1 \ -segmentation ${SUBJECTS_DIR}/bert/mri/aseg ${FREESURFER_HOME}/tkmeditColorsCMA |
tkmedit bert orig.mgz lh.white -aux brain.mgz \ -overlay ./fbert1.feat/stats/zstat1.nii.gz \ -overlay-reg ./fbert1.feat/reg/freesurfer/anat2exf.register.dat \ -segmentation aparc+aseg.mgz -fthresh 2.3 -fmax 4.3 |
| Line 22: | Line 23: |
| attachment:tkm-zstat1-cor-128-small.jpg | attachment:tkm-zstat1-cor-128.th23.small.jpg When you click or mouse over a voxel, the cortical or subcortical structure that that voxel belongs to will be displayed in the control panel. You can view any of the volumes in the stats dir in this way as well as the clustered maps in the feat directory. |
| Line 24: | Line 26: |
| === 2.0 Sampling statistical maps onto bert's surface === In order to display the statistical map overlaid onto the surface, the data in fbert.feat must be resampled. This is done with feat2surf. Documentation for what it does and how it does it can be obtained with: |
=== 2.0 View statistical maps on bert's surface === To view any of the statistical maps on bert's surface, close the tkmedit GUI (or open a new terminal window) and run: |
| Line 28: | Line 29: |
| feat2surf --help | tksurfer bert lh inflated \ -overlay ./fbert1.feat/stats/zstat1.nii.gz \ -overlay-reg ./fbert1.feat/reg/freesurfer/anat2exf.register.dat \ -fthresh 2.3 -fmid 3.3 -fslope 1 -annot aparc.annot |
| Line 30: | Line 34: |
| To run it on this data set, run: {{{ feat2surf --feat fbert.feat }}} Verify that this has created four directories under fbert.feat: reg_surf-lh, reg_surf-rh, reg_surf-lh-average7, and reg_surf-rh-average7. Each one of these directories will have a stats directory in which all the statistics from fbert.feat/stats have been resampled onto the surface. The average7 directories are resampled onto the common surface spaced (defined by average7). === 3.0 Viewing statistical maps on bert's surface === To view the statistical maps on the right hemisphere, run tksurfer: {{{ tksurfer bert rh inflated \ -o ./fbert.feat/reg_surf-rh/stats/zstat1.mgh -overlay-reg-identity \ -fthresh 1.3 -fmid 2.3 -fslope 1 }}} Note that you can run the above tkmedit command (from a different window) simultaneously with the tksurfer command to visualize the same data on the volume and in the surface. You can then use the Save/Goto Point buttons to navigate between the surface and volume. |
|
| Line 49: | Line 36: |
| attachment:tks-zstat1-rh-lat-small.jpg | attachment:tks-zstat1-rh-lat.th23.small.jpg [[BR]] To load the cortical parcellation, goto File->Label->Import Annotation, and enter lh.aparc.annot. The parcellation will be opaque. To show only the ouline (as above), View->LabelStyle->Outline.When you click or mouse over a vertex, the control panel will display the name of the cortical structure. You can view any of the volumes in the stats dir in this way as well as the clustered maps in the feat directory. You can also run the tkmedit and tksurfer commands above in separate shells and use the Save-Point/Goto-Point functionality to navigate through the volume and surface. |
| Line 51: | Line 40: |
| === 4.0 Overlaying zmap onto the FSL's standard volume === | === 3.0 Resampling COPEs to common surface === |
| Line 53: | Line 42: |
| You can also use tkmedit to view your results on the FSL standard volume instead of the individual's anatomical with the following command: |
When performing surface-based group analysis of functional data, the COPEs must be sampled to the common surface space (similar to how you must reslice the COPEs from the native functional space into standard space prior to group analysis). The surface sampling can be done in two ways. First, you can use feat2surf as in: |
| Line 56: | Line 46: |
| tkmedit -f $FSLDIR/etc/standard/avg152T1_brain.img \ -overlay ./fbert.feat/stats/zstat1.img \ -overlay-reg ./fbert.feat/reg/freesurfer/std2exf.register.dat \ -fthresh 1.3 -fmid 2.3 -fslope 1 |
feat2surf --feat fbert1.feat --cope-only |
| Line 61: | Line 48: |
| This will create fbert.feat/reg_surf-lh-fsaverage/stats for the left hemi (and another for the right). There will be cope1.nii.gz. This looks like a volume because it is in nifti format, but it is really a surface stored in a volume format (note it's dimensions are 1974 x 1 x 83 = 163842 = number of vertices in fsaverage's surface). You can then concatenate these files from different subjects to perform group analysis with FreeSurfer's mri_glmfit or FSL's randomise or flame. Alternatively, when you have multiple runs/subjects, you can use mris_preproc, something like: {{{ mris_preproc --target fsaverage --hemi lh --out xrun/lh.cope1.nii.gz \ --iv fbert1.feat/stats/cope1.nii.gz fbert1.feat/reg/freesurfer/anat2exf.register.dat \ --iv fbert2.feat/stats/cope1.nii.gz fbert2.feat/reg/freesurfer/anat2exf.register.dat }}} This will create the output directory (xrun) and lh.cope1.nii.gz, the copes from each run sampled onto the left hemi of the common surface. In this case it will have only two frames for the two runs. This can then be used as input mri_glmfit, randomise, or flame. You can also resample the variances of the copes with: {{{ mris_preproc --target fsaverage --hemi lh --out xrun/lh.varcope1.nii.gz \ --iv fbert1.feat/stats/varcope1.nii.gz fbert1.feat/reg/freesurfer/anat2exf.register.dat \ --iv fbert2.feat/stats/varcope1.nii.gz fbert2.feat/reg/freesurfer/anat2exf.register.dat }}} {{{ mri_glmfit --y xrun/lh.cope1.nii.gz --yffxvar xrun/lh.varcope1.nii.gz --ffxdof 163 \ --osgm --glmdir xrun/osgm.ffx --surf fsaverage lh --label lh.cortex.label }}} |
[wiki:FsTutorial top] | [wiki:FsTutorial/FslFeatFreeSurfer previous]
Overlaying FSL Feat statistical maps
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.
In this exercise, the data set of subject bert is used for demonstration. To begin the exercises, first enter the following directory, and then set the current directory to be the default subjects directory using this command:
cd $FREESURFER_HOME/subjects/buckner_data/tutorial_subjs
setenv SUBJECTS_DIR ${PWD}
1.0 Overlaying the statistical map onto the bert's orig volume
Use the following command to display the zmap (zstat1.img) overlaid onto the bert's orig volume. It will display the automatic segmentation, and will also set the threshold at z = 2.3:
tkmedit bert orig.mgz lh.white -aux brain.mgz \ -overlay ./fbert1.feat/stats/zstat1.nii.gz \ -overlay-reg ./fbert1.feat/reg/freesurfer/anat2exf.register.dat \ -segmentation aparc+aseg.mgz -fthresh 2.3 -fmax 4.3
You should see the image below:BR attachment:tkm-zstat1-cor-128.th23.small.jpg When you click or mouse over a voxel, the cortical or subcortical structure that that voxel belongs to will be displayed in the control panel. You can view any of the volumes in the stats dir in this way as well as the clustered maps in the feat directory.
2.0 View statistical maps on bert's surface
To view any of the statistical maps on bert's surface, close the tkmedit GUI (or open a new terminal window) and run:
tksurfer bert lh inflated \ -overlay ./fbert1.feat/stats/zstat1.nii.gz \ -overlay-reg ./fbert1.feat/reg/freesurfer/anat2exf.register.dat \ -fthresh 2.3 -fmid 3.3 -fslope 1 -annot aparc.annot
You should see the image below:BR attachment:tks-zstat1-rh-lat.th23.small.jpg BR To load the cortical parcellation, goto File->Label->Import Annotation, and enter lh.aparc.annot. The parcellation will be opaque. To show only the ouline (as above), View->LabelStyle->Outline.When you click or mouse over a vertex, the control panel will display the name of the cortical structure. You can view any of the volumes in the stats dir in this way as well as the clustered maps in the feat directory. You can also run the tkmedit and tksurfer commands above in separate shells and use the Save-Point/Goto-Point functionality to navigate through the volume and surface.
3.0 Resampling COPEs to common surface
When performing surface-based group analysis of functional data, the COPEs must be sampled to the common surface space (similar to how you must reslice the COPEs from the native functional space into standard space prior to group analysis). The surface sampling can be done in two ways.
First, you can use feat2surf as in:
feat2surf --feat fbert1.feat --cope-only
This will create fbert.feat/reg_surf-lh-fsaverage/stats for the left hemi (and another for the right). There will be cope1.nii.gz. This looks like a volume because it is in nifti format, but it is really a surface stored in a volume format (note it's dimensions are 1974 x 1 x 83 = 163842 = number of vertices in fsaverage's surface). You can then concatenate these files from different subjects to perform group analysis with FreeSurfer's mri_glmfit or FSL's randomise or flame.
Alternatively, when you have multiple runs/subjects, you can use mris_preproc, something like:
mris_preproc --target fsaverage --hemi lh --out xrun/lh.cope1.nii.gz \ --iv fbert1.feat/stats/cope1.nii.gz fbert1.feat/reg/freesurfer/anat2exf.register.dat \ --iv fbert2.feat/stats/cope1.nii.gz fbert2.feat/reg/freesurfer/anat2exf.register.dat
This will create the output directory (xrun) and lh.cope1.nii.gz, the copes from each run sampled onto the left hemi of the common surface. In this case it will have only two frames for the two runs. This can then be used as input mri_glmfit, randomise, or flame. You can also resample the variances of the copes with:
mris_preproc --target fsaverage --hemi lh --out xrun/lh.varcope1.nii.gz \ --iv fbert1.feat/stats/varcope1.nii.gz fbert1.feat/reg/freesurfer/anat2exf.register.dat \ --iv fbert2.feat/stats/varcope1.nii.gz fbert2.feat/reg/freesurfer/anat2exf.register.dat
mri_glmfit --y xrun/lh.cope1.nii.gz --yffxvar xrun/lh.varcope1.nii.gz --ffxdof 163 \
--osgm --glmdir xrun/osgm.ffx --surf fsaverage lh --label lh.cortex.label