mne.dig_mri_distances

mne.dig_mri_distances(info, trans, subject, subjects_dir=None, dig_kinds='auto', exclude_frontal=False, verbose=None)[source]

Compute distances between head shape points and the scalp surface.

This function is useful to check that coregistration is correct. Unless outliers are present in the head shape points, one can assume an average distance around 2-3 mm.

Parameters
infoinstance of Info

The measurement info that contains the head shape points in info['dig'].

transstr | instance of Transform

The head<->MRI transform. If str is passed it is the path to file on disk.

subjectstr

The name of the subject.

subjects_dirstr | None

Directory containing subjects data. If None use the Freesurfer SUBJECTS_DIR environment variable.

dig_kindslist of str | str

Kind of digitization points to use in the fitting. These can be any combination of (‘cardinal’, ‘hpi’, ‘eeg’, ‘extra’). Can also be ‘auto’ (default), which will use only the ‘extra’ points if enough (more than 10) are available, and if not, uses ‘extra’ and ‘eeg’ points.

exclude_frontalbool

If True, exclude points that have both negative Z values (below the nasion) and positivy Y values (in front of the LPA/RPA). Default is False.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns
distsarray, shape (n_points,)

The distances.

Notes

New in version 0.19.

Examples using mne.dig_mri_distances