mne.gui.coregistration

mne.gui.coregistration(tabbed=False, split=True, width=None, inst=None, subject=None, subjects_dir=None, guess_mri_subject=None, height=None, head_opacity=None, head_high_res=None, trans=None, scrollable=True, project_eeg=None, orient_to_surface=None, scale_by_distance=None, mark_inside=None, interaction=None, scale=None, advanced_rendering=None, head_inside=True, verbose=None)[source]

Coregister an MRI with a subject’s head shape.

The recommended way to use the GUI is through bash with:

$ mne coreg
Parameters
tabbedbool

Combine the data source panel and the coregistration panel into a single panel with tabs.

splitbool

Split the main panels with a movable splitter (good for QT4 but unnecessary for wx backend).

widthint | None

Specify the width for window (in logical pixels). Default is None, which uses MNE_COREG_WINDOW_WIDTH config value (which defaults to 800).

instNone | str

Path to an instance file containing the digitizer data. Compatible for Raw, Epochs, and Evoked files.

subjectNone | str

Name of the mri subject.

subjects_dirstr | None

The path to the FreeSurfer subjects reconstructions. It corresponds to FreeSurfer environment variable SUBJECTS_DIR.

guess_mri_subjectbool

When selecting a new head shape file, guess the subject’s name based on the filename and change the MRI subject accordingly (default True).

heightint | None

Specify a height for window (in logical pixels). Default is None, which uses MNE_COREG_WINDOW_WIDTH config value (which defaults to 400).

head_opacityfloat | None

The opacity of the head surface in the range [0., 1.]. Default is None, which uses MNE_COREG_HEAD_OPACITY config value (which defaults to 1.).

head_high_resbool | None

Use a high resolution head surface. Default is None, which uses MNE_COREG_HEAD_HIGH_RES config value (which defaults to True).

transstr | None

The transform file to use.

scrollablebool

Make the coregistration panel vertically scrollable (default True).

project_eegbool | None

If True (default None), project EEG electrodes to the head surface. This is only for visualization purposes and does not affect fitting.

New in version 0.16.

orient_to_surfacebool | None

If True (default None), orient EEG electrode and head shape points to the head surface.

New in version 0.16.

scale_by_distancebool | None

If True (default None), scale the digitization points by their distance from the scalp surface.

New in version 0.16.

mark_insidebool | None

If True (default None), mark points inside the head surface in a different color.

New in version 0.16.

interactionstr | None

Can be ‘terrain’ (default None), use terrain-style interaction (where “up” is the Z/superior direction), or ‘trackball’ to use orientationless interactions.

New in version 0.16.

scalefloat | None

The scaling for the scene.

New in version 0.16.

advanced_renderingbool

Use advanced OpenGL rendering techniques (default True). For some renderers (such as MESA software) this can cause rendering bugs.

New in version 0.18.

head_insidebool

If True (default), add opaque inner scalp head surface to help occlude points behind the head.

New in version 0.23.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more). If used, it should be passed as a keyword-argument only.

Returns
frameinstance of CoregFrame

The coregistration frame.

Notes

Many parameters (e.g., project_eeg) take None as a parameter, which means that the default will be read from the MNE-Python configuration file (which gets saved when exiting).

Step by step instructions for the coregistrations can be accessed as slides, for subjects with structural MRI and for subjects for which no MRI is available.