Giter Club home page Giter Club logo

nipype-preprocess-on-brain-mr's Introduction

Nipype: Preprocessing Pipeline on Brain MR Images

GM WM CSF

Tested on x86/64 Linux-based system.

The project is used to do preprocessing on brain MR images (.nii files).

There is a pipeline include those features:

  • Dockerize the environment
  • Auto AC-PC detection & alignment
  • Registration
  • Skull Stripping
  • Segmentation (using K-means to split GM, WM and CSF)
  • Visualize the results (using nilearn)

All the features implemented as nipype's interface are connected in a workflow.

Prerequisites

In this repo, the dataset is downloaded from LONI Image Data Archive (IDA). Collect and download AD and NC screening sample of ADNI1 and ADNI2, and extract them into this folder.

You can just place the .nii samples in ./data.

If you only have DICOM files, you can use DICOM to NIfTI Online Converter to convert them into NIfTI format.

For example, folder ./data structure is like this:

./data
├── 099_S_4206.nii
└── 099_S_4205.nii

0 directories, 2 files

Usage

  1. Build Neuro Docker image
docker build --tag neuro:latest --file Dockerfile.neuro .
  1. Build custom Docker image

We need to install custom tools in the Docker image.

docker build --tag neuro_custom:latest --file Dockerfile .
  1. Run the workflow
docker run --rm -it \
    --workdir /src \
    --volume ./src:/src \
    --volume ./utils:/utils \
    --volume ./data:/data \
    --volume ./output:/output \
    --name neuro_workflow \
    neuro_custom python workflow.py

Results

Segmentation results are shown as cover.

When the workflow ran successfully, all the results of each step will be saved in ./output.

And the workflow graph will be saved in ./src/graph_detailed.png.

workflow

Utilities

The useful Automatic Registration Toolbox we used are listed below:

  • acpcdetect v2.1 Linux
  • ATRA v1.0 Linux

They are downloaded from NITRC and put in ./utils.

Reference

Misc

Generate Neuro Dockerfile and Build Docker Image

  1. Install neurodocker

    pip install neurodocker
  2. Generate Dockerfile using neurodocker

    neurodocker generate docker \
        --pkg-manager apt \
        --base-image neurodebian:bullseye \
        --fsl version=6.0.5.1 \
        --ants version=2.4.1 \
        --miniconda version=latest conda_install="nipype" \
    > Dockerfile.neuro
  3. Build the docker image with the generated Dockerfile

    docker build --tag neuro:latest --file Dockerfile.neuro .

Contributor

Nat Lee
Nat Lee

nipype-preprocess-on-brain-mr's People

Contributors

natlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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