brainrender

A Python package to visualise neuroanatomical data in atlas space

https://github.com/brainglobe/brainrender

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    3 of 20 committers (15.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

anatomy neuroscience python visualization

Keywords from Contributors

microscopy atlases brain registration visualisation image-analysis cell-detection imaging neuroanatomy animal
Last synced: 4 months ago · JSON representation ·

Repository

A Python package to visualise neuroanatomical data in atlas space

Basic Info
Statistics
  • Stars: 590
  • Watchers: 16
  • Forks: 90
  • Open Issues: 11
  • Releases: 21
Topics
anatomy neuroscience python visualization
Created over 6 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

brainrender

A user-friendly python library to create high-quality, 3D neuro-anatomical renderings combining data from publicly available brain atlases with user-generated experimental data.

Python Version PyPI tests codecov Downloads

   

Example gallery

From: Claudi et al. (2021) Visualizing anatomically registered data with brainrender. eLife

Documentation

brainrender is a project of the BrainGlobe Initiative, which is a collaborative effort to develop a suite of Python-based software tools for computational neuroanatomy. A comprehensive online documentation for brainrender can be found on the BrainGlobe website here.

Furthermore, an open-access journal article describing BrainRender has been published in eLife, available here.

Installation

From PyPI:

pip install brainrender

Quickstart

``` python import random

import numpy as np

from brainrender import Scene from brainrender.actors import Points

def getnrandompointsin_region(region, N): """ Gets N random points inside (or on the surface) of a mesh """

region_bounds = region.mesh.bounds()
X = np.random.randint(region_bounds[0], region_bounds[1], size=10000)
Y = np.random.randint(region_bounds[2], region_bounds[3], size=10000)
Z = np.random.randint(region_bounds[4], region_bounds[5], size=10000)
pts = [[x, y, z] for x, y, z in zip(X, Y, Z)]

ipts = region.mesh.inside_points(pts).coordinates
return np.vstack(random.choices(ipts, k=N))

Display the Allen Brain mouse atlas.

scene = Scene(atlasname="allenmouse_25um", title="Cells in primary visual cortex")

Display a brain region

primaryvisual = scene.addbrain_region("VISp", alpha=0.2)

Get a numpy array with (fake) coordinates of some labelled cells

coordinates = getnrandompointsinregion(primaryvisual, 2000)

Create a Points actor

cells = Points(coordinates)

Add to scene

scene.add(cells)

Add label to the brain region

scene.addlabel(primaryvisual, "Primary visual cortex")

Display the figure.

scene.render()

```

Seeking help or contributing

We are always happy to help users of our tools, and welcome any contributions. If you would like to get in contact with us for any reason, please see the contact page of our website.

Citing brainrender

If you use brainrender in your scientific work, please cite: Claudi, F., Tyson, A. L., Petrucco, L., Margrie, T.W., Portugues, R., Branco, T. (2021) "Visualizing anatomically registered data with Brainrender&quot; <i>eLife</i> 2021;10:e65751 [doi.org/10.7554/eLife.65751](https://doi.org/10.7554/eLife.65751)

BibTeX:

``` bibtex @article{Claudi2021, author = {Claudi, Federico and Tyson, Adam L. and Petrucco, Luigi and Margrie, Troy W. and Portugues, Ruben and Branco, Tiago}, doi = {10.7554/eLife.65751}, issn = {2050084X}, journal = {eLife}, pages = {1--16}, pmid = {33739286}, title = {{Visualizing anatomically registered data with brainrender}}, volume = {10}, year = {2021} }

```

Owner

  • Name: BrainGlobe
  • Login: brainglobe
  • Kind: organization
  • Location: London/Munich

Open python tools for morphological analyses in systems neuroscience

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: brainrender
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Federico
    family-names: Claudi
  - given-names: Adam
    family-names: Tyson
    email: hello@brainglobe.info
  - given-names: Luigi
    family-names: Petrucco
  - given-names: BrainGlobe
    family-names: Developers
    email: hello@brainglobe.info
repository-code: 'https://github.com/brainglobe/brainrender'
url: 'https://brainglobe.info'
abstract: >-
  Visualisation and exploration of brain atlases and other
  anatomical data.
license: BSD-3-Clause
date-released: '2024-01-25'
year: 2024
preferred-citation:
  type: article
  title: "Visualizing anatomically registered data with brainrender"
  authors:
  - given-names: Federico
    family-names: Claudi
  - given-names: Adam
    family-names: Tyson
  - given-names: Luigi
    family-names: Petrucco
  - given-names: Troy W.
    family-names: Margrie
  - given-names: Ruben
    family-names: Portugues
  - given-names: Tiago
    family-names: Branco
  year: 2021
  month: 3
  doi: 10.7554/eLife.65751
  url: https://doi.org/10.7554/eLife.65751
  journal: eLife
  volume: 10
  issn: "2050-084X"
  pages: e65761

GitHub Events

Total
  • Create event: 20
  • Release event: 3
  • Issues event: 24
  • Watch event: 42
  • Delete event: 17
  • Issue comment event: 79
  • Push event: 29
  • Pull request review event: 23
  • Pull request review comment event: 3
  • Pull request event: 45
  • Fork event: 13
Last Year
  • Create event: 20
  • Release event: 3
  • Issues event: 24
  • Watch event: 42
  • Delete event: 17
  • Issue comment event: 79
  • Push event: 29
  • Pull request review event: 23
  • Pull request review comment event: 3
  • Pull request event: 45
  • Fork event: 13

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 801
  • Total Committers: 20
  • Avg Commits per committer: 40.05
  • Development Distribution Score (DDS): 0.316
Past Year
  • Commits: 10
  • Committers: 6
  • Avg Commits per committer: 1.667
  • Development Distribution Score (DDS): 0.7
Top Committers
Name Email Commits
FedeClaudi f****i@p****m 548
federico claudi f****i@g****m 163
Adam Tyson a****n@u****k 38
federico claudi f****i@f****l 23
Roberto DF 3****F 5
pre-commit-ci[bot] 6****] 3
Rob Campbell g****t@r****m 3
mcol m****l@p****t 2
Luigi Petrucco l****o@g****m 2
Paul Brodersen p****n@g****m 2
federico claudi f****i@e****k 2
Adam Tyson c****e@a****m 2
Ben Dichter b****r@g****m 1
Carter Peene r****e@g****m 1
marcomusy m****y@g****m 1
federico claudi f****i@e****k 1
Sebastian Lammers 3****s 1
Sean Martin m****7@t****e 1
carlocastoldi 3****i 1
4iar 4****r 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 153
  • Total pull requests: 147
  • Average time to close issues: 3 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 83
  • Total pull request authors: 21
  • Average comments per issue: 4.2
  • Average comments per pull request: 1.52
  • Merged pull requests: 134
  • Bot issues: 0
  • Bot pull requests: 36
Past Year
  • Issues: 15
  • Pull requests: 40
  • Average time to close issues: 19 days
  • Average time to close pull requests: 4 days
  • Issue authors: 10
  • Pull request authors: 6
  • Average comments per issue: 2.47
  • Average comments per pull request: 1.28
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 18
Top Authors
Issue Authors
  • adamltyson (18)
  • alessandrofelder (16)
  • IgorTatarnikov (5)
  • FedeClaudi (4)
  • RobertoDF (4)
  • horsto (3)
  • orena1 (3)
  • harshk95 (3)
  • mkunst23 (3)
  • vigji (2)
  • GuillaumeLeGoc (2)
  • janfpl (2)
  • Eddymorphling (2)
  • mabbasi6 (2)
  • MathieuBo (2)
Pull Request Authors
  • adamltyson (52)
  • pre-commit-ci[bot] (46)
  • IgorTatarnikov (38)
  • alessandrofelder (19)
  • willGraham01 (10)
  • FedeClaudi (9)
  • RobertoDF (5)
  • carlocastoldi (4)
  • paulbrodersen (4)
  • lochhh (2)
  • jingjie-li (2)
  • GuillaumeLeGoc (2)
  • K-Meech (2)
  • Spkap (2)
  • seblammers (1)
Top Labels
Issue Labels
bug (84) enhancement (37) help wanted (2) good first issue (2) Volumetric data (2) GUI (1) question (1) documentation (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 1,635 last-month
  • Total dependent packages: 6
    (may contain duplicates)
  • Total dependent repositories: 5
    (may contain duplicates)
  • Total versions: 113
  • Total maintainers: 2
pypi.org: brainrender

Visualisation and exploration of brain atlases and other anatomical data

  • Versions: 95
  • Dependent Packages: 6
  • Dependent Repositories: 5
  • Downloads: 1,635 Last month
Rankings
Dependent packages count: 2.4%
Average: 5.1%
Downloads: 6.5%
Dependent repos count: 6.6%
Maintainers (2)
Last synced: 5 months ago
proxy.golang.org: github.com/brainglobe/brainrender
  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.6%
Dependent repos count: 10.2%
Last synced: 4 months ago