CentOS安装Phantomas做dMRI仿真数据实验

CentOS安装Phantomas做dMRI仿真数据实验

  • Phantomas 简介

Phantomas 简介

Phantomas是一个用来仿真dMRI数据的基于python的软件包,http://www.emmanuelcaruyer.com/phantomas.php,官方给出了github源码的链接https://github.com/ecaruyer/phantomas。但是安装的步骤流程都是基于Ubuntu系统,还有不少同学使用的是CentOS。本文将基于我安装的经验,给出CentOS安装Phantomas的一些跳坑指南。

最开始主要遇到了以下的问题,无法找到gsl的包。

/home/fsluser/anaconda3/envs/syn_diff/compiler_compat/ld: cannot find -lgsl
/home/fsluser/anaconda3/envs/syn_diff/compiler_compat/ld: cannot find -lgslcblas
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

而尝试安装gsl,但系统提示已经安装。

yum install gsl.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * epel: mirror.sjtu.edu.cn
 * extras: mirrors.aliyun.com
 * updates: ftp.sjtu.edu.cn
Package gsl-1.15-13.el7.x86_64 already installed and latest version
Nothing to do

最后查阅了很多的文档,最终搞定。多亏了https://github.com/Gaius-Augustus/Augustus/issues/127这个帖子,实际上是需要安装dev版本的gsl。

yum install -y gsl-devel

经过两分钟等待,安装成功后,搞定。

....
....
....
Using /home/fsluser/anaconda3/lib/python3.8/site-packages
Finished processing dependencies for phantomas==0.1.dev0
(base) [root@fsl phantomas]# phantom
phantomas_dwis    phantomas_masks   phantomas_rois    phantomas_struct  phantomas_view    phantomstudy.sh   
(base) [root@fsl phantomas]# phantomas_dwis -h
usage: phantomas_dwis [-h] -b BVALS -r BVECS [--output_dir OUTPUT_DIR] [--output OUTPUT] [--res RES] [--fov FOV] [--snr SNR] [--seed SEED]
                      [--lambda1 LAMBDA1] [--lambda2 LAMBDA2] [--order_sh ORDER] [--export_fod BASIS] [--export_vf]
                      geometry

Simulates diffusion-weighted images from the description of a phantom.

positional arguments:
  geometry              A JSON-formatted file describing fiber and phantom geometries.

optional arguments:
  -h, --help            show this help message and exit
  -b BVALS              b-values in a text file.
  -r BVECS              b-vectors in a text file.
  --output_dir OUTPUT_DIR
                        Output directory. (./)
  --output OUTPUT       Output dwis file name. (dwis.nii.gz)
  --res RES             Diffusion-weighted images resolution in mm. (2.0)
  --fov FOV             Field of view in mm. If None, adapts to the size of the phantom.
  --snr SNR             Signal-to-noise ratio of the simulated images. 0.0 for noise-free images. (100.0)
  --seed SEED           Seed for the random number generator. (None)
  --lambda1 LAMBDA1     Lambda 1 parameter of the fiber tensor. (0.0017)
  --lambda2 LAMBDA2     Lambda 2 and 3 parameters of the fiber tensor. (0.0002)
  --order_sh ORDER      Spherical harmonics truncation order for the FOD. (8)
  --export_fod BASIS    Either 'dipy' or 'mrtrix': sets the convention of the exported FODs.
  --export_vf           If supplied, saves the volume fraction for each tissue type.
(base) [root@fsl phantomas]# 

Happy research!!
GL HF!!!
Enjoy!!!

CentOS安装Phantomas做dMRI仿真数据实验_第1张图片
http://www.emmanuelcaruyer.com/img/phantomas.jpg

你可能感兴趣的:(仿真器)