Skip to content

GlassBrain Custom Schematics

Christian Brodbeck edited this page Mar 31, 2020 · 1 revision
  1. install nilearn and svg
    $ git clone https://github.com/nilearn/nilearn.git
    $ git clone https://github.com/cjlano/svg.git
    $ cd nilearn
    $ pip install -e .

  2. Draw custom schematic svg files
    Use svg files in nilearn/nilearn/plotting/glass_brain_files as a guide.
    Custom schematics can be based on fsaverage surface plots or brain.mgz MRI images.

  3. Convert custom svg file to json object $ eelbrain
    $ cd svg
    $ import svg
    $ cd ../nilearn/nilearn/plotting/glass_brain_files
    run the following script with your custom schematics svg and the output json file
    $ run svg_to_json_converter.py brain_schematics_side_custom.svg brain_schematics_side.json

  4. Exit eelbrain and rerun. Custom schematic should now be applied.