conpy.utils.
get_morph_src_mapping
(src_from, src_to, subject_from=None, subject_to=None, subjects_dir=None, indices=False)¶Get a mapping between an original source space and its morphed version.
It is assumed that the number of vertices and their positions match between
the source spaces, only the ordering is different. This is commonly the
case when using morph_source_spaces()
.
The original source space that was morphed to the target subject.
Either the source space to which src_from
was morphed, or the
vertex numbers of this source space.
The name of the Freesurfer subject to which src_from
belongs. By
default, the value stored in the SourceSpaces object is used.
The name of the Freesurfer subject to which src_to
belongs. By
default, the value stored in the SourceSpaces object is used.
Path to SUBJECTS_DIR if it is not set in the environment.
Whether to return mapping between vertex numbers (False
, the
default) or vertex indices (True
).
If indices=True
, a dictionary mapping vertex indices from
src_from -> src_to. If indices=False
, for each hemisphere, a
dictionary mapping vertex numbers from src_from -> src_to.
If indices=True
, a dictionary mapping vertex indices from
src_to -> src_from. If indices=False
, for each hemisphere, a
dictionary mapping vertex numbers from src_to -> src_from.
See also
_get_morph_src_reordering