Git Product home page Git Product logo

marga's Introduction

MARGA (Multispectral Adaptive Region Growing Algorithm)

About:

MARGA (Multispectral Adaptive Region Growing Algorithm) is a skull stripping algorithm that uses the complementary information provided by conventional MRI such as T1-weighted and T2-weighted to perform the brain segmentation in axial views and low quality images. The seed regions are spread using a 2D RG algorithm which behaves differently in specific zones of the brain, allowing to deal with the fact that middle MRI slices have better image contrast between the brain and non-brain regions than superior and inferior brain slices where the contrast is smaller.

Please browse the SALEM webpage for more information (http://eia.udg.edu/salem/margaToolbox).

Installation:

MARGA has been developed using the Insight ToolKit. In order to compile some of the code included, you should have a working itk installation (detailed installation instructions for windows and linux can be found at http://www.itk.org/CourseWare/Training/GettingStarted-I.pdf).

It can be compiled using the included cmakelist.txt file with the cmake cross platform compilation tool.

Known issues:

  • The code provided has been compiled with itk 4.x .

  • For some reason, the cxx compiler g++ is not installed by default in some ubuntu distributions. Fix this with : sudo apt-get install g++

  • Also itk needs the uuid tool but does not say so, you can install it from the ubuntu software center , then you will also need the development files so you also have to run: sudo apt-get install uuid-dev

  • When configuring itk with cmake (after having followed the guidelines), you need to set two flags (press "t" to see the flags and set ITK_USE_OPTIMIZED_REGISTRATION and ITK_USE_REVIEW to ON.

To re-compile this code run the following commands:

$ cd MARGA/Build
$ ccmake ../
$ make -j 4 //depending on your number of cores
$ make install -j 4 //depending on your number of cores

Usage:

Data formats: All tests have been run using the .nii (NIFTI) format. If you need to perform conversions from nifti, you might want to use the "dcm2nii" tool (can be found in the ubuntu software centre).

Running the shell script Process.sh:

input source path
input T1 image
input T2 image
output image

./Process ./SourcePath ./sourceT1_image ./sourceT2_image ./output_image"

*Attention: All the images must be entered without the extension!

However, MARGA can be applied directly to a single image with different parameters to play around:

Marga -input <filename> [OPTIONS] 

	OPTIONS:
		-output <filename> -> mask image filename (default: MARGA_mask.nii)
		-t_lower <float> -> Lower threshold (default: 0.35)
		-t_upper <float> -> Upper threshold (default: 0.80)
		-minSlice <int> ->  Minimum slice where to cut the process (default: 0)
		-maxSlice <int> ->  Maximum slice where to cut the process <numberOfSlices - maxSlice> (default: 0)
		-minSm <int> ->  Minimum slice where to reduce the threshold in 0.03 (default: 0)
		-maxSm <int> ->  Maximum slice where to reduce the threshold in 0.03 <numberOfSlices - maxSm> (default: 0)
		-dilateRadius <int> -> Radius in mm used in the dilation morphological operation (default: 5mm)
		-erodeRadius <int> ->  Radius in mm used in the erosion morphological operation (default: 5mm)

********************************************************************************
	Default command: 
		Marga -input T1.nii -output MARGA_mask.nii -t_lower 0.35 -t_upper 0.8 -minSlice 0 -maxSlice 0 -minSm 0 -maxSm 0 -dilateRadius 5 -erodeRadius 5

With this last release, althoug originally it was thought to be applied on T1w and T2w image of 1.5T, it has been tested over 3T FLAIR images obtaining a good performance.

marga's People

Contributors

eloyroura avatar

Watchers

 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.