Giter Club home page Giter Club logo

brainextractor's Introduction

brainextractor

A reimplementation of FSL's Brain Extraction Tool in Python.

Follows the algorithm as described in:

Smith SM. Fast robust automated brain extraction. Hum Brain Mapp.
2002 Nov;17(3):143-55. doi: 10.1002/hbm.10062. PMID: 12391568; PMCID: PMC6871816.

Install

To install, simply use pip to install this repo:

# install from pypi
pip install brainextractor

# install repo with pip
pip install git+https://github.com/vanandrew/brainextractor@main

# install from local copy
pip install /path/to/local/repo

Note that it is recommended to use brainextractor on python 3.7+

Usage

To extract a brain mask from a image, you can call:

# basic usage
brainextractor [input_image] [output_image]

# example
brainextractor /path/to/test_image.nii.gz /path/to/some_output_image.nii.gz

You can adjust the fractional intensity with the -f flag:

# with custom set threshold
brainextractor [input_image] [output_image] -f [threshold]

# example
brainextractor /path/to/test_image.nii.gz /path/to/some_output_image.nii.gz -f 0.4

To view the deformation process, you can use the -w flag to write the surfaces to a file. Then use brainextractor_render to view them:

# writes surfaces to file
brainextractor [input_image] [output_image] -w [surfaces_file]

# load surfaces and render
brainextractor_render [surfaces_file]

# example
brainextractor /path/to/test_image.nii.gz /path/to/some_output_image.nii.gz -w /path/to/surface_file.surfaces

brainextractor_render /path/to/surface_file.surfaces

If you need an explanation of the options at any time, simply run the help:

brainextractor --help

brainextractor's People

Contributors

vanandrew avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.