v2.0.0
Loading...
Searching...
No Matches
bids_coordinate_system.h File Reference

Reader/writer for the BIDS _coordsystem.json sidecar describing the spatial reference frame of an _electrodes.tsv record. More...

#include "bids_global.h"
#include <fiff/fiff_coord_trans.h>
#include <Eigen/Core>
#include <QString>
Include dependency graph for bids_coordinate_system.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BIDSLIB::BidsCoordinateSystem
 Coordinate system metadata from *_coordsystem.json. More...

Namespaces

namespace  BIDSLIB
 BIDS dataset reading, writing, path construction, and sidecar metadata handling for iEEG/EEG/MEG.

Detailed Description

Reader/writer for the BIDS _coordsystem.json sidecar describing the spatial reference frame of an _electrodes.tsv record.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.1.0
Date
March 2026

_coordsystem.json is REQUIRED for every iEEG (and recommended for EEG) electrode-position file and pins down three things: the name of the coordinate system (ACPC, MNI305, CapTrak, Other, …), the unit of the x/y/z columns in the matching _electrodes.tsv (m, mm or cm) and an optional 4×4 affine linking that frame to an associated anatomical image. BidsCoordinateSystem is the value object that captures those fields plus the recommended free-text description / processing-description / IntendedFor pointer.

BidsCoordinateSystem::toFiffCoordTrans bridges the parsed affine into a FIFFLIB::FiffCoordTrans so downstream MNE-CPP code (forward solution, source localisation, visualisation) can treat a BIDS dataset's coordinate metadata exactly like a FIFF MRI↔head transform. The BIDS↔FIFF coordinate-frame name mapping lives in bids_const.h.

Spec: https://bids-specification.readthedocs.io/en/stable/modality-specific-files/electrophysiology.html#coordinate-system-json

Definition in file bids_coordinate_system.h.