cortex.utils.get_ctmmap¶
- cortex.utils.get_ctmmap(subject, **kwargs)[source]¶
Return a mapping from the vertices in the CTM surface to the vertices in the freesurfer surface. The mapping is a numpy array, such that ctm2fs_left[i] = j means that the i-th vertex in the CTM surface corresponds to the j-th vertex in the freesurfer surface.
- Parameters:
- subjectstr
Subject name
- kwargsdict
Keyword arguments to pass to get_ctmpack. The most relevant keyword for this function is the method kwarg (either mg2 or raw).
- Returns:
- ctm2fs_leftarray (n_vertices_left,)
Mapping from CTM vertices to freesurfer vertices for the left hemisphere.
- ctm2fs_rightarray (n_vertices_right,)
Mapping from CTM vertices to freesurfer vertices for the right hemisphere.
Notes
This mapping is absolutely necessary when the CTM surfaces are saved with the mg2 method, which corresponds to storing surfaces with a compressed format.