-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.py
More file actions
18 lines (15 loc) · 743 Bytes
/
example.py
File metadata and controls
18 lines (15 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from threebrainpy.core import Brain, Vec3, Mat44, SimpleKeyframe, CONSTANTS, ElectrodeColormap
print(CONSTANTS)
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_surfaces("pial")
brain.render()
electrode_path = "https://raw.githubusercontent.com/dipterix/threeBrainPy/main/docs/showcase-viewer/electrodes.csv"
brain.add_electrodes(table=electrode_path)
value_path = "https://raw.githubusercontent.com/dipterix/threeBrainPy/main/docs/showcase-viewer/electrodes.csv"
brain.set_electrode_values(value_path)
brain.render()