Skip to content

dipterix/threeBrainPy

Repository files navigation

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

# to allow Jupyter support
pip install threebrainpy threebrainpywidget

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

About

Python package for RAVE (threeBrain) viewer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published