Skip to main content

mne_setup_mri

Overview

mne_setup_mri sets up FreeSurfer MRI data for MNE software by creating the Neuromag directory structure and converting FreeSurfer MRI volumes (COR files or .mgz/.mgh) into COR.fif FIFF files.

This is a C++ port of the original MNE-C tools mne_setup_mri and mne_make_cor_set by Matti Hämäläinen.

Usage

mne_setup_mri [options]

Options

OptionDescription
--subject <name>Subject name. Defaults to SUBJECT environment variable.
--subjects-dir <dir>Subjects directory. Defaults to SUBJECTS_DIR environment variable.
--mri <name>MRI set name to process (can be specified multiple times; default: T1 brain)
--overwriteOverwrite existing data
--verboseVerbose output

Description

mne_setup_mri prepares FreeSurfer MRI data for use with MNE tools. It performs the following steps:

  1. Creates the required Neuromag-style directory structure within the subject's FreeSurfer directory
  2. Converts FreeSurfer MRI volumes (in COR or MGZ format) to FIFF format (COR.fif)
  3. Sets up the coordinate transformations needed for MNE processing

This step should be performed after the FreeSurfer cortical reconstruction is complete and before computing the forward solution.

Example

export SUBJECTS_DIR=/path/to/subjects
mne_setup_mri --subject sample --overwrite --verbose

Process a specific MRI set:

mne_setup_mri --subject sample --mri T1 --overwrite