Brain image segmentation into grey/white matter

nipype
fmri

#1

Update to below question: nipype has a watershed algorithm to segment given image into white and grey matter. I am not sure though how to use this API. https://github.com/nipy/nipype/search?utf8=✓&q=WatershedSkullStrip&type=

I provide a .nii file in the in_file parameter. On calling the

skullstrip.cmdline
‘mri_watershed -T1 transforms/talairach_with_skull.lta T1.mgz brainmask.auto.mgz’

nothing happens. How to use this WaterShedSkullStrip() API so that a segmented image is ouput ?

Old question:
I have installed nilearn on my ubuntu 16.8 LTS. I am trying to implement some basic preprocessing steps to analyse abide datasets currently with the dparsf pipeline. I am wondering if nilearn has a way to segment the brain images into grey and white matter and compare the densities of these regions ?


#2

@MeenVen

In your case, you are just viewing the command that will be called. If you want to run the interface, you’ll want to use skullstrip.run().

Some more information on using Nipype’s interfaces can be found in the Nipype Tutorial. If you run into further issues, don’t hesitate to ask!


#3

Hi @mgxd thanks so much for replying :slight_smile:
i did run the cmd but it gives me the ‘command mri_watershed not found’. Should freesurfer software be installed for this to work ?


#4

Yes, for the most part Nipype serves as a command line wrapper for these commands, but the underlying software that does the calculations will need to be installed on the system.


#5

@MeenVen I would suggest having a look to http://fmriprep.org


#6

@oesteban @mgxd thanks for the suggestion. I am trying to analyse ABIDE datasets and i do not think it is available in the BIDS format. On my Ubuntu (16.04 LTS, 700 gb disk, 15 gb memory), i have already installed nilearn, nipype. freesurfer looks like >4 gb of space. Eventually my goal is to do some machine learning on the dataset. I installed CPAC but i’ve found it hard to get it configured and setup on a standalone machine.
i think fmriprep needs docker installed (openneuro processes only bids format datasets) but not sure if my ubuntu version has support for docker.
Can i do this installation on google cloud or aws ?I’d really appreciate suggestions on what combinations of software would serve the above task well.


#7

@MeenVen, datalad folks just released ABIDE in BIDS (http://datasets.datalad.org/?dir=/abide/RawDataBIDS). You can set up neurodebian on your ubuntu and apt install datalad. After that, datalad install and datalad get are your friends.

Docker is surely available through apt for your Ubuntu. Then FMRIPREP would take very easy steps (see http://fmriprep.readthedocs.io/en/latest/installation.html#docker-container) to run it on ABIDE.

You can also pip install fmriprep, however this way you will need to make sure that all the dependencies are met and functional (AFNI, ANTS, FreeSurfer, FSL, C3D, etc.).

HTH
Cheers,
Oscar


#8

that was very helpful. thanks!
I ended up using datalad and installed FSL for the segmentation. Using the Fast routine, is it possible to segment multiple images parallely? The UI seems to support just one file at a time which also takes 10-20 mins. Is there a tool for parallel segmentation of anatomical images ?
Thank you once again!


#9

Just for a complete disclosure – all the kudos for ABIDE in BIDS should go to INDI folks who released it in BIDS – we have just “exposed” it from their S3 (fcp-indi) bucket via DataLad. If you know/have more of interesting datasets in S3 let us know – it is quite easy to provide a git-annex repo for an S3 bucket (unless need to partition it more into sub-datasets etc)


#10

Kudos to INDI folks as well!

Datalad is now even more awesome with their data in it.