StandardMontage
Namespace: UTILSLIB · Library: Utilities Library
Python equivalent
mne.channels.make_standard_montage in MNE-Python.
#include <utils/standard_montage.h>
class UTILSLIB::StandardMontage
Standard EEG montage with named electrode positions.
src/examples/ex_utils/main.cpp
const QList<ElectrodePosition> montage1020 = StandardMontage::getMontage(StandardMontage::System::Standard_1020);
Vector3d cz;
const bool found = StandardMontage::findElectrode("Cz", cz); // mne's standard_1005 positions, metres, MNI frame
Static Methods
getMontage(system)
Get a standard montage by system name.
Parameters:
- system : System The montage system.
Returns:
- QList< ElectrodePosition > — List of electrode positions.
getElectrodeNames(system)
Get electrode names for a standard montage.
Parameters:
- system : System The montage system.
Returns:
- QStringList — List of electrode names.
findElectrode(name, pos)
Look up a single electrode position by name.
Searches every position of the standard_1005 table, including the fiducials Nz, LPA and RPA.
Parameters:
-
name : const QString & Electrode name (case-insensitive).
-
pos : Eigen::Vector3d & Position if found.
Returns:
- bool — true if found.
electrodeCount(system)
Get the number of electrodes in a montage.
Parameters:
- system : System The montage system.
Returns:
- int — Number of electrode positions defined for the montage.
Example
- Full source:
src/examples/ex_utils/main.cpp - Build target:
ex_utils(runs under CTest)
Used in examples
ex_utils
Utilities library: buffers, observers, logging, file formats, montages, layouts and reports.
src/examples/ex_utils/main.cpp, line 208
const QList<ElectrodePosition> montage1020 = StandardMontage::getMontage(StandardMontage::System::Standard_1020);
Vector3d cz;
const bool found = StandardMontage::findElectrode("Cz", cz); // mne's standard_1005 positions, metres, MNI frame
ok &= expect(montage1020.size() == StandardMontage::electrodeCount(StandardMontage::System::Standard_1020) && found && (cz - Vector3d(0.0004009, -0.009167, 0.100244)).norm() < 1e-12,
QString("10-20 montage: %1 electrodes, Cz at (0.4, -9.2, 100.2) mm").arg(montage1020.size()));
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>