Papers
Topics
Authors
Recent
2000 character limit reached

BST-2-ZI Plugin: Advanced EEG Source Imaging

Updated 7 February 2026
  • BST-2-ZI Plugin is a MATLAB-based tool integrating Brainstorm with Zeffiro Interface for high-fidelity, multi-compartment EEG source imaging.
  • It generates tetrahedral finite element models with variable resolution and applies a complete electrode model to handle both invasive and non-invasive EEG data.
  • The plugin enhances deep brain source localization by combining stereo-EEG and scalp-EEG data within a unified, automated computational pipeline.

The BST-2-ZI Plugin is a MATLAB-based software tool that integrates Brainstorm (BST) with Zeffiro Interface (ZI), enabling high-fidelity, multi-compartment finite element modeling for electroencephalography (EEG) source imaging workflows with an explicit focus on stereotactic EEG (stereo-EEG). It automates the transfer of anatomical segmentations and parcellation atlases from BST into ZI, supporting tetrahedral mesh generation at variable spatial resolutions and implementing the complete electrode model (CEM) for both invasive and non-invasive electrode configurations. This pipeline encompasses all stages from MRI-based tissue segmentation to forward and inverse modeling of EEG data, facilitating anatomically accurate source localization, particularly for deep brain structures using combined stereo-EEG and scalp electrode configurations (Prieto et al., 31 Jan 2026).

1. Plugin Structure and Data Processing Pipeline

The BST-2-ZI Plugin comprises a MATLAB package deployed within the ZI software environment, specifically within the directory structure +utilities/+brainstorm2zef/. The core components include a settings file, zef_bst_default.m, which houses experimental defaults such as protocol name, compartment labeling, mesh resolution, and contact impedance specification, and a run script, zef_bst_plugin_start.m, which orchestrates the data flow.

The data transfer sequence is governed as follows:

  • Users select a Brainstorm protocol (e.g., ICBM152 template), then invoke the plugin via the BST GUI or MATLAB command line.
  • A modal GUI solicits user choices (settings file, run mode), with three operation modes: 'Fresh start' (direct export), 'Import compartments' (reuse precomputed meshes), or 'Use project' (open existing ZI project).
  • The plugin parses BST's surface reconstructions, accessible as structured arrays (bstScout(i).Name, bstScout(i).Surface, bstScout(i).Faces).
  • Voxel-based atlases are surface-converted using BST's mesh processing utilities and inscribed into ZI's compartment table.
  • The plugin launches ZI's meshing APIs, resulting in a comprehensive tetrahedral FE mesh (Prieto et al., 31 Jan 2026).

2. Multi-Compartment Finite Element Model Generation

The FE mesh construction initializes from a set of closed, triangular surface representations {S1,,SC}\{S_1,\dots,S_C\}, each corresponding to a distinct anatomical compartment or parcellation unit. Any unlabeled volume is filled with an envelope compartment (default conductivity: 0.33 S/m).

Resolution control is set in the settings file:

  • Base element size: 0.6 mm
  • Regions proximal to stereo-EEG probes: refined to 0.3 mm

Tissue compartments receive scalar, isotropic conductivities:

  • WM: 0.14 S/m; GM: 0.33 S/m; CSF: 1.79 S/m; compact skull: 0.0064 S/m; spongy skull: 0.028 S/m; scalp: 0.43 S/m; eyes: 1.5 S/m; blood: 0.7 S/m; muscle: 0.33 S/m; probe: 1×10151\times10^{-15} S/m; probe encapsulation: 0.33 S/m.

The conductivity at position x\mathbf{x} is expressed as: σ(x)=i=1CσiχΩi(x),\sigma(\mathbf{x}) = \sum_{i=1}^C \sigma_i \,\chi_{\Omega_i}(\mathbf{x}), with χΩi\chi_{\Omega_i} the characteristic function of compartment Ωi\Omega_i (Prieto et al., 31 Jan 2026).

3. Complete Electrode Model (CEM) Formulation

CEM provides a rigorous boundary treatment for both electrode types:

  1. No-flux outside electrodes: σun(x)=0\sigma\,\frac{\partial u}{\partial n}(\mathbf{x}) = 0, xΩe\mathbf{x}\in \partial\Omega\setminus\cup_\ell e_\ell
  2. Net zero current per electrode: eσundS=0\int_{e_\ell}\sigma\,\frac{\partial u}{\partial n}\,dS = 0
  3. Electrode-skin interface jump: U=u(x)+Z~σun(x), xeU_\ell = u(\mathbf{x}) + \widetilde Z_\ell \sigma\,\frac{\partial u}{\partial n}(\mathbf{x}),\ \forall\,\mathbf{x}\in e_\ell with Z~=Ze\widetilde Z_\ell = Z_\ell |e_\ell| (total impedance).

In weak form, the system searches for uSH1(Ω)u \in \mathcal S \subset H^1(\Omega): Ωσu ⁣ ⁣vdV=Ω(Jp)vdV+=1L1Ze2( ⁣eudS)( ⁣evdS) =1L1ZeeuvdS\begin{aligned} \int_\Omega \sigma\,\nabla u\!\cdot\!\nabla v\,dV &= -\int_\Omega(\nabla\cdot \mathbf J^p)\,v\,dV +\sum_{\ell=1}^L \frac{1}{Z_\ell\,|e_\ell|^2} \left(\!\int_{e_\ell} u\,dS\right) \left(\!\int_{e_\ell} v\,dS\right) \ &\quad -\sum_{\ell=1}^L \frac{1}{Z_\ell\,|e_\ell|} \int_{e_\ell} u\,v\,dS \end{aligned} where vv is any test function (Prieto et al., 31 Jan 2026).

4. Forward Problem and Lead-Field Matrix Computation

The forward modeling is governed by the PDE: (σu)=Jp in Ω\nabla\cdot (\sigma\,\nabla u) = \nabla\cdot \mathbf J^p \text{ in } \Omega

Finite element discretization employs basis expansions: u(x)i=1Nziψi(x),Jp(x)k=1Mxkwk(x)u(\mathbf{x}) \approx \sum_{i=1}^N z_i\,\psi_i(\mathbf{x}),\quad \mathbf J^p(\mathbf{x}) \approx \sum_{k=1}^M x_k\,\mathbf w_k(\mathbf{x}) with system assembly in block form: (AB BTC)(z u)=(Gx 0)\begin{pmatrix} \mathbf A & -\mathbf B \ -\mathbf B^\mathsf T & \mathbf C \end{pmatrix} \begin{pmatrix} \mathbf z \ \mathbf u \end{pmatrix} = \begin{pmatrix} -\mathbf G\,\mathbf x \ \mathbf 0 \end{pmatrix}

Coefficient matrices are constructed via standard FE/ZI routines (assembleMass, assembleStiffness, assembleCEM). The empirical EEG/SEEG data y\mathbf y are related to the sources x\mathbf x by the lead-field operator: y=Lx,L=R(BTA1BC)1BTA1G\mathbf y = \mathbf{L} \mathbf x,\quad \mathbf L = \mathbf R \left( \mathbf B^\mathsf T \mathbf A^{-1} \mathbf B - \mathbf C \right)^{-1} \mathbf B^\mathsf T \mathbf A^{-1} \mathbf G where R\mathbf R is the referencing operator (Prieto et al., 31 Jan 2026).

5. Inverse Methods and Source Localization

The BST-2-ZI workflow supports multiple inverse solutions:

  • Minimum-Norm Estimate (MNE):

x^=argminx  Lxy22+λx22\hat{\mathbf x} = \arg\min_{\mathbf x}\; \|\mathbf L \mathbf x - \mathbf y\|_2^2 + \lambda \|\mathbf x\|_2^2

  • sLORETA: Applies noise-normalized MNE.

x^=Wy,W=QLT(LQLT+λI)1\hat{\mathbf x} = \mathbf W \mathbf y, \quad \mathbf W = \mathbf Q \mathbf L^\mathsf T (\mathbf L \mathbf Q \mathbf L^\mathsf T + \lambda \mathbf I)^{-1}

  • Dipole Scan: Location-wise optimization.

x^k=argminx=1Lkxy\hat{\mathbf x}_k = \arg\min_{\|\mathbf x\|=1} \|L_k \mathbf x - \mathbf y\|

  • Scalar Unit-Noise-Gain Beamformer (sUNGB):

wk=QkLkTLkQkLkT+λ,s^k=wkTy\mathbf w_k = \frac{\mathbf Q_k L_k^\mathsf T}{L_k \mathbf Q_k L_k^\mathsf T + \lambda},\quad \hat s_k = \mathbf w_k^\mathsf T \mathbf y

These methods leverage the anatomical specificity and variable lead-field sensitivity delivered by the FE/CEM-based forward models (Prieto et al., 31 Jan 2026).

6. Numerical Simulation Protocols and Empirical Results

Experiments employ BST’s ICBM152 template with Desikan–Killiany and Aseg atlases, constituting 116 tissue compartments. Scalp electrode arrays (72 contacts, 10–20 system, ring geometry, Z=2kΩZ=2\,\mathrm{k\Omega}) and a Medtronic 3389-like stereo-EEG probe (1.27 mm diameter, four 1.5 mm contacts, 0.5 mm spacing, 0.5 mm encapsulation, Z=2kΩZ=2\,\mathrm{k\Omega}) are modeled within a mesh of 18.7 million nodes and 91.8 million tetrahedra (base size: 0.6 mm; probe regions: 0.3 mm).

Synthetic sources comprise a single dipole within the left thalamic VPN nucleus, 16 mm from probe tip, with varying orientations (parallel/perpendicular to probe axis). Reconstructions are performed under additive white noise (SNR = 30 dB), contrasting scalp-EEG alone with joint scalp- and stereo-EEG arrays.

Key findings:

  • Stereo-EEG lead-field volumes exhibit strong localization near the probe, in contrast to diffuse sensitivity in scalp-EEG.
  • Incorporating probe contacts significantly sharpens source focus in the VPN nucleus.
  • Dipole orientation impacts localization, with parallel orientations yielding greater accuracy.
  • The sUNGB method yields the most concentrated reconstructions and is comparatively resistant to orientation variability.

These results indicate that BST-2-ZI enables anatomically precise multi-compartment CEM modeling, supporting source localization enhancement—especially within deep brain regions—by combining invasive and non-invasive EEG acquisition (Prieto et al., 31 Jan 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to BST-2-ZI Plugin.