Skip to main content

MNE-CPP

DOI

MNE-CPP is an open-source, cross-platform C++ framework for real-time and offline processing of MEG, EEG, and related neurophysiological data. It is part of The MNE Project, a family of tools originating from Matti Hämäläinen's MNE-C software at the Martinos Center for Biomedical Imaging.

Related MNE projects:

  • MNE-Python — Python reimplementation with extended visualization and analysis
  • MNE-MATLAB — MATLAB interface for MNE data structures
  • MNE-C — the original C implementation (Manual)

Applications​

MNE ScanMNE Scan — Real-time acquisition and processing of MEG/EEG data. Plugin-based architecture supporting MEGIN, BabyMEG, BrainAmp, eegosports, gUSBAmp, TMSI, Natus, LSL, and FieldTrip Buffer. In active clinical use at Boston Children's Hospital.
MNE AnalyzeMNE Analyze — Sensor- and source-level analysis GUI for pre-recorded data: raw browsing, filtering, averaging, co-registration, dipole fitting, and source localization.
MNE BrowseMNE Browse — Interactive viewer for raw MEG/EEG data in FIFF format with multi-channel navigation, scaling, filtering, and channel selection.
MNE InspectMNE Inspect — Interactive 3D brain viewer for FreeSurfer surfaces, BEM models, source estimates, atlases, sensors, and functional connectivity networks.

Specialist Applications​

ApplicationDescription
MNE Analyze StudioAgent-oriented analysis workbench with an LLM-driven skill host, neuro kernel, and extension SDK for building composable analysis workflows. (Preview — staging branch)
MNE Dipole FitSequential equivalent current dipole fitting for localising focal brain activity. C++ port of the original MNE-C mne_dipole_fit with 3D dipole visualization.

In addition, MNE-CPP ships a set of command-line tools for BEM model creation, forward/inverse computation, data conversion, anonymization, and real-time streaming — all C++ ports of the original MNE-C utilities.

Libraries​

All applications are built on MNE-CPP's modular C++ libraries, which depend on Qt 6 and Eigen 5. Optional dependencies include ONNX Runtime (for neural-network inference in the Ml library) and Skigen (header-only ML primitives built on Eigen). Qt and Eigen are fetched automatically by the repository init scripts; neither is bundled in the source tree. The libraries can be used independently to build custom neuroscience applications. See the Library API documentation for details.

LibraryDescription
FiffFIFF file I/O — raw data, epochs, evoked, covariance, projections, events
MneCore MNE data structures — source spaces, source estimates, hemispheres, forward solutions
FwdForward modelling — BEM and MEG/EEG lead-field computation
InvInverse source estimation — MNE, dSPM, sLORETA, eLORETA, LCMV/DICS beamformers, RAP MUSIC, dipole fit, HPI
DspDigital signal processing — FIR/IIR filtering, ICA, xDAWN, SSS/tSSS, Welch PSD, Morlet TFR, spectrogram, resampling, bad-channel detection, SPHARA, real-time averaging/filtering
ConnectivityFunctional connectivity — coherence, coherency, PLV, PLI, WPLI, cross-correlation, and network analysis
Disp3D3D brain visualization (Metal/Vulkan/D3D/OpenGL via Qt RHI)
MnaMNA graph engine — executable analysis pipelines in .mna/.mnx format with typed ports, operator schemas, and batch/stream execution
MlMachine learning — ONNX Runtime inference, linear models, feature pipelines, scalers, tensors
StsStatistics — t-tests, F-tests, cluster permutation testing, covariance estimators, source-level metrics

License: BSD 3-Clause. Versioning: Semantic Versioning.

Getting Involved​

MNE-CPP is a community-driven project. Contributions are welcome — see the contributor guide to get started, or browse the GitHub repository.

Research Projects​

MNE-CPP has been developed and extended through several funded research projects:

ProjectDurationFundingDescription
MNE-CE2017–2022NIH (1U01EB023820)Device-independent, standardized software for real-time acquisition, control, and processing of electrophysiological data.
OCE2018–2021DFG / FWF (397686322)Online neuronal connectivity estimation and neurofeedback with transcranial magnetic stimulation (TMS). Real-time MEG/EEG connectivity methods.
OSL2013–2015DFG (Ba 4858/1-1)Online MEG source estimation using high-performance GPU computing.
AWS Credits2018–2019AWSCloud computing support for MNE-CPP via the AWS Credits for Research Program.
Azure Credits2016–2018MicrosoftCloud computing support via the Microsoft Azure for Research program.

Funding Organizations​

NIHNIBIBDFGFWFAWSAzure

Supporting Institutions​

Martinos CenterMGHHarvard Medical SchoolBoston Children's HospitalUTHealth HoustonTU IlmenauUniversitätsklinikum JenaUniversität MagdeburgForschungscampus STIMULATEUniversität Innsbruck

Contact​

For questions and feedback, reach out via the MNE Forum or GitHub Issues. You can also contact the core team directly:

NameAffiliationEmail
Christoph DinhCarl Zeiss AGchristoph.dinh@mne-cpp.org
Lorenz EschBoston Children's Hospitallorenz.esch@mne-cpp.org
Gabriel Mottagabrielbenmotta@gmail.com
Juan Garcia-PrietoMGHjgarciaprieto@mgh.harvard.edu
Matti S. HämäläinenMartinos Center / MGHmsh@nmr.mgh.harvard.edu
Yoshio OkadaBoston Children's Hospitalyoshio.okada@childrens.harvard.edu
John C. MosherUTHealth HoustonJohn.C.Mosher@uth.tmc.edu
Jens HaueisenTU Ilmenaujens.haueisen@tu-ilmenau.de
Daniel BaumgartenUniversität Innsbruckdaniel.baumgarten@uibk.ac.at

For a full list of contributors see the GitHub contributors page.

MNE-CPP is a community-driven open-source project with no commercial interest. The source code is released under the BSD 3-Clause License.