freesurfer操作.doc_第1页
freesurfer操作.doc_第2页
freesurfer操作.doc_第3页
freesurfer操作.doc_第4页
freesurfer操作.doc_第5页
已阅读5页,还剩47页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

皮层厚度和表面积(surface area)Freesurfer分析方法预备阶段:1打开终端,输入指令,打开tschtcsh setenv FREESURFER_HOME /usr/local/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.csh setenv TUTORIAL_DATA /media/8498B05D98B05002/DATA/fs-cyh setenv SUBJECTS_DIR $TUTORIAL_DATA cd $SUBJECTS_DIR2Recon-allrecon-all -i -s -sd -all recon-all -i 66540045 -s study -all 文件 文件夹名配准tkregister2 -mgz -s study1 -fstal -surf orig 查看看分割结果tkmedit cyh brainmask.mgz -aux T1.mgz -surfs -aseg 看膨胀结果tksurfer cyh lh inflated 在Freesurfer中,经过recon-all指令预处理,一些统计数据已经产生。他们保存在每个被试的stas/子文件夹下。有subcortical segmentation (aseg)皮层下组织分割的,还有cortical parcellation (aparc)皮层分割的结果。 一、单被试分析1.aparc.stats是不同皮层区域的统计信息,这些信息存储在lh.aparc.stats和rh.aparc.stats中。cd $SUBJECTS_DIR/cyh/statsless lh.aparc.stats(1)通过上面的命令行可以得到Structure Name,Number of Vertices,Surface Area,Gray Matter Volume,Average Thickness,Thickness StDev,Integrated Rectified Mean Curvature,Integrated Rectified Gaussian Curvature,Folding IndexandIntrinsic Curvature Indexfor each entry in the table.(2)要得到某个指定区域的统计信息,可参照Q. I am trying to measure the cortical thickness of specific ROI, how can I do this?A: You can save the ROI to a label file and then use: mris_anatomical_stats -l (3)要计算全脑平均厚度,参照Q. I am trying to measure the global mean cortical thickness (i.e combined across hemispheres), how would I do this?A: One suggestion is to use the surface area of each hemisphere as the weighting factor. In which case the global mean thickness including both hemispheres would be given by:bh.thickness = ( (lh.thickness * lh.surfarea) + (rh.thickness * rh.surfarea) ) / (lh.surfarea + rh.surfarea)If you use the values in the ?h.aparc.stats, it already factors out the unknown region, so you dont have to do it yourself.2.aseg.stats皮层下组织的统计数据cd $SUBJECTS_DIR/004/statsless aseg.stats通过这个命令可以得到:Segmentation Id,Number of Voxels,Volume,Structure Name,Intensity normMean,Intensity normStdDev,Intensity normMin,Intensity normMax, andIntensity normRangefor each entry in the table.二、组分析下列命令是将要分析的多个被试的数据整合到一个表中以便于查阅。1将被试文件夹设定为当前路径setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs/group_analysis_tutorialcd $SUBJECTS_DIR2. Table of segmentation volumes(以六个被试为例)用六个被试的数据创制一个Table of segmentation volumesasegstats2table -subjects 004 021 040 067 080 092 -segno 11 17 18 -tablefile aseg.vol.table其中11,17,18分别是left caudate, left hippocampus 和 left amygdala的数字代码。如果要做包含全部标签的表格,可以省去-segno 11 17 18 ,如果要制其他区域的表格,可在附录查找相应区域的代码。这一指令运行好会输出一个名为aseg.vol.table的文件。这个文件包含了上面所有被试的相应结构的信息。这些信息可以导入电子表格软件作进一步分析。用ls命令可以看到这个aseg.vol.table文件。用下面命令可查看其内容。less aseg.vol.table要将这个导入表格,运行下面指令:gnumeric aseg.vol.table注意:gnumeric命令只在linux上有效。苹果用户用不同的指令。3. Table of segmentation mean intensities平均密度表该部分旨在说明如何改变测量的对象。asegstats2table -subjects 004 021 040 067 080 092 -segno 11 17 18 -meas mean -tablefile aseg.mean-intensity.tableThings to do:1. You can load the table into a spreadsheet as explained in the previous section.2. Refer to the fileFreeSurferColorLUT.txtfor the segmentation labels and the corresponding subcortical structures.less $FREESURFER_HOME/FreeSurferColorLUT.txtFor tutorial purposes, clickhereto view the contents of the file.4Table of white matter parcellation volumes白质表学习怎样获得不同的结构的信息asegstats2table -subjects 004 021 040 067 080 092 -segno 3007 3021 3022 4022 -stats wmparc.stats -tablefile wmparc.vol.tableThings to do:1. You can load the table into a spreadsheet.2. Refer to the fileFreeSurferColorLUT.txtfor the segmentation labels and the corresponding subcortical structures.less $FREESURFER_HOME/FreeSurferColorLUT.txtFor tutorial purposes, clickhereto view the contents of the file5.不同皮层区域表面积This section explains how to create a table of the surface area of each cortical parcellation in the Desikan atlas (surface area is the default measure)aparcstats2table -hemi lh -subjects cyh -tablefile lh.aparc.area.table6.每个皮层区域的平均厚度The purpose of this section is to show how to change the summary measure and the parcellation atlas.aparcstats2table -hemi lh -subjects 004 021 040 067 080 092 -meas thickness -parc aparc.a2009s -tablefile lh.aparc.a2009.thickness.tableCortical Thickness of a Volume-defined ROIThis page describes the workflow to extract freesurfer cortical thickness values for a region-of-interest (ROI) defined in volume space. 从freesurfer分析结果里提取出ROI的皮层厚度。For this workflow, assume the following data is present: 1) An ROI mask in the form of a volume file, where the voxel value is 1 in the ROI, and 0 elsewhere. The coordinate space of that volume is irrelevant. Lets call this file ROI5.nii. (ROI mask,坐标系统无关)2) An anatomical (T1) volume file of the subject (or average of subjects) which is in the same coordinate space as the ROI mask. Lets call this file TT_avg152T1.nii.(被试的T1像,要和ROI的坐标系统一致)3) Processed freesurfer data for a subject (or set of subjects) from which you wish to gather thickness info in the ROI. That is, recon-all-s-all has run to completion, producing subject surfaces and cortical thickness data. Lets call this subject subjid.(freesurfer处理好的面积和厚度值) The workflow consists of these steps: 1) Confirm that your ROI is where you expect it to be when overlayed on the anatomical:检查你的ROI是否在正确的位置tkmedit -f cyh02.img -overlay 17.nii -fthresh 0.5The ROI will appear in orange. WARNING: 6111 NaNs found in volume ./cyh02.img.2) Create a registration from the ROI-anatomical volume to a freesurfer template subject, preferably the fsaverage subject (which is the recommended template subject, distributed with freesurfer, the freesurfer/subjects directory). To perform this registration, use either an automatic method, such as fslregister or spmregister, or a manual method, like tkregister. fslregister and spmregister utilities are freesurfer wrappers for fsls flirt and spms spm_coreg. For example, using the example filenames from above:将ROI配准到freesurfer模板上,一般是fsaverage。可以用自动的方法(如spm或fsl配准),也可以用手动的方法。cd $SUBJECTS_DIR/fsaverage/surffslregister -s fsaverage -mov /media/8498B05D98B05002/DATA/fs-cyh/cyh/surf/cyh02.img -reg cyh02_to_fsaverage.datwill produce the output file TT_avg152T1_to_fssaverage.dat. The utility spmregister has the same calling sequence. Type fslregister-help or spmregister-help for details. 配准好会产生一个命名类似TT_avg152T1_to_fssaverage.dat的文件.It is a good idea to view your ROI in the fsaverage subject volume to ensure that it is located where you expect it to be: 需要再检查下以确保ROI在正确的位置:cd $SUBJECTS_DIR/fsaverage/surftkmedit fsaverage /media/8498B05D98B05002/DATA/fs-cyh/cyh/surf/cyh02.img -overlay /media/8498B05D98B05002/DATA/fs-cyh/cyh/surf/17.nii -overlay-reg cyh02_to_fsaverage.dat -fthresh 0.5 -surface lh.white -aux-surface rh.whitecd $SUBJECTS_DIR/fsaverage/surftkmedit fsaverage T1.mgz -overlay /media/8498B05D98B05002/DATA/fs-cyh/cyh/surf/17.nii -overlay-reg cyh02_to_fsaverage.dat -fthresh 0.5 -surface lh.white -aux-surface rh.whiteYour ROI will appear in orange. WARNING: the voxel resolution in the source volume (2,2,2) differs from that listed in the registration file (3,3,3)3) Map the ROI-mask to the fsaverage surface, to create an fsaverage-ROI surface overlay. 把ROI映射到fsaverage表面上。cd $SUBJECTS_DIR/fsaverage/surfmri_vol2surf -mov /media/8498B05D98B05002/DATA/fs-cyh/cyh/surf/17.nii -reg cyh02_to_fsaverage.dat -projdist-max 0 1 0.1 -interp nearest -hemi lh -out lh.fsaverage.17.mgh -rf 6 -reshape -reshapeIt is a good idea to view your ROI on the fsaverage surface to ensure that it is located where you expect it to be: tksurfer fsaverage lh inflated -overlay lh.fsaverage.17.mgh -fthresh 0.54) Map your subject thickness data to the fsaverage subject. Do this for all your subjects. cd $SUBJECTS_DIR/cyh/surfmri_surf2surf -s cyh -trgsubject fsaverage -hemi lh -sval lh.thickness -tval lh.thickness.fsaverage.mgh -reshape-factor 7 -reshapereplacing -reshape with -rf 6Note: Use -reshape-factor 7 instead of the reshape flag if the dimensions of the segmentation differ from the dimensions of the input image. Replace 7 with the last dimension listed (i.e. 2340x x 1 x 7) for the segmentation. 5) Run mri_segstats, using the subject-ROI surface, to get the thickness data for your ROI. cd $SUBJECTS_DIR/cyh/surfmri_segstats -seg $SUBJECTS_DIR/fsaverage/surf/lh.fsaverage.17.mgh -in lh.thickness.fsaverage.mgh -sum segstats-17.txtcaiyonghua-ThinkPad:/media/8498B05D98B05002/DATA/fs-cyh/cyh/surf mri_segstats ? -seg $SUBJECTS_DIR/fsaverage/surf/lh.fsaverage.17.mgh ? -in lh.thickness.fsaverage.mgh ? -sum segstats-17.txt$Id: mri_segstats.c,v 1.75.2.2 2011/04/27 22:18:58 nicks Exp $cwd cmdline mri_segstats -seg /media/8498B05D98B05002/DATA/fs-cyh/fsaverage/surf/lh.fsaverage.17.mgh -in lh.thickness.fsaverage.mgh -sum segstats-17.txt sysname Linuxhostname caiyonghua-ThinkPadmachine x86_64user caiyonghuaLoading /media/8498B05D98B05002/DATA/fs-cyh/fsaverage/surf/lh.fsaverage.17.mghLoading lh.thickness.fsaverage.mghERROR: dimension mismatch between input volume and seg input 27307 1 6 seg 23406 1 7In the output file, segstats-ROI5.txt, the last lines list the thickness data, for example: # ColHeaders Index SegId NVoxels Volume_mm3 Mean StdDev Min Max Range 1 0 163825 163825.0 2.2344 0.8913 0.0000 5.0000 5.0000 2 1 17 17.0 2.3747 0.1754 1.9733 2.6986 0.7252Here, the ROI is SegId 1 (because the original ROI5.nii mask volume used a value of 1 to identify its voxels). Mean thickness is 2.3747mm. 附:不同区域的数字代码#$Id: FreeSurferColorLUT.txt,v 1.67 2010/02/06 04:27:06 nicks Exp $#No. Label Name: R G B A0 Unknown 0 0 0 01 Left-Cerebral-Exterior 70 130 180 02 Left-Cerebral-White-Matter 245 245 245 03 Left-Cerebral-Cortex 205 62 78 04 Left-Lateral-Ventricle 120 18 134 05 Left-Inf-Lat-Vent 196 58 250 06 Left-Cerebellum-Exterior 0 148 0 07 Left-Cerebellum-White-Matter 220 248 164 08 Left-Cerebellum-Cortex 230 148 34 09 Left-Thalamus 0 118 14 010 Left-Thalamus-Proper 0 118 14 011 Left-Caudate 122 186 220 012 Left-Putamen 236 13 176 013 Left-Pallidum 12 48 255 014 3rd-Ventricle 204 182 142 015 4th-Ventricle 42 204 164 016 Brain-Stem 119 159 176 017 Left-Hippocampus 220 216 20 018 Left-Amygdala 103 255 255 019 Left-Insula 80 196 98 020 Left-Operculum 60 58 210 021 Line-1 60 58 210 022 Line-2 60 58 210 023 Line-3 60 58 210 024 CSF 60 60 60 025 Left-Lesion 255 165 0 026 Left-Accumbens-area 255 165 0 027 Left-Substancia-Nigra 0 255 127 028 Left-VentralDC 165 42 42 029 Left-undetermined 135 206 235 030 Left-vessel 160 32 240 031 Left-choroid-plexus 0 200 200 032 Left-F3orb 100 50 100 033 Left-lOg 135 50 74 034 Left-aOg 122 135 50 035 Left-mOg 51 50 135 036 Left-pOg 74 155 60 037 Left-Stellate 120 62 43 038 Left-Porg 74 155 60 039 Left-Aorg 122 135 50 040 Right-Cerebral-Exterior 70 130 180 041 Right-Cerebral-White-Matter 0 225 0 042 Right-Cerebral-Cortex 205 62 78 043 Right-Lateral-Ventricle 120 18 134 044 Right-Inf-Lat-Vent 196 58 250 045 Right-Cerebellum-Exterior 0 148 0 046 Right-Cerebellum-White-Matter 220 248 164 047 Right-Cerebellum-Cortex 230 148 34 048 Right-Thalamus 0 118 14 049 Right-Thalamus-Proper 0 118 14 050 Right-Caudate 122 186 220 051 Right-Putamen 236 13 176 052 Right-Pallidum 13 48 255 053 Right-Hippocampus 220 216 20 054 Right-Amygdala 103 255 255 055 Right-Insula 80 196 98 056 Right-Operculum 60 58 210 057 Right-Lesion 255 165 0 058 Right-Accumbens-area 255 165 0 059 Right-Substancia-Nigra 0 255 127 060 Right-VentralDC 165 42 42 061 Right-undetermined 135 206 235 062 Right-vessel 160 32 240 063 Right-choroid-plexus 0 200 221 064 Right-F3orb 100 50 100 065 Right-lOg 135 50 74 066 Right-aOg 122 135 50 067 Right-mOg 51 50 135 068 Right-pOg 74 155 60 069 Right-Stellate 120 62 43 070 Right-Porg 74 155 60 071 Right-Aorg 122 135 50 072 5th-Ventricle 120 190 150 073 Left-Interior 122 135 50 074 Right-Interior 122 135 50 075 Left-Lateral-Ventricles 120 18 134 076 Right-Lateral-Ventricles 120 18 134 077 WM-hypointensities 200 70 255 078 Left-WM-hypointensities 255 148 10 079 Right-WM-hypointensities 255 148 10 080 non-WM-hypointensities 164 108 226 081 Left-non-WM-hypointensities 164 108 226 082 Right-non-WM-hypointensities 164 108 226 083 Left-F1 255 218 185 084 Right-F1 255 218 185 085 Optic-Chiasm 234 169 30 086 Corpus_Callosum 250 255 50 096 Left-Amygdala-Anterior 205 10 125 097 Right-Amygdala-Anterior 205 10 125 098 Dura 160 32 240 0100 Left-wm-intensity-abnormality 124 140 178 0101 Left-caudate-intensity-abnormality 125 140 178 0102 Left-putamen-intensity-abnormality 126 140 178 0103 Left-accumbens-intensity-abnormality 127 140 178 0104 Left-pallidum-intensity-abnormality 124 141 178 0105 Left-amygdala-intensity-abnormality 124 142 178 0106 Left-hippocampus-intensity-abnormality 124 143 178 0107 Left-thalamus-intensity-abnormality 124 144 178 0108 Left-VDC-intensity-abnormality 124 140 179 0109 Right-wm-intensity-abnormality 124 140 178 0110 Right-caudate-intensity-abnormality 125 140 178 0111 Right-putamen-intensity-abnormality 126 140 178 0112 Right-accumbens-intensity-abnormality 127 140 178 0113 Right-pallidum-intensity-abnormality 124 141 178 0114 Right-amygdala-intensity-abnormality 124 142 178 0115 Right-hippocampus-intensity-abnormality 124 143 178 0116 Right-thalamus-intensity-abnormality 124 144 178 0117 Right-VDC-intensity-abnormality 124 140 179 0118 Epidermis 255 20 147 0119 Conn-Tissue 205 179 139 0120 SC-Fat/Muscle 238 238 209 0121 Cranium 200 200 200 0122 CSF-SA 74 255 74 0123 Muscle 238 0 0

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论