Skip to main content

MNE-CPP Manual

Overview

MNE-CPP provides a comprehensive set of tools for preprocessing and averaging of MEG and EEG data and for constructing cortically-constrained minimum-norm estimates. The software is based on anatomical MRI processing, forward modelling, and source estimation methods. The anatomical MRI processing routines depend on tools provided by the FreeSurfer software.

This manual gives an overview of the software modules included with MNE-CPP, describes a typical workflow for a novice user, and provides detailed information about the individual software modules.

Heritage

MNE-CPP is a C++ port of the original MNE software suite created by Matti Hämäläinen at the Martinos Center for Biomedical Imaging. This manual is adapted from the original MNE Manual and the MNE-Python documentation, preserving the valuable background information and mathematical descriptions while documenting the C++ implementations available in MNE-CPP.

Software Components

The MNE-CPP software suite includes the following main components:

GUI Applications

ApplicationDescription
mne_scanReal-time acquisition and processing of MEG/EEG data with plugin-based architecture
mne_analyzeSensor- and source-level analysis of pre-recorded MEG/EEG data (under development)
mne_anonymizeRemoves or modifies personal health information from FIFF files (GUI and CLI)
mne_inspect3D brain visualization and source analysis
mne_browseBrowsing and visualization of raw MEG/EEG FIFF data files (under development)

Command-Line Tools

ToolDescription
mne_compute_raw_inverseComputes inverse solutions (MNE/dSPM/sLORETA) from raw or evoked data
mne_dipole_fitPerforms electric current dipole fitting on MEG/EEG data
mne_edf2fiffConverts EDF (European Data Format) files to FIFF format
mne_forward_solutionComputes the MEG/EEG forward solution
mne_show_fiffLists the contents of a FIFF file
mne_flash_bemCreates BEM surfaces using multi-echo FLASH MRI sequences
mne_setup_forward_modelSets up the BEM for forward modeling
mne_setup_mriSets up FreeSurfer MRI data for MNE processing
mne_surf2bemConverts FreeSurfer surfaces to BEM FIFF files
mne_watershed_bemCreates BEM surfaces using FreeSurfer's watershed algorithm
mne_rt_serverReal-time FIFF data streaming server

Prerequisites

To make full use of the MNE-CPP software, you will need:

  • FreeSurfer: Required for anatomical MRI processing, cortical surface reconstruction, and the creation of BEM meshes. Available at https://surfer.nmr.mgh.harvard.edu/.

  • MEG/EEG Data: Data in FIFF format (the native format of Neuromag/Elekta/MEGIN MEG systems). Data from other systems can be converted using appropriate tools (e.g., mne_edf2fiff for EDF data).

  • Environment Variables: Several MNE-CPP tools rely on the following environment variables:

    • SUBJECTS_DIR — The directory containing FreeSurfer subject reconstructions
    • SUBJECT — The name of the current subject
    • FREESURFER_HOME — The FreeSurfer installation directory

Chapter Overview

Acknowledgments

The development of the MNE software has been supported by the National Center for Research Resources (NCRR), the NIH (grants R01EB009048, R01EB006385, R01HD40712), and the U.S. Department of Energy. We are grateful to the MNE software users at the Martinos Center and other institutions for their collaboration and valuable feedback on the software and its documentation.