mne.compute_source_morph¶

mne.
compute_source_morph
(src, subject_from=None, subject_to='fsaverage', subjects_dir=None, zooms=5, niter_affine=(100, 100, 10), niter_sdr=(5, 5, 3), spacing=5, smooth=None, warn=True, xhemi=False, sparse=False, verbose=False)[source]¶ Create a SourceMorph from one subject to another.
Method is based on spherical morphing by FreeSurfer for surface cortical estimates [1] and Symmetric Diffeomorphic Registration for volumic data [2].
 Parameters
 srcinstance of
SourceSpaces
 instance ofSourceEstimate
The SourceSpaces of subject_from (can be a SourceEstimate if only using a surface source space).
 subject_from
str
None
Name of the original subject as named in the SUBJECTS_DIR. If None (default), then
src[0]['subject_his_id]'
will be used. subject_to
str
Name of the subject to which to morph as named in the SUBJECTS_DIR.
 subjects_dir
str
None
Path to SUBJECTS_DIR if it is not set in the environment. The default is None.
 zooms
float
tuple
None
The voxel size of volume for each spatial dimension in mm. If spacing is None, MRIs won’t be resliced, and both volumes must have the same number of spatial dimensions.
 niter_affine
tuple
ofint
Number of levels (
len(niter_affine)
) and number of iterations per level  for each successive stage of iterative refinement  to perform the affine transform. Default is niter_affine=(100, 100, 10). niter_sdr
tuple
ofint
Number of levels (
len(niter_sdr)
) and number of iterations per level  for each successive stage of iterative refinement  to perform the Symmetric Diffeomorphic Registration (sdr) transform. Default is niter_sdr=(5, 5, 3). spacing
int
list
None
The resolution of the icosahedral mesh (typically 5). If None, all vertices will be used (potentially filling the surface). If a list, then values will be morphed to the set of vertices specified in in
spacing[0]
andspacing[1]
. smooth
int
None
Number of iterations for the smoothing of the surface data. If None, smooth is automatically defined to fill the surface with nonzero values. The default is spacing=None.
 warnbool
If True, warn if not all vertices were used. The default is warn=True.
 xhemibool
Morph across hemisphere. Currently only implemented for
subject_to == subject_from
. See notes below. The default is xhemi=False. sparsebool
Morph as a sparse source estimate. Works only with (Vector) SourceEstimate. If True the only parameters used are subject_to and subject_from, and spacing has to be None. Default is sparse=False.
 verbosebool,
str
,int
, orNone
If not None, override default verbose level (see
mne.verbose()
and Logging documentation for more).
 srcinstance of
Notes
This function can be used to morph data between hemispheres by setting
xhemi=True
. The full crosshemisphere morph matrix maps left to right and right to left. A matrix for crossmapping 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, []]
.Crosshemisphere mapping requires appropriate
sphere.left_right
morphmaps in the subject’s directory. These morph maps are included with thefsaverage_sym
FreeSurfer subject, and can be created for other subjects with themris_left_right_register
FreeSurfer command. Thefsaverage_sym
subject is included with FreeSurfer > 5.1 and can be obtained as described here. For statistical comparisons between hemispheres, use of the symmetricfsaverage_sym
model is recommended to minimize bias [1].New in version 0.17.0.
References
 1(1,2)
Greve D. N., Van der Haegen L., Cai Q., Stufflebeam S., Sabuncu M. R., Fischl B., Brysbaert M. A Surfacebased Analysis of Language Lateralization and Cortical Asymmetry. Journal of Cognitive Neuroscience 25(9), 14771492, 2013.
 2
Avants, B. B., Epstein, C. L., Grossman, M., & Gee, J. C. (2009). Symmetric Diffeomorphic Image Registration with Cross Correlation: Evaluating Automated Labeling of Elderly and Neurodegenerative Brain, 12(1), 2641.