Code Monkey home page Code Monkey logo

neoseg's Introduction

neoSeg

Table of Contents

Introduction

This repository contains the work during the PhD of Carlos Tor-Díez, titled "Automatic segmentation of the cortical surface in neonatal brain MRI". It includes two main contributions:

  • patchBasedSegmentation.py, where several methods of label fusion (the final step of the multi-atlas segmentation approaches) are performed, including IMAPA [1].
  • topologicalCorrection.py, where a topological correction for segmentation is presented, which consists in a multi-scale, multi-label homotopic deformation [2].

Requirements

All scripts were coded in python 2.7, but we are working to be compatible to python 3.7.

Python packages
  • argparse
  • nibabel
  • numpy
  • scipy
  • time
  • itertools
  • multiprocessing
  • numba
  • math
  • random
  • matplotlib
  • scikit-image (skimage)
  • scikit-fmm (skfmm)

The file called requirements.txt helps to install all the python libraries.

  • Using pip:
pip install -r requirements.txt
  • Using anaconda:
conda install --file requirements.txt

Run

patchBasedSegmentation.py

Example of IMAPA application using a atlas set of two pairs of images using two iterations (alpha = 0 and alpha = 0.25) using 4 threads in parallel:

python neoSeg/patchBasedSegmentation.py  -i  brain.nii.gz -a  atlas1_registered_HM.nii.gz  atlas2_registered_HM.nii.gz -l  label1_propagated.nii.gz  label2_propagated.nii.gz  -mask mask.nii.gz  -m IMAPA  -hss 3  -hps 1  -k 15  -alphas 0 0.25  -t 4

i: input anatomical image

a: anatomical atlas images in the input space

l: label atlas images in the input space

mask: binary image for input

m: segmentation method chosen (LP, S_opt, I_opt, IS_opt or IMAPA)

hss: half search window size

hps: half patch size

k: k-Nearest Neighbors (kNN)

alphas: alphas parameter for IS_opt and IMAPA methods

t: Number of threads (0 for the maximum number of cores available)

Note: We recommend to previously register the intensity image from the atlas set to the input image, apply a histogram matching algorithm and propagate the transformations to the label maps.

topologicalCorrection.py

Coming soon...

Publications

  • [1] C. Tor-Díez, N. Passat, I. Bloch, S. Faisan, N. Bednarek and F. Rousseau, “An iterative multi-atlas patch-based approach for cortex segmentation from neonatal MRI,” Computerized Medical Imaging and Graphics, 70:73–82, 2018, hal-01761063.

  • [2] C. Tor-Díez, S. Faisan, L. Mazo, N. Bednarek, Hélène Meunier, I. Bloch, N. Passat and F. Rousseau, “Multilabel, multiscale topological transformation for cerebral MRI segmentation post-processing,” In 14th International Symposium on Mathematical Morphology (ISMM 2019), pp. 471–482, 2019, hal-01982972.

neoseg's People

Contributors

carlostor avatar rousseau avatar

Watchers

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