Morph source space data from one subject to another.
Note
This class should not be instantiated directly.
Use mne.compute_source_morph() instead.
str | NoneName of the subject from which to morph as named in the SUBJECTS_DIR.
str | array | list of arrayName of the subject on which to morph as named in the SUBJECTS_DIR. The default is ‘fsaverage’. If morphing a volume source space, subject_to can be the path to a MRI volume. Can also be a list of two arrays if morphing to hemisphere surfaces.
str | NoneKind of source estimate. E.g. ‘volume’ or ‘surface’.
float | tupletuple of intNumber of levels (len(niter_affine)) and number of
iterations per level - for each successive stage of iterative
refinement - to perform the affine transform.
tuple of intNumber 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 [1].
int | list | Noneint | str | NoneMorph across hemisphere.
scipy.sparse.csr_matrixThe sparse surface morphing matrix for spherical surface based morphing [2].
list of ndarrayThe destination surface vertices.
tupleThe volume MRI shape.
ndarrayThe volume MRI affine.
dipy.align.AffineMapThe transformation that is applied before the before sdr_morph.
dipy.align.DiffeomorphicMapThe class that applies the the symmetric diffeomorphic registration (SDR) morph.
dictAdditional source data necessary to perform morphing.
scipy.sparse.csr_matrix | NoneThe volumetric morph matrix, if compute_vol_morph_mat()
was used.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
Notes
New in version 0.17.
References
Methods
|
Morph source space data. |
|
Compute the sparse matrix representation of the volumetric morph. |
|
Save the morph for source estimates to a file. |
Morph source space data.
VolSourceEstimate | VolVectorSourceEstimate | SourceEstimate | VectorSourceEstimateThe source estimate to morph.
strCan be ‘stc’ (default) or possibly ‘nifti1’, or ‘nifti2’ when working with a volume source space defined on a regular grid.
tuple | int | floatIf True the image is saved in MRI resolution. Default False. WARNING: if you have many time points the file produced can be huge. The default is mri_resolution=False.
NoneWhether the image to world registration should be in mri space. The default (None) is mri_space=mri_resolution.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
VolSourceEstimate | SourceEstimate | VectorSourceEstimate | Nifti1Image | Nifti2ImageThe morphed source estimates.
Examples using apply:
2 samples permutation test on source data with spatio-temporal clustering
Compute sparse inverse solution with mixed norm: MxNE and irMxNE
Compute the sparse matrix representation of the volumetric morph.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
SourceMorphThe instance (modified in-place).
Notes
For a volumetric morph, this will compute the morph for an identity
source volume, i.e., with one source vertex active at a time, and store
the result as a sparse
morphing matrix. This takes a long time (minutes) to compute initially,
but drastically speeds up apply() for STCs, so it can be
beneficial when many time points or many morphs (i.e., greater than
the number of volumetric src_from vertices) will be performed.
When calling save(), this sparse morphing matrix is saved with
the instance, so this only needs to be called once. This function does
nothing if the morph matrix has already been computed, or if there is
no volume morphing necessary.
New in version 0.22.
Examples using compute_vol_morph_mat:
Save the morph for source estimates to a file.
strThe stem of the file name. ‘-morph.h5’ will be added if fname does not end with ‘.h5’.
If True (default False), overwrite the destination file if it exists.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
mne.SourceMorph#2 samples permutation test on source data with spatio-temporal clustering
Compute sparse inverse solution with mixed norm: MxNE and irMxNE