Automated plotting of neuroimaging maps from Python using Connectome Workbench.
This package is intended for users who want to generate images which illustrate scalar data on a brain surface, from within their Python scripts.
Installation
Step 1. Make sure you have Connectome Workbench v1.3+ installed.
- If running
wb_viewfrom a terminal yieldscommand not found, see https://www.humanconnectome.org/software/connectome-workbench/ - If you have Workbench 1.2 or below installed, you will get an error message
Step 2. Install wbplot and dependencies.
- Clone the repository and install manually:
git clone https://github.com/jbburt/wbplot.git - Or just use pip:
pip install wbplot
Usage
Assuming x is a NumPy array containing scalar values mapped onto each of the
360 parcels in the Human Connectome Project's MMP1.0 parcellation:
from wbplot import pscalar
pscalar("/path/to/image.png", x)
Assuming y is a NumPy array containing dense scalar values mapped onto the 59412
surface vertices in a standard bilateral 32k surface mesh:
from wbplot import dscalar
dscalar("/path/to/image.png", y)
Notes
wbplotcurrently only supports cortical data. Parcellated data must also be in the HCP MMP1.0 parcellation. Dense data must be registered to a standard 32k surface mesh.- Down the line I'd be open to adding subcortical support and other functionality if people are interested.
- More detailed explanations of the functionality can be found in the scripts in the
examplesdirectory.
Change Log
- 1.0.14 Fixed an issue that caused
wbplotto break when usingnibabel>=3.2.0. - 1.0.13 Attempted to fix a bug which threw an error on Windows machines. FOLLOW-UP: Due to Connectome Workbench itself, Windows is currently NOT SUPPORTED.
- 1.0.12 Fixed bug in list of available colormaps; ROY-BIG-BL and videen_style are now supported.
- 1.0.11 Dependency version updates.
- 1.0.10 Patched keyword argument bug in wbplot.dscalar.
- 1.0.9 Fixed bug in images.check_dscalars().
- 1.0.8 Fixed it for real now.
- 1.0.7 Fixed type checking bug in
imagesmodule. - 1.0.6 Added errors raised to docstrings and cleaned up a few files.
- 1.0.5 Last patch didn't fix the problem.
- 1.0.4 ImageParcellated loaded into dense scenes resulted in error messages printed to console.
- 1.0.3 Entirely changed the way data are read from and written to, to circumnavigate permissions issues.
- 1.0.2 Error in MANIFEST.in -- not all necessary data files included in build.
- 1.0.1 Small error in README.
- 1.0 Initial release.
Metadata
Release files for wbplot 1.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wbplot-1.0.14.tar.gz | 20.2 MB | Without provenance | Details for wbplot-1.0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wbplot-1.0.14-py3-none-any.whl | Python 3 | none | any | Details for wbplot-1.0.14-py3-none-any.whl |
Total release size: 40.6 MB
Release files / wbplot-1.0.14.tar.gz
| Download URL | wbplot-1.0.14.tar.gz |
|---|---|
| Size | 20.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dac3c34077c4f351bfa5d61554374afce17fb6d39c9337f16c2fef633c49d660
|
|
BLAKE2b-256 checksum How to use checksums |
6c16a105f3baa537cac32cb2dacbac8095ca6f0e91b9ae975c1df72d1f7f6290
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.6
|
Release files / wbplot-1.0.14-py3-none-any.whl
| Download URL | wbplot-1.0.14-py3-none-any.whl |
|---|---|
| Size | 20.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4b08e43a0c61328ddb4619e6ec116b71c23b40d132994088508228828ebebf9
|
|
BLAKE2b-256 checksum How to use checksums |
0af5897c4c83d701d6235f3fcb6816fe5c14eae7caa5e5a96dae3856de2065e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.6
|
Security for wbplot 1.0.14
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.