FreeSurfer 安装于 Ubuntu

FreeSurfer installed on Ubuntu

我正在尝试在 Ubutun 上安装 FreeSurfer。我按照在线安装说明进行操作。当我完成这一步时,我有一个问题:

Here is your FreeSurfer license. Place the four lines between theCUT HERE markers in a file named "license.txt" in the directory pointed toby the $FREESURFER_HOME environment variable (see the FreeSurfer documentation).
#---------------CUT HERE--------------- 
xxxxxx

xxxxx

xxxxx

xxxxx
#---------------CUT HERE---------------

这是否意味着我必须将这四行粘贴到名为“license.txt”的文件中?我实际上是这样做的。我将这四行粘贴到名为“license.txt”的文件末尾。但是当我完成所有步骤并检查安装时。弹出错误:

ERROR: FreeSurfer license file /home/urser/Downloads/freesurfer/license.txt not found.

但是 license.txt 确实在所谓的“freesurfer”中。我是否误解了说明?

请按照说明操作:

要求

sudo apt-get install tcsh

下载安装

cd ~
# this is the 64 bit version
wget ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0/freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0.tar.gz
cd /usr/local/
sudo tar -xzvf ~/freesurfer-*.tar.gz

设置环境

echo "FREESURFER_HOME=/usr/local/freesurfer" >> ~/.bashrc
echo 'source $FREESURFER_HOME/SetUpFreeSurfer.sh' >> ~/.bashrc

正在清理 -> 这是可选的

rm ~/freesurfer-*.tar.gz

正在注册您的软件

现在在 https://surfer.nmr.mgh.harvard.edu/registration.html 注册并将通过电子邮件发送给您的许可证代码粘贴到此处,请格外小心这一步:

sudo gedit /usr/local/freesurfer/license.txt

我不确定下一步是否必不可少,但我通常 运行 它。

sudo ln -s /usr/lib/libtiff.so.{4,3}

结论

总而言之,安装 Freesurfer 并不难,但在新的 linux 系统中安装它肯定比在 Windows 中使用 VirtualMachines 更好。他们在其网站上提供的虚拟机不允许 运行 驻留在主机中的文件中的命令,这就是最终要 运行 虚拟机的意义所在。

Source

当前的 freesurfer 7.2 版本与我在 Ubuntu 18 上工作的二进制安装程序(.deb 包)有些相似 (https://surfer.nmr.mgh.harvard.edu/fswiki/rel7downloads). On Windows, in lieu of running Ubuntu in a VirtualBox VM (which includes an X-server), you can use the windows subsystem for linux (WSL) to download and run the default Ubuntu image. Then try to download and run the freesurfer .deb binary installer in Ubuntu. With WSL 1 or 2 you can access the path to your windows home directory mounted in linux (https://surfer.nmr.mgh.harvard.edu/fswiki//FS7_wsl). You still need to setup an X server on Windows 10 to work with freeview running in Ubuntu under WSL, but I read that should no longer be necessary with WSL in Windows 11. Once you obtain a freesurfer license (https://surfer.nmr.mgh.harvard.edu/registration.html) 然后只需将环境变量 FS_LICENSE 设置为许可文件的绝对路径,例如,在 Ubuntu 中的 shell 初始化文件中(以便 freeview 运行).