# WebGL-based 3D Brain for Python
The project is part of [YAEL](https://yael.wiki/).
[![Check out live demo](docs/assets/images/showcase-01.png)](https://dipterix.org/threeBrainPy/showcase-viewer/)
## Installation
### Install from `pypi`:
```sh
# Bare minimal
pip install threebrainpy
# to allow Jupyter support
pip install threebrainpy threebrainpywidget
```
### Install from `Github`:
```sh
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](https://github.com/dipterix/threeBrain-sample/releases) and download one.
```python
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](https://dipterix.org/threeBrainPy/).
## Other implementations
This Python package implements the core functionalities. More advanced features will come soon.
The core script is written in [JavaScript](https://github.com/dipterix/three-brain-js). The R implementation [threeBrain](https://github.com/dipterix/threeBrain) is available on [CRAN](https://cran.r-project.org/package=threeBrain).
Here is a comparison of the Python vs R packages:
| Feature | R | Python |
|---------|--------|---|
| 3D Brain | :white_check_mark: | :white_check_mark: |
| 3D Electrodes | :white_check_mark: | :white_check_mark: |
| Electrode Localization | :white_check_mark: | :heart: |
| Dashboard Integration | :white_check_mark: | :heart: |
* :white_check_mark: = implemented
* :heart: = will implement if I get enough requests or I get grants to do so
# Sponsor
There has been no sponsor in this Python project yet. It is super hard and discouraging 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
Raw data
{
"_id": null,
"home_page": "https://github.com/dipterix/threeBrainPy",
"name": "threebrainpy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "iEEG,DBS,Visualization,Neuroscience,Electrophysiology,Electrode,Localizer",
"author": "Zhengjia Wang",
"author_email": "dipterix.wang@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c4/82/63d89c6201cf77d872b6901ab1c48edeccbbb972df89fcd7b4af20555a56/threebrainpy-0.1.0.tar.gz",
"platform": null,
"description": "# WebGL-based 3D Brain for Python\n\nThe project is part of [YAEL](https://yael.wiki/). \n\n[![Check out live demo](docs/assets/images/showcase-01.png)](https://dipterix.org/threeBrainPy/showcase-viewer/)\n\n## Installation\n\n### Install from `pypi`:\n\n```sh\n# Bare minimal\npip install threebrainpy\n\n# to allow Jupyter support\npip install threebrainpy threebrainpywidget\n```\n\n\n### Install from `Github`:\n\n```sh\npip install pandas matplotlib\npip install git+https://github.com/dipterix/threebrainpy\n```\n\n### Test the installation\n\nLaunch 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](https://github.com/dipterix/threeBrain-sample/releases) and download one.\n\n```python\nimport os\nfrom threebrainpy.core import Brain\n\n# You can replace `path` with any FreeSurfer-generated subject folder\npath = os.path.join(os.environ[\"FREESURFER_HOME\"], \"subjects\", \"fsaverage\")\n\nbrain = Brain(os.path.basename(path), path)\nbrain.add_slice(\"brain\")\nbrain.add_slice(\"brain.finalsurf\")\nbrain.add_surfaces(\"pial\")\nbrain.render()\n```\n\n## Documentation\n\nPlease check the documentation [here](https://dipterix.org/threeBrainPy/).\n\n\n## Other implementations\n\nThis Python package implements the core functionalities. More advanced features will come soon. \n\nThe core script is written in [JavaScript](https://github.com/dipterix/three-brain-js). The R implementation [threeBrain](https://github.com/dipterix/threeBrain) is available on [CRAN](https://cran.r-project.org/package=threeBrain).\n\nHere is a comparison of the Python vs R packages:\n\n| Feature | R | Python |\n|---------|--------|---|\n| 3D Brain | :white_check_mark: | :white_check_mark: |\n| 3D Electrodes | :white_check_mark: | :white_check_mark: |\n| Electrode Localization | :white_check_mark: | :heart: |\n| Dashboard Integration | :white_check_mark: | :heart: |\n\n* :white_check_mark: = implemented\n* :heart: = will implement if I get enough requests or I get grants to do so\n\n# Sponsor\n\nThere has been no sponsor in this Python project yet. It is super hard and discouraging 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:\n\n* Request a demos\n* Ask questions\n* Use our software\n* Collaborate with us\n\n\n",
"bugtrack_url": null,
"license": "Mozilla Public License 2.0 (MPL 2.0)",
"summary": "Your Advanced Electrode Localizer Viewer for Python",
"version": "0.1.0",
"project_urls": {
"Bug Reports": "https://github.com/dipterix/threeBrainPy/issues",
"Homepage": "https://github.com/dipterix/threeBrainPy",
"Project Website": "https://yael.wiki/",
"Source": "https://github.com/dipterix/threeBrainPy/"
},
"split_keywords": [
"ieeg",
"dbs",
"visualization",
"neuroscience",
"electrophysiology",
"electrode",
"localizer"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8aed0aaa7db69336acd3a70fe7710731b9a456afb827f6476cf82c8b56332030",
"md5": "f9ca4a51c1ea54774ba34c46dcda2b91",
"sha256": "17720d36d2cb7d5cfb279a07eeb619279496ca80eee8874dbbd51596621fa768"
},
"downloads": -1,
"filename": "threebrainpy-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f9ca4a51c1ea54774ba34c46dcda2b91",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 2182072,
"upload_time": "2023-08-28T19:17:45",
"upload_time_iso_8601": "2023-08-28T19:17:45.080027Z",
"url": "https://files.pythonhosted.org/packages/8a/ed/0aaa7db69336acd3a70fe7710731b9a456afb827f6476cf82c8b56332030/threebrainpy-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c48263d89c6201cf77d872b6901ab1c48edeccbbb972df89fcd7b4af20555a56",
"md5": "665de8ba18a377d998e08d499caacc62",
"sha256": "c7bc76f2f4ddcbc1ab92e04842aac452817ab4f4ac84f2fcbe7a28964a71fe27"
},
"downloads": -1,
"filename": "threebrainpy-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "665de8ba18a377d998e08d499caacc62",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 2155053,
"upload_time": "2023-08-28T19:17:48",
"upload_time_iso_8601": "2023-08-28T19:17:48.765901Z",
"url": "https://files.pythonhosted.org/packages/c4/82/63d89c6201cf77d872b6901ab1c48edeccbbb972df89fcd7b4af20555a56/threebrainpy-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-28 19:17:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dipterix",
"github_project": "threeBrainPy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "threebrainpy"
}