Script for visualizing ICA/ROI brain parcellation
Project description
brainbow
Script for visualizing ICA/ROI brain parcellation
Requirements
pip install brainbow
Examples
brainbow -n {your_brain_map}.nii
Quick guide
- provide a path to nifti map (
-n/--niftiflag) and anatomical underlay (-a/--anatflag, optional) - control the output with
--sign,--thr, and--no-normflags - to plot only certain components use
-c/--componentflag - to set cut coordinates manually use
--cutflag - see below for more info
Options for brainbow
-
-n/--nifti- path to the nifti file with 4D ICA map to convert to images (last dimension is components), or
- path to the nifti file with 3D ROI map to convert to images (int values from 0 to
n_regions); - required
-
-a/--anat- path to the anatomical image to use as an underlay
- if none is provided, the MNI 152 template is used as an underlay
-
-o/--output- name of the output file(s)
- default -
brainbow-output.png/svg - You can specify the exact extension (
pngorsvg). If none is provided, files with both extensions will be created
-
--rich- if
--richis passed, in addition to the basic output a config file and a csv file containing cut coordinates is generated
- if
-
-s/--sign- choices:
pos, neg, both - used for leaving only positive (
pos), only negative (neg), or all values (both) in the components - ALSO controls the colormap
- choices:
-
--thr- threshold value for component significance
- if component is significant,
thris used to mask values:-thr < value < thr - if all abs values in the component are below
thr, component won't be visualized - default -
0.2
-
--no-norm- use to disable data normalization
- normalization includes:
- centering around median,
- divsion by the max abs value, and
- divsion by the sign (
1 or -1) of this max abs value
-
--extend- if passed, in addition to overlay+underlay picture each component
will also have a row with separate overlay/underlay - helpful for QC
- if passed, in addition to overlay+underlay picture each component
-
--dpi- dpi for png output
- default -
150
-
--annotate- choices:
none, minimal, full - show components indices (
minimal), components indices and cut coordinates (full), or nothing (none) on the output figure - default -
minimal
- choices:
-
-c/--components- allows to provide a list of components to plot (e.g., '42 4 2')
- enumeration starts with 1
-
--cut- allows to set the cut coordinates manually
- default behavior is to use the coordinates of the max abs value of each component
- needs to be either:
- a path to scv file (like the one created by
--richflag), or - a comma separated list of 3 cooridnates, which will be used for all components.
- a path to scv file (like the one created by
- coordinates order should be RAS+
- be careful when using with
--componentsflag: brainbow assumes that the components order in the csv file correspond to the order of the provided components
Output example
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
brainbow-0.1.12.tar.gz
(429.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
brainbow-0.1.12-py3-none-any.whl
(435.3 kB
view details)
File details
Details for the file brainbow-0.1.12.tar.gz.
File metadata
- Download URL: brainbow-0.1.12.tar.gz
- Upload date:
- Size: 429.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db2d3ae1a3d77ff9b8c07dae0422e4bb2ea79ec3995a5439288a23f514848e97
|
|
| MD5 |
8880b6c18617b27786803da4912bebf9
|
|
| BLAKE2b-256 |
0646fae236546f37ec6dba36280cf3658dde9e8bc2d3f8420008a3a658a7b1b9
|
File details
Details for the file brainbow-0.1.12-py3-none-any.whl.
File metadata
- Download URL: brainbow-0.1.12-py3-none-any.whl
- Upload date:
- Size: 435.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53afc2dbd3a7c8aea88cfc4f1b3c932fac0f4d27a5df3cf09681fb25912d3f14
|
|
| MD5 |
aa7eed090747d6b034d0890e45737796
|
|
| BLAKE2b-256 |
fc5693da2c90dde2c93a51e093fdbecebd4f18595feef04ba24488f422298267
|