目录

前沿

第一部分:安装

第二部分:使用

Mode A: only T1 scan used as input for recon-all is available.

A1,重建命令:

A2,最终显示:

Mode B: segmentation with an additional scan


命令:

A2,最终显示:

Mode B: segmentation with an additional scan


前沿

我的FreeSufer是6.0,为了使用hippocampal subfield module 需要安装Matlab R2012 runtime(v8.0)。

注意:1:FreeSurfer 6.0 and the development version require the Matlab R2012b (v8.0)

注意2:development versions from January 2018 onwards require the Matlab R2014b - v8.4 - runtime instead

第一部分:安装

第一步:we will define the environment variable FREESURFER_HOME the same way as above. For example, in tcsh or csh:。通常安装FreeSurfer时候已经配置过了。

export FREESURFER_HOME=/usr/local/freesurfer

第二步,change directory to your FreeSurfer directory:

cd $FREESURFER_HOME

第三步, download the runtime as follows:

1、安装curl

sudo apt install curl

2、下载runtime2012bLinux.tar.gz,并改名为runtime.tar.gz。(我直接windows下载)

curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bLinux.tar.gz" -o "runtime.tar.gz"

3、解压并删除

tar xvf runtime.tar.gz
rm $FREESURFER_HOME/runtime.tar.gz

第二部分:使用

先将nii文件压缩:ADNI_002_MPRAGE_1.nii.gz文件

gzip ADNI_002_MPRAGE_1.nii

Mode A: only T1 scan used as input for recon-all is available.

A1,重建命令:

export SUBJECTS_DIR=$TUTORIAL_DATA/practice_with_data
cd $SUBJECTS_DIR
cd nii
recon-all -all -i ADNI_002_MPRAGE_1.nii.gz -s Subj002 -hippocampal-subfields-T1 -itkthreads 4

(如果之前"recon-all -all" 重建过freeSurfer所有过程,但是出错了,再次重建,可以直接用"recon-all"命令, 去掉后面的参数-all,会节省重建时间)

Recon后生成文件: The output will consist of six files (three for each hemisphere)

[lr]h.hippoSfLabels-T1.v10.mgz: they store the discrete segmentation volume (lh for the left hemisphere, rh for the right) at 0.333 mm resolution.

[lr]h.hippoSfLabels-T1.v10.FSvoxelSpace.mgz: 在像素空间中存储离散分割体。 (normally 1mm isotropic, unless higher resolution data was used in recon-all with the flag -cm).

[lr]h.hippoSfVolumes-T1.v10.txt: 存储海马体和各个子区的测量体积。

A2,最终显示:

freeview -v mri/nu.mgz \
-v mri/lh.hippoSfLabels-T1.v10.mgz:colormap=lut \
-v mri/rh.hippoSfLabels-T1.v10.mgz:colormap=lut

Mode B: segmentation with an additional scan

如果附加的扫描序列包含海马体,特别是分辨率远高于T1扫描(即使是空间分辨率),那我们都会获得更加可靠的分割结果。这个时候,我们只需要附加序列与主T1扫描序列实行粗配准。

ModeB也有两种操作,依赖于是否同时使用T1和附加扫描序列进行分割(多序列分析),或者只单独使用附加的序列进行分割。

B1Multispectral segmentation:如果附加的序列和T1序列分辨率相当。或者附加的序列没有全部包含整个海马区域。在这种情况下,T1对于分割其他区域就很重要。

重建命令格式,具体如下:recon-all -s <subject_name> -hippocampal-subfields-T1T2 <file name of additional scan> <analysisID>

recon-all -s Subj00201 -hippocampal-subfields-T1T2 filename <analysisID>

显示命令如下:

freeview -v mri/nu.mgz -v T2ADNI.FSspace.mgz:sample=cubic \
-v mri/lh.hippoSfLabels-T1-T2ADNI.v10.mgz:colormap=lut \
-v mri/rh.hippoSfLabels-T1-T2ADNI.v10.mgz:colormap=lut

B2Using only additional scan::附加序列分辨率远高于T1,且包含所有海马体。

重建命令格式,具体如下:recon-all -s <subject_name> -hippocampal-subfields-T2 <file name of additional scan> <analysisID>

export SUBJECTS_DIR=$TUTORIAL_DATA/practice_with_data
cd $SUBJECTS_DIR
recon-all -i nii-003/hip_sub002.nii.gz  -s Subj003
cd Subj003
recon-all -all -s Subj003 -hippocampal-subfields-T2 mri/orig/001.mgz T2ADNI  -itkthreads 4

显示命令如下:

cd mri
freeview -v nu.mgz -v T2ADNI.FSspace.mgz:sample=cubic \
-v lh.hippoSfLabels-T2ADNI.v10.mgz:colormap=lut -v rh.hippoSfLabels-T2ADNI.v10.mgz:colormap=lut

开发版本:

下载2014matlab runtime

or for development versions from January 2018 onwards:

curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2014bLinux.tar.gz" -o "runtime.tar.gz"

Finally, unpack it with:

tar xvf runtime.tar.gz

export SUBJECTS_DIR=$TUTORIAL_DATA/practice_with_data
cd $SUBJECTS_DIR
recon-all -all -i nii-004/ADNI_004_3D_FLAIR.nii.gz -s Subj004 -itkthreads 4 -use-gpu
cd nii-004segmentHA_T2.sh  Subj004  mri/orig/001.mgz  T2ADNI  0 [SUBJECTS_DIR]segmentHA_T2.sh subject001 T2.nii T2 0

===========================================================

recon-all 命令解析:

recon-all \-all \-i  <one slice in the anatomical dicom series> \-s  <subject id that you make up> \

Some explanation on the command:

  • -all will run all the steps in the FreeSurfer processing stream. Alternatively, you can run different parts of the stream.

  • -i stands for input. Here, you would specify one dicom file/slice in the T1-weighted scan series you collected (FreeSurfer will find the rest of the files in the DICOM series/ the rest of the slices automatically). Make sure you specify the full path to the file if it is not in the directory you are currently in. You could also specify nifti files as input. If you have more than one T1-weighted scan for a given subject, use additional -i flags for each one.

  • -s specifies the name or ID of the subject you would like to use. A directory with that name will be created for all the subject's FreeSurfer output.

==========================================================

扫描所有dicom序列,得到当前dicom所有的序列名称。
dcmunpack -src . -scanonly scan.log
more scan.log

结果如下图:

===========================================================

recon-all \

-all

执行重建的所有过程如下:performs all stages of cortical reconstruction

Autorecon Processing Stages (see -autorecon# flags above):
    1.  Motion Correction and Conform
    2.  NU (Non-Uniform intensity normalization)
    3.  Talairach transform computation
    4.  Intensity Normalization 1
    5.  Skull Strip

6.  EM Register (linear volumetric registration)
    7.  CA Intensity Normalization
    8.  CA Non-linear Volumetric Registration 
    9.  Remove neck
    10. EM Register, with skull
    11. CA Label (Aseg: Volumetric Labeling) and Statistics

12. Intensity Normalization 2 (start here for control points)
    13. White matter segmentation
    14. Edit WM With ASeg
    15. Fill (start here for wm edits)
    16. Tessellation (begins per-hemisphere operations)
    17. Smooth1
    18. Inflate1
    19. QSphere
    20. Automatic Topology Fixer
    21. White Surfs (start here for brain edits for pial surf)
    22. Smooth2
    23. Inflate2

24. Spherical Mapping
    25. Spherical Registration 
    26. Spherical Registration, Contralater hemisphere
    27. Map average curvature to subject
    28. Cortical Parcellation (Labeling)
    29. Cortical Parcellation Statistics
    30. Pial Surfs
    31. WM/GM Contrast
    32. Cortical Ribbon Mask
    33. Cortical Parcellation mapped to ASeg
    34  Brodmann and exvio EC labels

全部重建过程,大概开销时间如下:Run times are approximate for an Intel Xeon E5-2643 64bit 3.4GHz processor:

-<no>motioncor          2 min
  -<no>talairach        < 1 min
  -<no>normalization      2 min
  -<no>skullstrip        15 min
  -<no>nuintensitycor     1 min
  -<no>gcareg            15 min
  -<no>canorm             1 min
  -<no>careg              1 hour
  -<no>careginv           1 min
  -<no>rmneck             1 min
  -<no>skull-lta         12 min
  -<no>calabel           34 min
  -<no>normalization2     3 min
  -<no>maskbfs          < 1 min
  -<no>segmentation       1 min
  -<no>fill               1 min
  -<no>tessellate       < 1 min     per hemisphere
  -<no>smooth1          < 1 min     per hemisphere
  -<no>inflate1           1 min     per hemisphere
  -<no>qsphere            3 min     per hemisphere
  -<no>fix               15 min     per hemisphere
  -<no>white              3 min     per hemisphere
  -<no>smooth2          < 1 min     per hemisphere
  -<no>inflate2         < 1 min     per hemisphere
  -<no>curvHK           < 1 min     per hemisphere
  -<no>curvstats        < 1 min     per hemisphere
  -<no>sphere            40 min     per hemisphere
  -<no>surfreg           50 min     per hemisphere
  -<no>jacobian_white   < 1 min     per hemisphere
  -<no>avgcurv          < 1 min     per hemisphere
  -<no>cortparc           1 min     per hemisphere
  -<no>pial               4 min     per hemisphere
  -<no>surfvolune       < 1 min     per hemisphere
  -<no>cortribbon        15 min
  -<no>parcstats        < 1 min     per hemisphere
  -<no>cortparc2          1 min     per hemisphere
  -<no>parcstats2       < 1 min     per hemisphere
  -<no>cortparc3          1 min     per hemisphere
  -<no>parcstats3       < 1 min     per hemisphere
  -<no>pctsurfcon       < 1 min     per hemisphere
  -<no>hyporelabel      < 1 min     per hemisphere
  -<no>aparc2aseg         1 min
  -<no>apas2aseg          1 min
  -<no>segstats           3 min
  -<no>wmparc             7 min
  -<no>balabels           5 min     per hemisphere

-all                    7 hours   both hemipheres

If -parallel is specified, runtime is reduced to 3 hours.

===========================================================

recon-all 实验成功。7个小时。

参考:1、http://www.freesurfer.net/fswiki/HippocampalSubfields

看3D

freeview -f  surf/lh.pial:annot=aparc.annot:name=pial_aparc:visible=0 \
surf/lh.pial:annot=aparc.a2009s.annot:name=pial_aparc_des:visible=0 \
surf/lh.inflated:overlay=lh.thickness:overlay_threshold=0.1,3::name=inflated_thickness:visible=0 \
surf/lh.inflated:visible=0 \
surf/lh.white:visible=0 \
surf/lh.pial \
--viewport 3d

hippocampal subfield module 安装与使用相关推荐

  1. go module安装本地离线包

    本地有go模块源码,但没办法使用go get,go install等方式直接安装,解决办法: 1.在本地项目目录下新建external文件夹(文件夹名随意) 2.修改项目的go.mod文件,(1)先在 ...

  2. java中apache安装与配置_Apache应用服务器之四:Apache与Tomcat安装与配置

    .所需的软件包 j2sdk-1_4_1_02--i586 Apache2.0.40 (Red Hat Linux) jakarta-tomcat-4.1.18 jakarta-tomcat-conne ...

  3. linux slf4j.rpm,Centos下安装nginx rpm包

    1 在nginx官方网站下载一个rpm包,下载地址是:http://nginx.org/en/download.html wget http://nginx.org/packages/centos/6 ...

  4. Curie Module是什么

    ​ Curie Module是由因特尔(Intel)公司研发的一款微型设备,一种可以让可穿戴设备更加酷炫的芯片.Curie Module(命名源于著名科学家居里夫人)是一款高度集成的硬件模块,集成低功 ...

  5. rabbitmq在centos7下安装

    知识预览 一. RabbitMQ队列 二. 事例 三.基于RabbitMQ的RPC 回到顶部 一. RabbitMQ队列 ? 1 2 3 4 5 #消息中间件 -消息队列   - 异步 提交的任务不需 ...

  6. linux nginx rpm 安装配置,Centos下安装nginx rpm包

    1 在nginx官方网站下载一个rpm包,下载地址是:http://nginx.org/en/download.html wget http://nginx.org/packages/centos/6 ...

  7. Maxwell安装与入门

    安装 官网 https://maxwells-daemon.io/ 下载地址,此版本有67M,如果发现启动不了,重新下载 https://github.com/zendesk/maxwell/rele ...

  8. Go mod:一文教你真正用起来Go Module依赖管理

    Golang环境变量 GOROOT:go的安装路径 在~/.bash_profile中添加下面语句配置GOROOT环境变量 GOROOT=/usr/local/go export GOROOT 要执行 ...

  9. go下载安装使用web框架iris + go mod使用

    目录 一.go mod介绍 1.GO111MODULE 2.go mod 二.下载安装web框架iris 1.打开CMD命令提示框,设置临时环境变量 2.再次执行 go get github.com/ ...

最新文章

  1. TP框架(接口文档模板框架)
  2. U启动安装原版Win7系统教程
  3. MaskRCNN路标:TensorFlow版本用于抠图
  4. MongoDB学习笔记三:查询
  5. 【做题记录】图论杂题
  6. python之爬虫学习记录与心得
  7. 计算机网络安全综述及防火墙浅析
  8. matlab高等数学实验答案,MATLAB高等数学实验-(第2版)
  9. catia逆向建模步骤_catia与逆向工程
  10. 云播 Android,云播放(Air Playit)android版
  11. 恢复手机qq删除的收藏表情
  12. Ubuntu vim 插件配置
  13. Android设备图标显示模糊问题
  14. 公众号快速搭建淘客机器人教程
  15. 在js中为什么0.1+0.2不等于0.3
  16. 【EasyExcel导入、导出(百万数据量测试)粘贴即用】
  17. Python 用plt做动画
  18. 【开源】我和 JAP(JA Plus) 的故事
  19. 什么是库存?什么是零库存?库存的定义
  20. 里程碑图、横道图、项目进度网络图比较

热门文章

  1. elk-Logstash
  2. Python实现一条基于POS算法的区块链
  3. webpack资源管理
  4. 数据结构——平衡二叉树
  5. 【转】揭开Linux的Swap之谜
  6. sourceTree初识
  7. javaWeb项目之图书管理系统(附视频讲解)
  8. 利用UIScrollView和UIPageControl实现图片切换
  9. MyEclipse快捷键两篇文章
  10. android runnable内存泄漏,这个Runnable可以防止内存泄漏吗?