Giter Club home page Giter Club logo

neurodisplay's Introduction

Neurodisplay

screenshot

This is a script that displays brain scan volumes as slices in three different views at the same time. It can show up to two different brain volumes at once for comparison. It can also overlay binary images to visualize segmentations.

Requirements

This script uses scans in a .nii.gz format, so the nibabel package is required. You also need opencv and numpy.

To install them, simply type the following, and press enter:

pip install -r requirements.txt

Run the script

To run the script, type the following and press enter:

python neurodisplay.py -i <volume_name.nii.gz> [-j <volume_name2.nii.gz> ...]

Replace the string <volume_name.nii.gz> from above with the path to your volume and add the following optional parameters as desired:

  • -j: path to a secondary brain volume for comparison which will be displayed below de first one.
  • -x: path to a binary segmentation volume which will be overlaid on the first volume.
  • -y: path to a secondary binary segmentation volume which will be overlaid on the second volume.

It is possible to provide only one brain volume and two segmentations. In that case, the same volume will be displayed on both rows.

Examples

Single brain volume:

python neurodisplay.py -i images/t1.nii.gz

Single brain volume with overlaid segmentation:

python neurodisplay.py -i images/t1.nii.gz -x pred/t1.nii.gz

Two brain volumes with overlaid segmentation:

python neurodisplay.py -i images/t1.nii.gz -j images_t1ce/t1ce.nii.gz -x pred/t1.nii.gz -y labels/lab.nii.gz

Usage

usage: neurodisplay.py [-h] -i I [-j J] [-x X] [-y Y]

Display neuroimages with binary labels. At least one brain image (-i) is required

optional arguments:
  -h, --help  show this help message and exit
  -i I        path to the top brain image (required)
  -j J        path to the bottom brain image
  -x X        path to the top label image
  -y Y        path to the bottom label image

neurodisplay's People

Contributors

iagooteroc avatar

Watchers

James Cloos avatar  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.