Skip to main content

simpleBrainPlot is a small python package to create simple line-art brain plots, modified from matlab package Simple-Brain-Plot, https://github.com/dutchconnectomelab/Simple-Brain-Plot

Project description

pySimpleBrainPlot

This package is the python version of matlab package Simple-Brain-Plot contributed by Scholtens, Lianne H, de Lange, Siemon C, and van den Heuvel, Martijn P. The original matlab package can be found at: https://github.com/dutchconnectomelab/Simple-Brain-Plot

Atlases available

This tool can be used to visualize the brain areas in the following atlases:

‘Desikan-Killiany’ aparc cortical atlas as present in FreeSurfer [1].

‘Desikan-Killiany’ aparc+aseg combined cortical and subcortical atlas as present in FreeSurfer [1].

120 regions Cammoun sub-parcellation of the Desikan-Killiany cortical atlas [2].

120 regions Cammoun sub-parcellation of the Desikan-Killiany cortical atlas with ASEG subcortical regions [2].

250 regions Cammoun sub-parcellation of the Desikan-Killiany atlas [2].

39 regions combined Walker-von Bonin and Bailey (WBB47) parcellation atlas of the macaque [3][4][5][6].

Installation

This package now can be installed from PyPI using pip:

pip install pysimplebrainplot

Usage

import numpy as np
import pySimpleBrainPlot as sbp

values = np.random.uniform(-1,1,128)

sbp.plotBrain('lausanne120_aseg', values)

Parameters

atlas (str): name of the atlas to be used.
    'aparc' - Desikan-Killiany atlas (68 regions)
    'aparc_aseg' - Desikan-Killiany atlas + subcortical ASEG segmentation (82 regions)
    'lausanne120' - 120 regions Cammoun sub-parcellation of the Desikan-Killiany atlas (114 regions)
    'lausanne120_aseg' - 120 regions Cammoun sub-parcellation + subcortical ASEG segmentation (128 regions)
    'lausanne250' - 250 regions Cammoun sub-parcellation (219 regions)
    'wbb47' - 39 regions combined Walker-von Bonin and Bailey parcellation atlas of the macaque (39 regions)

values (array): values to be plotted. Should be a vector with the same length as the number of regions in the atlas.

vmin (float): minimum value to be plotted. If None, the minimum value in the values vector is used.

vmax (float): maximum value to be plotted. If None, the maximum value in the values vector is used.

save_path (str): path to save the svg file.

save_file (str): prefix of the svg file.

cm (str): name of the colormap to be used. Should be a default matplotlib colormap.

scaling (float): scaling factor for the size of the svg. Default is 0.1.

viewer (bool): if True, the svg is opened in the default browser. Default is False.

Overview of the atlases

References

[1] Rahul S. Desikan, Florent Ségonne, Bruce Fischl, Brian T. Quinn, Bradford C. Dickerson, Deborah Blacker, Randy L. Buckner, Anders M. Dale, R. Paul Maguire, Bradley T. Hyman, Marilyn S. Albert, and Ronald J. Killiany. An automated labeling system for subdividing the human cerebral cortex on mri scans into gyral based regions of interest. NeuroImage, 31(3):968–80, 2006. URL: http://www.sciencedirect.com/science/article/pii/S1053811906000437, doi:10.1016/j.neuroimage.2006.01.021.

[2] Leila Cammoun, Xavier Gigandet, Djalel Meskaldji, Jean Philippe Thiran, Olaf Sporns, Kim Q. Do, Philippe Maeder, Reto Meuli, and Patric Hagmann. Mapping the human connectome at multiple scales with diffusion spectrum mri. Journal of Neuroscience Methods, 203(2):386–397, 2012. doi:10.1016/j.jneumeth.2011.09.031.

[3] Lianne H. Scholtens, Ruben Schmidt, Marcel A. de Reus, Martijn P. van den Heuvel. Linking Macroscale Graph Analytical Organization to Microscale Neuroarchitectonics in the Macaque Connectome. Journal of Neuroscience 3 September 2014, 34 (36) 12192-12205; URL: https://www.jneurosci.org/content/34/36/12192.short DOI: 10.1523/JNEUROSCI.0752-14.2014

[4] Stephan KE, Hilgetag CC, Burns GA, O'Neill MA, Young MP, Kötter R. Computational analysis of functional connectivity between areas of primate cerebral cortex. Philos Trans R Soc Lond B Biol Sci 355:111–126, 2000. URL: https://royalsocietypublishing.org/doi/abs/10.1098/rstb.2000.0552 doi:10.1098/rstb.2000.0552, pmid:10703047

[5] von Bonin G, Bailey P. The neocortex of Macaca mulatta. 1947. University of Illinois, Urbana, IL.

[6] Walker EA. A cytoarchitectural study of the prefrontal area of the macaque monkey. J Comp Neurol 73:59–86, 1940. doi:10.1002/cne.900730106

[7] Scholtens, Lianne H, de Lange, Siemon C, and van den Heuvel, Martijn P. 2021. “Simple Brain Plot”. Zenodo. https://doi.org/10.5281/zenodo.5346593

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pySimpleBrainPlot-0.0.4.tar.gz (427.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pySimpleBrainPlot-0.0.4-py3-none-any.whl (427.6 kB view details)

Uploaded Python 3

File details

Details for the file pySimpleBrainPlot-0.0.4.tar.gz.

File metadata

  • Download URL: pySimpleBrainPlot-0.0.4.tar.gz
  • Upload date:
  • Size: 427.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pySimpleBrainPlot-0.0.4.tar.gz
Algorithm Hash digest
SHA256 3f69beff98e9f15003e1a1dfb0a3ffdb1ded54e26ce022220398d623aea0649d
MD5 e19fe18c28a3944bbfca758f4018654f
BLAKE2b-256 15c0078b9cd44be6c78156dac1869b0f9208c247b8925a516748baa2d388558c

See more details on using hashes here.

File details

Details for the file pySimpleBrainPlot-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pySimpleBrainPlot-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fe328e8c14d342503cd2571607c7c25e16797ce3accf084775c6a914442de8f4
MD5 483607d8aff4d6991c886accaac6db46
BLAKE2b-256 8b99dd899e0cad710ac342fc1cd1a10d31dd78657c672cbe19c2315b972b5eac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page