/python_for_brain

Various scripts and jupyter notebooks with python code for brain image analysis and visualization

Primary LanguageJupyter Notebook

python_for_brain

Various scripts and jupyter notebooks with python code for brain image analysis and visualization.

Dependencies

To execute these scripts and jupyter notebooks I've used conda to create an environment and get the necessary libraries:

  1. Download and install Anaconda
  2. Create an environment:
conda env create -f environment.yml
source activate brain_env
  1. Install necessary packages:
conda install -n brain_env jupyter ipython numpy scipy scikit-learn nibabel matplotlib
pip install nilearn nipype

jupyter nbextension enable --py widgetsnbextension jupyter nbextension enable --py --sys-prefix ipyvolume

nilearn_brain_atlases.ipynb

Jupyter notebook with different nilearn atlases plots.

hagmann_connectome/

Code to download Hagmann connectome, to generate a NetworkX graph, and to write it to disk in gpickle format. Each node of the graph has its Brodmann Area.