前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >linux服务器搭建之路15-常用医学图像处理软件的安装

linux服务器搭建之路15-常用医学图像处理软件的安装

作者头像
锦小年
发布2019-05-26 10:39:13
1.9K0
发布2019-05-26 10:39:13
举报
文章被收录于专栏:锦小年的博客锦小年的博客

作为一个医学图像研究僧,怎么能不会各种医学图像处理软件的安装,今天记录一下这些软件的安装过程,很简单。这些软件包括spm,FSL,freesurfer等。

1. FSL

1.1 安装

去官网注册一下,并下载fslinstall.py文件,:https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation/Linux 安装命令:

python fslinstaller.py

其中可以选择参数: -d specify folder to install FSL into (without ‘fsl’), e.g. /usr/local -e only configure your account for running FSL -E configure FSL for all users (Linux) -v print installer version number and exit -c check for updated versions of FSL -l list versions of FSL available for download

-V install specified version number e.g. 5.0.10 -s download the source code for the current, or specified version of FSL -F download the FEEDS data set for the current, or specified version of FSL -q silence all messages -p skip environment setup -D switch on debug messages - use this option to generate logging that can be included when requesting installation support

需要注意的是: -l 可以看可以安装的版本,-V指定版本, -d指定路径,路径需要有可写入权限。 需要很长的时间等待,完成之后添加环境变量。

vim ~/.bashrc

添加:

# FSL
export FSLDIR=/usr/local/fsl
. ${FSLDIR}/etc/fslconf/fsl.sh
export PATH=$PATH:$FSLDIR/bin

重新登录或者source一下生效。

1.2 验证

FSL依赖python版本为Python2,一定要将系统的默认版本设置为python2

  flirt -version

如果安装成功:

 FLIRT version 6.0

可能会报错:

libopenblas.so.0: cannot open shared object file: No such file or directory

1.3 错误解决

安装openblas就可以解决1.2 中的错误 下载地址: https://github.com/xianyi/OpenBLAS/releases 下载后解压:

tar -zxvf OpenBLAS*

进入目录后:

sudo make PREFIX=/usr/local/blas
sudo make install

在lib64里建立软连接:

sudo ln -s  /usr/local/blas/libopenblas_haswellp-r0.2.20.so /usr/lib64/libopenblas.so.0

之后就可以了

2. Freesurfer

2.1 安装

安装包下载地址:http://www.freesurfer.net/fswiki/DownloadAndInstall 安装命令:

tar -C /usr/local -xzvf freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz

-C后面是安装位置

2.2 添加环境变量

vim ~/.bashrc

添加:

# freesurfer
export FREESURFER_HOME=/usr/local/freesurfer
FS_FREESURFERENV_NO_OUTPUT=1
source $FREESURFER_HOME/SetUpFreeSurfer.sh

第二句是为了设置每次登陆的时候不输出freesurfer的环境变量。

2.3 安装响应的库文件

ldd /usr/local/freesurfer/tktools/tksurfer.bin
在这里插入图片描述
在这里插入图片描述

缺什么,,补什么。亲测图中没有的三个不是必须的。

2.4 报错处理

  • libGLU找不到 错误信息:/usr/local/freesurfer/tktools/tkregister2.bin: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory 解决办法:安装一下libGLU
# yum whatprovides libGLU.so.1

Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile

yum install mesa-libGLU-9.0.0-4.el7.i686

建立连接一下:

sudo ln -s /usr/lib/libGLU.so.1 /usr/bin/libGLU.so.1
  • libnetcdf.so.6找不到 解决办法:
yum install netcdf

装完要链接一下到cdf6.0

ln -s /usr/lib64/libnetcdf.so.7 /usr/bin/libnetcdf.so.6
  • error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

解决办法:sudo yum install libXScrnSaver

3. AFNI

3.1 安装

centos7版本下载:

wget https://afni.nimh.nih.gov/pub/dist/tgz/linux_centos_7_64.tgz

其他版本下载: https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/download_links.html

下载后解压到安装目录,并添加环境变量:

tar -zxvf inux_centos_7_64.tgz

复制文件到安装位置

cd inux_centos_7_64
sudo cp -r * /usr/local/afni

vim ~/.bashrc:

# AFNI
export AFNI_DIR=/usr/local/afni
export PATH=$PATH:$AFNI_DIR

3.2 验证

重新加载环境变量后输入:afni

在这里插入图片描述
在这里插入图片描述

界面很不好看啊

3.3 报错信息

  • 错误代码
afni: error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory
  • 解决方案
sudo yum install  libXp
sudo yum install openmotif
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018年12月07日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1. FSL
    • 1.1 安装
      • 1.2 验证
        • 1.3 错误解决
        • 2. Freesurfer
          • 2.1 安装
            • 2.2 添加环境变量
              • 2.3 安装响应的库文件
                • 2.4 报错处理
                • 3. AFNI
                  • 3.1 安装
                    • 3.2 验证
                      • 3.3 报错信息
                      领券
                      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档