Skip to main content

WebGL-based 3D Brain for Python

The project is part of YAEL.

Check out live demo

Installation

Install from pypi:

# Bare minimal
pip install threebrainpy

Install from Github:

pip install pandas matplotlib
pip install git+https://github.com/dipterix/threebrainpy

Test the installation

Launch Python with your favorite editor, run the following Python commands. If you don't have FreeSurfer installed, replace path with any fs subject. If you don't have any, go to sample templates and download one.

import os
from threebrainpy.core import Brain

# You can replace `path` with any FreeSurfer-generated subject folder
path = os.path.join(os.environ["FREESURFER_HOME"], "subjects", "fsaverage")

brain = Brain(os.path.basename(path), path)
brain.add_slice("brain")
brain.add_slice("brain.finalsurf")
brain.add_surfaces("pial")
brain.render()

Documentation

Please check the documentation here.

Other implementations

This Python package implements the core functionalities. More advanced features will come soon.

The core script is written in JavaScript. The R implementation threeBrain is available on CRAN.

Here is a comparison of the Python vs R packages:

Feature R Python
3D Brain ✅ ✅
3D Electrodes ✅ ✅
Electrode Localization ✅ ❤️
Dashboard Integration ✅ ❤️
  • ✅ = implemented
  • ❤️ = will implement if I get enough requests or I get grants to do so

Sponsor

We are actively looking for grant fundings. It is super hard for software projects to apply for fundings. Your support will be greatly appreciated. Please email help at rave.wiki to join our slack channel if you want to:

  • Request a demos
  • Ask questions
  • Use our software
  • Collaborate with us

Metadata

Release files for threebrainpy 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for threebrainpy 0.1.2
File Size Uploaded Provenance Actions
threebrainpy-0.1.2.tar.gz 3.7 MB Without provenance Details for threebrainpy-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for threebrainpy 0.1.2
File Interpreter ABI Platform Actions
threebrainpy-0.1.2-py3-none-any.whl Python 3 none any Details for threebrainpy-0.1.2-py3-none-any.whl

Total release size: 7.4 MB

Release files / threebrainpy-0.1.2.tar.gz

Download URL threebrainpy-0.1.2.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
b66dbe5d8119d0ad89ae44c857c97b00d9d73e5536983621ecae1051aac7e830
BLAKE2b-256 checksum
How to use checksums
70b68f1e7ee2a49f7c2ac393e97e5c71d0279b457a60b8a20672caf216c88e0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / threebrainpy-0.1.2-py3-none-any.whl

Download URL threebrainpy-0.1.2-py3-none-any.whl
Size 3.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8f59bd3e082c92743aee610e7eabefd481f7210f947a09eb505fdb7aa493787d
BLAKE2b-256 checksum
How to use checksums
d21359818f99d4fda315a84945732b169202f62c7f9cf5bfe18bee1acf074710
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Security for threebrainpy 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page