Differences between revisions 5 and 6
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
Note: this functionality is currently only available in the development version of !FreeSurfer. Rather than directly contacting the author, please post your questions on this module to the !FreeSurfer [[FreeSurferSupport|mailing list]]. '''Note:''' This functionality is currently only available in the development version of !FreeSurfer. Rather than directly contacting the author, please post your questions on this module to the !FreeSurfer [[FreeSurferSupport|mailing list]].
Line 15: Line 15:
We offer two ways of running !SynthStrip: within !FreeSurfer or as a standalone command-line tool. The !SynthStrip command line tool can be be run within !FreeSurfer or as standalone utility using Docker or Singularity containers.
Line 17: Line 17:
'''''Within !FreeSurfer:''''' As of March 14 2022, SynthStrip is available in the dev (nightly) !FreeSurfer distributions and will be included in the upcoming !FreeSurfer v7.3 release. '''Within !FreeSurfer:''' As of March 14 2022, the `synthstrip` command is available in the dev (nightly) !FreeSurfer distributions and will be included in the upcoming !FreeSurfer v7.3 release.
Line 19: Line 19:
'''''Standalone Utility:''''' Coming soon! /* If you do not want to install an entire !FreeSurfer distribution to run !SynthStrip, you can install a singular, pre-built macOS or linux !SynthStrip executable. To do this, download the maxOS or linux file from this source. */ If you do not want to install an entire !FreeSurfer distribution, you can run !SynthStrip through a standalone script that wraps a Docker or Singularity container, as described below.

'''Singularity:''' To install the Singularity-based SynthStrip wrapper, run the following. The downloaded `synthstrip-singularity` script can be run directly, using the same `synthstrip` command-line syntax defined in the ''Usage'' section below. Before running, read the brief instructions in the header of the downloaded script to setup a one-time configuration.

{{{
curl -O https://surfer.nmr.mgh.harvard.edu/ftp/dist/freesurfer/synthstrip/synthstrip-singularity && chmod +x synthstrip-singularity
}}}

'''Docker:''' To install the Docker-based SynthStrip wrapper, run the following. The downloaded `synthstrip-docker` script can be run directly, using the same `synthstrip` command-line syntax defined in the ''Usage'' section below. Before running, read the brief instructions in the header of the downloaded script.

{{{
curl -O https://surfer.nmr.mgh.harvard.edu/ftp/dist/freesurfer/synthstrip/synthstrip-docker && chmod +x synthstrip-docker
}}}

The aim of these wrappers is to provide easy mechanisms for running containers, i.e. so users do not need to worry about mounting paths to input and output files. However, those who would like direct access to the standalone SynthStrip build image are welcome to access it from our [[https://hub.docker.com/r/freesurfer/synthstrip|DockerHub]] page.
Line 23: Line 37:
Once installed, you can run !SynthStrip with the following: Once installed, you can run !SynthStrip with the following command-line syntax:
Line 28: Line 42:

'''Note:''' If installed using the Docker or Singularity wrappers, replace `synthstrip` with the downloaded script, i.e. `synthstrip-singularity`.

SynthStrip

Robust, universal skull-stripping for brain images of any type.


skullstrips.png

Note: This functionality is currently only available in the development version of FreeSurfer. Rather than directly contacting the author, please post your questions on this module to the FreeSurfer mailing list.

1. Overview

This wiki page is still a work-in-progress.

2. Installation

The SynthStrip command line tool can be be run within FreeSurfer or as standalone utility using Docker or Singularity containers.

Within FreeSurfer: As of March 14 2022, the synthstrip command is available in the dev (nightly) FreeSurfer distributions and will be included in the upcoming FreeSurfer v7.3 release.

If you do not want to install an entire FreeSurfer distribution, you can run SynthStrip through a standalone script that wraps a Docker or Singularity container, as described below.

Singularity: To install the Singularity-based SynthStrip wrapper, run the following. The downloaded synthstrip-singularity script can be run directly, using the same synthstrip command-line syntax defined in the Usage section below. Before running, read the brief instructions in the header of the downloaded script to setup a one-time configuration.

curl -O https://surfer.nmr.mgh.harvard.edu/ftp/dist/freesurfer/synthstrip/synthstrip-singularity && chmod +x synthstrip-singularity

Docker: To install the Docker-based SynthStrip wrapper, run the following. The downloaded synthstrip-docker script can be run directly, using the same synthstrip command-line syntax defined in the Usage section below. Before running, read the brief instructions in the header of the downloaded script.

curl -O https://surfer.nmr.mgh.harvard.edu/ftp/dist/freesurfer/synthstrip/synthstrip-docker && chmod +x synthstrip-docker

The aim of these wrappers is to provide easy mechanisms for running containers, i.e. so users do not need to worry about mounting paths to input and output files. However, those who would like direct access to the standalone SynthStrip build image are welcome to access it from our DockerHub page.

3. Usage

Once installed, you can run SynthStrip with the following command-line syntax:

synthstrip -i <input> -o <stripped>

Note: If installed using the Docker or Singularity wrappers, replace synthstrip with the downloaded script, i.e. synthstrip-singularity.

In this command, <input> represents the path to the input image and <stripped> is the skull-stripped output. To also save the corresponding brain mask, the -m command line flag can be used to specify the mask output path. For additional options and command description, please use the --help flag. For the large majority of images with voxel sizes near 1 mm3, SynthStrip should run in less than 1 minute on the CPU. As image size (or resolution) increases, this runtime might increase as well.

4. Evaluation Dataset

In the SynthStrip publication, we gather a large test set, from a collection of public datasets, that spans across acquisition type, age, and health. We plan to make this subset of images, along with ground-truth brain mask labels, available for download in the near future.

SynthStrip (last edited 2022-05-02 08:57:53 by AndrewHoopes)