Skip to main content

iEEG Library

Namespace: IEEGLIB  ·  Source: src/libraries/ieeg The mne_ieeg library (IEEGLIB namespace) holds what is specific to intracranial recordings, sEEG depth leads and ECoG strips and grids: the implantation (contacts grouped into leads), bipolar re-referencing along the leads, and the mapping of contact values onto the cortical surface.

target_link_libraries(my_app PRIVATE mne_ieeg)

Dependencies: mne_bids, mne_utils, Qt6::Core, Eigen3. Rendering lives in disp3D (ElectrodeObject), which takes the leads as shown in mne_inspect.

Class Inventory​

Class / StructHeaderDescription
IeegImplantationieeg/ieeg_implantation.hContacts and the leads they form; BIDS iEEG *_electrodes.tsv reader
IeegContactieeg/ieeg_implantation.hOne contact: name, position (m), lead
IeegLeadieeg/ieeg_implantation.hOne depth lead, strip or grid: contacts in order along it, grid shape
IeegReferenceieeg/ieeg_reference.hBipolar pairs along leads and their montage matrix
IeegBipolarPairieeg/ieeg_reference.hOne derivation: anode, cathode, name, midpoint
IeegSurfaceMapieeg/ieeg_surface_map.hVertices x contacts weights painting contact values onto a surface

Conventions​

  • Units and frame. Positions are in metres. IeegImplantation::coordinateSystem() names their frame (e.g. ACPC); the library does not transform between frames.
  • Leads from names. Without a BIDS group, a contact belongs to the lead named like the contact without its trailing number (LA1, LA10 → LA), ordered by that number. A' (the prime marks the other hemisphere) never merges with A.
  • Lead type. BIDS type or a dimension of more than one row and column decides; otherwise contacts closer than 6 mm make a depth lead, others a strip.
  • No guessing of units. IeegImplantation::readBids refuses an *_electrodes.tsv without a matching *_coordsystem.json or with units other than m, cm or mm. MNE-BIDS infers n/a units from the coordinate magnitudes instead; for intracranial contacts a wrong guess moves them by a factor of ten.

MNE-Python Cross-Reference​

MNE-CPP (IEEGLIB)MNE-Python Equivalent
IeegImplantation::readBidsmne_bids.read_raw_bids (montage from *_electrodes.tsv; lead grouping is not part of MNE-BIDS)
IeegReference::bipolarPairs + bipolarMatrixmne.set_bipolar_reference
IeegSurfaceMap::weightsmne.stc_near_sensors (surface source estimates; modes sum, single, nearest, weighted)