Size: 3092
Comment:
|
Size: 3679
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
The open-source software [[https://deep-mi.org/research/fastsurfer/|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'''. | The open-source software [[https://deep-mi.org/research/fastsurfer/|FastSurfer]] can be used to extract the cortical envelope from a T1 MRI and register it to an atlas. The process is fully automatic, the results are compatible with FreeSurfer. If you are using FastSurfer, please '''cite '''the appropriate references. Note that this software is available only for '''Linux and MacOS'''. |
Line 9: | Line 9: |
The most complicated task will be to install FastSurfer. You can use the intructions given in the [[https://github.com/deep-mi/FastSurfer|GitHub repository]] of the software, or if you are using '''Ubuntu 20''', you may try the following procedure. | The most complicated task will be to install FastSurfer. Unfortunately, Brainstorm cannot do that automatically yet. If you are using '''Ubuntu 20''', you may try the procedure below. Otherwise, refer to the intructions in the [[https://github.com/deep-mi/FastSurfer#usage|FastSurfer GitHub repository]]. |
Line 12: | Line 12: |
In a terminal, execute: | From a terminal, install the required packages: |
Line 18: | Line 18: |
}}} Install pyenv: {{{ |
|
Line 20: | Line 24: |
Add at the end of file '''$HOME/.bashrc''': | Add the following lines at the end of the file '''$HOME/.bashrc''': |
Line 23: | Line 27: |
# FREESURFER export FREESURFER_HOME=/usr/local/freesurfer/7.2.0 source $FREESURFER_HOME/SetUpFreeSurfer.sh |
|
Line 40: | Line 41: |
From a terminal, download and install FreeSurfer Debian package: | Note that FastSurfer works only with FreeSurfer 6. Newer versions of FreeSurfer are not supported at the moment. If you try using FreeSurfer 7, you would get an error message when running recon-surf. Install the required packages: |
Line 43: | Line 46: |
$ 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 |
$ apt-get -y install bc binutils libgomp1 perl psmisc sudo tar tcsh unzip \ uuid-dev vim-common libjpeg62-dev }}} Download and install FreeSurfer 6.0.1: {{{ $ cd ~/ $ wget https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.1/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz $ tar xzvf freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz $ sudo mkdir /usr/local/freesurfer $ sudo mv freesurfer /usr/local/freesurfer/6.0.1 |
Line 50: | Line 61: |
$ cp license.txt /usr/local/freesurfer/7.2.0/ | $ cp license.txt /usr/local/freesurfer/6.0.1/ |
Line 52: | Line 63: |
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. | Add the following lines at the end of the file '''$HOME/.bashrc''': {{{ # FreeSurfer export FREESURFER_HOME=/usr/local/freesurfer/6.0.1/ source $FREESURFER_HOME/SetUpFreeSurfer.sh }}} Close the terminal and open a new one, you should see the following message: For complete and updated installation instructions, see the [[https://surfer.nmr.mgh.harvard.edu/fswiki/rel6downloads|FreeSurfer wiki]]. |
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, the results are compatible with FreeSurfer. 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. Unfortunately, Brainstorm cannot do that automatically yet. If you are using Ubuntu 20, you may try the procedure below. Otherwise, refer to the intructions in the FastSurfer GitHub repository.
Install pyenv: Python 3.6
From a terminal, install the required packages:
$ 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
Install pyenv:
$ curl https://pyenv.run | bash
Add the following lines at the end of the file $HOME/.bashrc:
# 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
Note that FastSurfer works only with FreeSurfer 6. Newer versions of FreeSurfer are not supported at the moment. If you try using FreeSurfer 7, you would get an error message when running recon-surf.
Install the required packages:
$ apt-get -y install bc binutils libgomp1 perl psmisc sudo tar tcsh unzip \ uuid-dev vim-common libjpeg62-dev
Download and install FreeSurfer 6.0.1:
$ cd ~/ $ wget https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.1/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz $ tar xzvf freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz $ sudo mkdir /usr/local/freesurfer $ sudo mv freesurfer /usr/local/freesurfer/6.0.1
Obtain a license.txt file from this page, and copy it to the installation folder:
$ cp license.txt /usr/local/freesurfer/6.0.1/
Add the following lines at the end of the file $HOME/.bashrc:
# FreeSurfer export FREESURFER_HOME=/usr/local/freesurfer/6.0.1/ source $FREESURFER_HOME/SetUpFreeSurfer.sh
Close the terminal and open a new one, you should see the following message:
For complete and updated installation instructions, see the FreeSurfer wiki.
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