spectralbrain.load_freesurfer_surface#
- spectralbrain.load_freesurfer_surface(path)[source]#
Load a FreeSurfer surface file.
- Parameters:
path (PathLike) – Path to a FreeSurfer surface (
.white,.pial,.inflated,.sphere, …).- Returns:
vertices (ndarray, shape (N, 3)) – Vertex coordinates in TkRAS mm.
faces (ndarray, shape (F, 3)) – Triangle indices, 0-indexed.
- Return type:
tuple[ndarray[tuple[Any, …], dtype[floating]], ndarray[tuple[Any, …], dtype[int64]]]
Examples
>>> verts, faces = sb.io.load_freesurfer_surface("lh.white") >>> verts.shape (163842, 3)