Interactive 3D visualization
The 3D viewer uses PyVista/VTK for hardware-accelerated rendering. The cortical surface, electrode trajectories, and individual contact spheres are all rendered together in a freely rotatable scene.
- Left-click drag to rotate the scene; scroll to zoom
- Double-click to reset the camera to its default position
- Fullscreen toggle button in the bottom-right corner of the viewport
- A colored XYZ orientation axes widget is always visible in the corner
- Hover over any contact or brain surface point to see its anatomical parcellation label in a floating tooltip
Brain surface controls
The side panel lets you toggle and fine-tune every surface and overlay independently:
- Brain mask: toggle the brain envelope mesh on or off, with an opacity slider
- Pial surfaces: add or remove the left hemisphere and right hemisphere pial surfaces via right-click, each with an independent opacity slider
- Render Brain dialog: right-click "Render Brain" to adjust material properties (ambient, diffuse, specular, specular power), lighting (key, fill, back light intensity), shadows, and brain color in real time. A "Reset to original preset" button restores the defaults.
Modality overlays
Each modality can be toggled on or off independently. Right-click opens the color picker for PET, SISCOM and CT.
- CT: toggle on or off; Hounsfield threshold slider (500–4000 HU) and opacity slider
- PET: toggle on or off; min/max percentile sliders, gamma correction slider, and opacity slider
- SISCOM: toggle on or off; z-score threshold (1.5–6.0), opacity slider, and adjustable color scale
- Toggle the color scale legend on or off via right-click
Anatomical slice planes
Display up to three orthogonal anatomical planes directly inside the 3D scene. Each plane is textured with the active MRI volume and any active PET/SISCOM overlay.
- Coronal, axial, sagittal: toggle each plane on or off; a position slider lets you scroll through the volume
- Flip direction: toggle each plane between its two viewing directions (axial: inferior/superior; coronal: caudal/rostral; sagittal: left/right)
- MRI source: switch the slice texture between MRI 1 and MRI 2 without changing the geometry
- Keyboard navigation: hold Ctrl + an arrow key and scroll the mouse wheel to move the corresponding slice (up arrow: axial, down arrow: coronal, left arrow: sagittal)
- Colored frames: toggle the colored border around each slice plane via right-click to clean up the view for screenshots
- Keep electrodes visible through slices: right-click option that keeps electrode markers visible even when slice planes are active
Parcellation overlays
Two parcellation atlases can be toggled simultaneously as colored overlays on the brain surface and on the anatomical slice planes, each with an independent opacity slider. The atlases available depend on the active display mode:
- In patient space (brain mask or pial surface): the overlays come from the atlases you loaded for the patient: FreeSurfer aparc+aseg or any custom atlas imported at coregistration. Parcellation 1 and Parcellation 2 correspond to the two atlases you provided.
- In MNI mode: the overlays are the built-in standard atlases: Parcellation 1 is Schaefer 2018 (400 cortical parcels, 7 networks) and Parcellation 2 is Brainnetome (246 regions, cortex + subcortex, connectivity-based). Both in MNI152NLin2009cAsym, 1 mm.
Hovering over the brain surface or any contact shows the corresponding label from the active atlas in a floating tooltip.
Electrode display controls
Fine-tune how electrodes are rendered in the 3D scene:
- Electrode shaft: toggle button to show or hide the cylindrical shaft connecting contacts
- Contact size: spinbox to adjust the diameter of contact spheres
Right-click any electrode or contact in the electrode panel for additional per-electrode options:
- Electrode: add or remove labels for all contacts at once, add or remove cortical surface projection, rename, change color, delete
- Contact: add or remove its individual label, jump to coronal, axial, or sagittal slice at that contact position, delete
MNI mode
MNI mode lets you visualize electrode placements from multiple patients simultaneously in a common standard space (MNI152NLin2009cAsym). Useful for cross-patient comparisons and group-level analyses.
Check the MNI atlas mode checkbox in the side panel. The 3D scene switches from patient space to the MNI152 template brain, and the anatomical slice planes are immediately available: their coronal, axial and sagittal sliders are active right away, with no extra step needed.
If the patient you are working on already has MNI coordinates (for example because you just exported the BIDS MNI dataset for this patient), their MNI electrodes are displayed automatically as soon as MNI mode is enabled, without any manual loading.
To compare several patients in the same space, right-click anywhere in the 3D view and select Load MNI electrodes.tsv, then choose a BIDS-compatible TSV whose coordinates are already in MNI152 space. Each file appears as a separate patient set in the electrode tree. Repeat to load as many patients as needed for group-level comparisons.
Right-click and open Parcellation table to see every MNI contact assigned to its anatomical region across two built-in atlases:
- Schaefer 2018 - 400 cortical parcels, 7 networks
- Brainnetome - 246 regions, cortex + subcortex, connectivity-based
The table shows subject, source file, electrode, contact, hemisphere, MNI XYZ coordinates, and both parcellation labels. Search by electrode name with Ctrl+F. Export to TSV, CSV, or Excel (XLSX). Click any column header to sort.
Electrode tree options
Right-click any MNI electrode set in the tree to change its color, add or remove electrode name labels, or add or remove the patient name label. Right-click an individual contact to toggle its label, or to jump the coronal, axial or sagittal slice directly to that contact's position.
Anatomical markers
Place 3D spherical markers anywhere in the scene via right-click "Add marker". Each marker has:
- Name and type: Lesion, ROI, Resection, Stimulation, Anatomical landmark, or Other
- Color and size in mm (0.5–30.0)
- Description and RAS coordinates in mm, with automatic voxel coordinate display
- Export to a plain text file with all marker metadata
Open the Marker list panel via right-click to manage all markers. For any marker, right-click its row to display it on the coronal, axial or sagittal slice, edit, hide, export, or delete it. Double-click any marker to open its edit dialog.
The Marker list stays open while you work, so you can keep it visible to manage and locate your markers without having to reopen it each time.
Quick toolbar
The floating toolbar (bottom-left of the 3D viewport) gives one-click access to the most common actions:
- Screenshot: save the 3D view as PNG or JPEG, copied to clipboard automatically
- GIF export: export a rotating 3D animation with choice of rotation axis (X, Y or Z)
- Front / Back: snap camera to anterior or posterior coronal view
- Left / Right: snap camera to left or right sagittal view
- Beauty left / Beauty right: oblique front-left or front-right angle for presentation screenshots
- Save camera: save the current camera position to the project file
- Restore camera: restore the previously saved camera position
- Transparent background: toggle transparent background for PNG screenshots
Export options
- Electrode coordinates: CSV or BIDS-compatible TSV in LPS mm and/or MNI152 mm
- Screenshot: current 3D view at full resolution (PNG or JPEG)
- Animated GIF: 360° rotation of the 3D scene for publications
- Contact to region table: from the parcellation overlay (CSV)
- MNI parcellation table: TSV, CSV, or Excel export from the parcellation table dialog
- Marker export: individual marker metadata as plain text