Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Mar 19:10:e65751.
doi: 10.7554/eLife.65751.

Visualizing anatomically registered data with brainrender

Affiliations

Visualizing anatomically registered data with brainrender

Federico Claudi et al. Elife. .

Abstract

Three-dimensional (3D) digital brain atlases and high-throughput brain-wide imaging techniques generate large multidimensional datasets that can be registered to a common reference frame. Generating insights from such datasets depends critically on visualization and interactive data exploration, but this a challenging task. Currently available software is dedicated to single atlases, model species or data types, and generating 3D renderings that merge anatomically registered data from diverse sources requires extensive development and programming skills. Here, we present brainrender: an open-source Python package for interactive visualization of multidimensional datasets registered to brain atlases. Brainrender facilitates the creation of complex renderings with different data types in the same visualization and enables seamless use of different atlas sources. High-quality visualizations can be used interactively and exported as high-resolution figures and animated videos. By facilitating the visualization of anatomically registered data, brainrender should accelerate the analysis, interpretation, and dissemination of brain-wide multidimensional data.

Keywords: anatomy; data visualization; neuroscience; none; open source; software.

PubMed Disclaimer

Conflict of interest statement

FC, AT, LP, TM, RP, TB No competing interests declared

Figures

Figure 1.
Figure 1.. Design principles.
(A) Schematic illustration of how different types of data can be loaded into brainrender using either brainrender’s own functions, software packages from the BrainGlobe suite, or custom Python scripts. All data loaded into brainrender is converted to a unified format, which simplifies the process of visualizing data from different sources. (B) Using brainrender with different atlases. Visualization of brain atlas data from three different atlases using brainrender. Left, Allen atlas of the mouse brain showing the superficial (SCs) and motor (SCm) subdivisions of the superior colliculus and the Zona Incerta (data from Wang et al., 2020). Middle, visualization of the cerebellum and tectum in the larval zebrafish brain (data from Kunst et al., 2019). Right, visualization of the precentral gyrus, postcentral gyrus, and temporal lobe of the human brain (data from Ding et al., 2016). (C) The brainrender GUI. Mouse, human, and zebrafish larvae drawings from scidraw.io (doi.org/10.5281/zenodo.3925991, doi.org/10.5281/zenodo.3926189, doi.org/10.5281/zenodo.3926123).
Figure 2.
Figure 2.. Code examples.
Example python code for visualizing brain regions in the mouse and larval zebrafish brains. The same commands can be used for both atlases and switching between atlases can be done by simply specifying which atlas to use when creating the visualization. Further examples can be found in brainrender’s GitHub repository.
Figure 3.
Figure 3.. Visualizing different types of data in brainrender.
(A) Spread of fluorescence labeling following viral injection of AAV2-CRE-eGPF in the superior colliculus of two FLEX-TdTomato mice. 3D objects showing the injection sites were created using custom python scripts following acquisition of a 3D image of the entire brain with serial two-photon tomography and registration of the image data to the atlas’ template (with brainreg, Tyson et al., 2020a). (B) Streamlines visualization of efferent projections from the mouse primary motor cortex following injection of an anterogradely transported virus expressing fluorescent proteins (original data from Oh et al., 2014), downloaded from (Neuroinformatics NL with brainrender). (C) Visualization of the location of several implanted neuropixel probes from multiple mice (data from Steinmetz et al., 2019). Dark salmon colored tracks show probes going through both primary/anterior visual cortex (VISp/VISa) and the dorsal lateral geniculate nucleus of the thalamus. (D) Single periaqueductal gray (PAG) neuron. The PAG and superior colliculus are also shown. The neuron’s morphology was reconstructed by targeting the expression of fluorescent proteins in excitatory neurons in the PAG via an intersectional viral strategy, followed by imaging of cleared tissue and manual reconstruction of the neuron’s morphology with Vaa3D software. Data were registered to the Allen atlas with SHARPTRACK (Shamash et al., 2018). The 3D data was saved as a .stl file and loaded directly into brainrender. (E) Gene expression data. Left, expression of genes ‘brn3c’ and ‘nk1688CGt’ in the tectum of the larval zebrafish brain (gene expression data from fishatlas.neuro.mpg.de, 3D objects created with custom python scripts). Right, expression of gene ‘Gpr161’ in the mouse hippocampus (gene expression data from Wang et al., 2020), downloaded with brainrender (3D objects created with brainrender). Colored voxels show voxels with high gene expressions. The CA1 field of the hippocampus is also shown.
Figure 4.
Figure 4.. Visualizing cell location and morphological data.
(A) Visualizing the location of labeled cells. Left, visualization of fluorescently labeled cells identified using cellfinder (data from Tyson and Rousseau, 2020b). Right, visualization of functionally defined clusters of regions of interest in the brain of a zebrafish larvae during a visuomotor task (data from Markov et al., 2020). (B) Visualizing neuronal morphology data. Left, three secondary motor cortex neurons projecting to the thalamus (data from Winnubst et al., 2019, downloaded with morphapi from neuromorpho.org, Ascoli et al., 2007). Right, morphology of cerebellar neurons in larval zebrafish (data from Kunst et al., 2019), (downloaded with morphapi). In the left panel of (A and B), the brain outline was sliced along the midline to expose the data.
Figure 5.
Figure 5.. Code examples.
(A) Example code to visualize a set of labeled cells coordinates using the Points actor class. (B) Code example illustrating how to override brainrender’s default settings and how to use custom camera settings. (C) Code example showing how custom mesh objects saved as .obj and .stl files can be visualized in brainrender. (D) Example usage of brainrender’s Animation class to create custom animations. Further examples can be found in brainrender’s GitHub repository.
Figure 6.
Figure 6.. Advanced code examples.
(A) Example code to measure the distance between actors and if a given actor is contained in a target brain region. Left: virus injection volumes (red and gray) reconstructed from virus injections targeted at the superior colliculus (magenta). Gray colored injection volumes show data from the Allen Mouse Connectome Oh et al., 2014. Right: example code to measure the distance between the center of two brainrender actors and to check if an actor’s center is contained in a brain region of interest. (B) Code example illustrating how check if a point (e.g., representing a labeled cell) is in a brain region of interest. Left: visualization of reconstructed probe positions from several individual animals, data from Steinmetz et al., 2019. Probe channels located in the thalamus (red) are highlighted. Right: example code showing how to use BrainGlobe’s AtlasAPI to verify whether a point (here representing a probe channel) is contained in a brain region of interest or any of its substructures. Further examples can be found in brainrender’s GitHub repository.

References

    1. Adkins RS, Aldridge AI, Allen S, Ament SA, An X, Armand E, BRAIN Initiative Cell Census Network (BICCN) A multimodal cell census and atlas of the mammalian primary motor cortex. bioRxiv. 2020 doi: 10.1101/2020.10.19.343129. - DOI - PMC - PubMed
    1. Arganda-Carreras I, Manoliu T, Mazuras N, Schulze F, Iglesias JE, Bühler K, Jenett A, Rouyer F, Andrey P. A statistically representative Atlas for mapping neuronal circuits in the Drosophila Adult Brain. Frontiers in Neuroinformatics. 2018;12:13. doi: 10.3389/fninf.2018.00013. - DOI - PMC - PubMed
    1. Arshadi C, Eddison M, Gunther UA, Harrington KI. SNT: a unifying toolbox for quantification of neuronal anatomy. bioRxiv. 2020 doi: 10.1101/2020.07.13.179325. - DOI - PubMed
    1. Ascoli GA, Donohue DE, Halavi M. NeuroMorpho.Org: a central resource for neuronal morphologies. Journal of Neuroscience. 2007;27:9247–9251. doi: 10.1523/JNEUROSCI.2055-07.2007. - DOI - PMC - PubMed
    1. Bates AS, Manton JD, Jagannathan SR, Costa M, Schlegel P, Rohlfing T, Jefferis GS. The Natverse, a versatile toolbox for combining and analysing neuroanatomical data. eLife. 2020;9:e53350. doi: 10.7554/eLife.53350. - DOI - PMC - PubMed

Publication types

LinkOut - more resources