Size: 2860
Comment:
|
Size: 3092
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 11: | Line 11: |
=== Install pyenv === | ==== Install pyenv: Python 3.6 ==== |
Line 30: | Line 30: |
Start a new terminal, install Python 3.6.15 and create a new virtual environment for FastSurfer: | Start a new terminal, install Python 3.6 and create a new virtual environment for FastSurfer: |
Line 39: | Line 39: |
=== Install FreeSurfer === | ==== Install FreeSurfer 6.0.1 ==== |
Line 52: | Line 52: |
For complete and updated installation instructions, see the [[https://surfer.nmr.mgh.harvard.edu/fswiki/DownloadAndInstall|FreeSurfer wiki]]. | For complete and updated installation instructions, see the [[https://surfer.nmr.mgh.harvard.edu/fswiki/DownloadAndInstall|FreeSurfer wiki]]. Note that newer versions of FreeSurfer are not supported at the moment. |
Line 54: | Line 54: |
=== Install FastSurfer === From a terminal, execute: |
==== Install FastSurfer ==== Clone the FastSurfer GitHub repository: {{{ $ cd ~/ $ git clone https://github.com/Deep-MI/FastSurfer.git }}} Install the required packages: |
Line 59: | Line 65: |
$ cd FastSurfer |
MRI segmentation with FastSurfer
Authors: Francois Tadel
The open-source software FastSurfer can be used to extract the cortical envelope from a T1 MRI and register it to an atlas. The process is fully automatic and much faster than FreeSurfer. The results are compatible with FreeSurfer and can be imported in Brainstorm with just a few mouse clicks. If you are using FastSurfer, please cite the appropriate references. Note that this software is available only for Linux and MacOS.
Contents
Install FastSurfer
The most complicated task will be to install FastSurfer. You can use the intructions given in the GitHub repository of the software, or if you are using Ubuntu 20, you may try the following procedure.
Install pyenv: Python 3.6
In a terminal, execute:
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl $ curl https://pyenv.run | bash
Add at the end of file $HOME/.bashrc:
# FREESURFER export FREESURFER_HOME=/usr/local/freesurfer/7.2.0 source $FREESURFER_HOME/SetUpFreeSurfer.sh # Load pyenv-virtualenv automatically export PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH" eval "$(pyenv init -)"eval "$(pyenv virtualenv-init -)"
Start a new terminal, install Python 3.6 and create a new virtual environment for FastSurfer:
$ pyenv install 3.6.15 $ pyenv global 3.6.15 $ pyenv virtualenv fastsurfer
For complete and updated installation instruction, see the pyenv repository.
Install FreeSurfer 6.0.1
From a terminal, download and install FreeSurfer Debian package:
$ wget https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.2.0/freesurfer_7.2.0_amd64.deb $ sudo dpkg -i freesurfer_7.2.0_amd64.deb $ sudo apt-get -f install
Obtain a license.txt file from this page, and copy it to the installation folder:
$ cp license.txt /usr/local/freesurfer/7.2.0/
For complete and updated installation instructions, see the FreeSurfer wiki. Note that newer versions of FreeSurfer are not supported at the moment.
Install FastSurfer
Clone the FastSurfer GitHub repository:
$ cd ~/ $ git clone https://github.com/Deep-MI/FastSurfer.git
Install the required packages:
$ sudo apt install libblas-dev liblapack-dev libatlas-base-dev gfortran $ cd FastSurfer $ pip install -r requirements.txt
Execute FastSurfer manually:
$ ./run_fastsurfer.sh --t1 /home/ftadel/segmentation/freesurfer_db/PD/mri/orig/001.mgz \ --sid PD --sd /home/ftadel/segmentation/fastsurfer_db --parallel --threads 4