cortex.dataset.Dataset.get_surf

Dataset.get_surf(subject: str, type: str, hemi: Literal['both'] = 'both', *, merge: Literal[False] = False, nudge: bool = False) → tuple[tuple[NDArray[floating], NDArray[integer]], tuple[NDArray[floating], NDArray[integer]]][source]
Dataset.get_surf(subject: str, type: str, hemi: Literal['both'] = 'both', *, merge: Literal[True], nudge: bool = False) → tuple[NDArray[floating], NDArray[integer]]
Dataset.get_surf(subject: str, type: str, hemi: Literal['lh', 'rh'], *, merge: bool = False, nudge: bool = False) → tuple[NDArray[floating], NDArray[integer]]
Dataset.get_surf(subject: str, type: str, hemi: Literal['both', 'lh', 'rh'] = 'both', *, merge: bool = False, nudge: bool = False) → tuple[tuple[NDArray[floating], NDArray[integer]], tuple[NDArray[floating], NDArray[integer]]] | tuple[NDArray[floating], NDArray[integer]]

Retrieve a subject’s surface geometry from this (packed) dataset file.

Parameters:
subjectstr

Subject identifier, as packed into this dataset.

typestr

Surface type, e.g. ‘wm’, ‘pia’, or ‘fiducial’ (averaged from ‘wm’ and ‘pia’).

hemistr, optional

‘lh’, ‘rh’, or ‘both’. Default ‘both’.

mergebool, optional

If True (and hemi=’both’), stack both hemispheres into a single (pts, polys) pair with right-hemisphere face indices offset. Default False.

nudgebool, optional

If True, shift each hemisphere so they don’t overlap along the x-axis. Default False.

Returns:
(pts, polys) or ((lpts, lpolys), (rpts, rpolys))

Vertex coordinates and triangle faces for the requested surface. If hemi=’both’ and merge=False, a pair of (pts, polys) tuples, one per hemisphere, is returned instead.