mne.compute_morph_matrix

mne.compute_morph_matrix(subject_from, subject_to, vertices_from, vertices_to, smooth=None, subjects_dir=None, warn=True, xhemi=False, verbose=None)[source]

Get a matrix that morphs data from one subject to another.

Parameters:

subject_from : string

Name of the original subject as named in the SUBJECTS_DIR.

subject_to : string

Name of the subject on which to morph as named in the SUBJECTS_DIR.

vertices_from : list of arrays of int

Vertices for each hemisphere (LH, RH) for subject_from.

vertices_to : list of arrays of int

Vertices for each hemisphere (LH, RH) for subject_to.

smooth : int or None

Number of iterations for the smoothing of the surface data. If None, smooth is automatically defined to fill the surface with non-zero values.

subjects_dir : string

Path to SUBJECTS_DIR is not set in the environment.

warn : bool

If True, warn if not all vertices were used.

xhemi : bool

Morph across hemisphere. Currently only implemented for subject_to == subject_from. See notes below.

verbose : bool, str, int, or None

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

Returns:

morph_matrix : sparse matrix

matrix that morphs data from subject_from to subject_to.

Notes

This function can be used to morph data between hemispheres by setting xhemi=True. The full cross-hemisphere morph matrix maps left to right and right to left. A matrix for cross-mapping only one hemisphere can be constructed by specifying the appropriate vertices, for example, to map the right hemisphere to the left: vertices_from=[[], vert_rh], vertices_to=[vert_lh, []].

Cross-hemisphere mapping requires appropriate sphere.left_right morph-maps in the subject’s directory. These morph maps are included with the fsaverage_sym FreeSurfer subject, and can be created for other subjects with the mris_left_right_register FreeSurfer command. The fsaverage_sym subject is included with FreeSurfer > 5.1 and can be obtained as described here. For statistical comparisons between hemispheres, use of the symmetric fsaverage_sym model is recommended to minimize bias [R8282].

References

[R8282](1, 2) Greve D. N., Van der Haegen L., Cai Q., Stufflebeam S., Sabuncu M. R., Fischl B., Brysbaert M. A Surface-based Analysis of Language Lateralization and Cortical Asymmetry. Journal of Cognitive Neuroscience 25(9), 1477-1492, 2013.