cortex.freesurfer.parse_patch

cortex.freesurfer.parse_patch(filename)[source]

Parse a freesurfer binary patch file.

Parameters:
filenamestr

Path to a freesurfer patch file (e.g. lh.flatten.patch.3d).

Returns:
datastructured ndarray

One record per vertex in the patch, with fields ‘vert’ (1-indexed vertex number; negative for boundary/edge vertices), ‘x’, ‘y’, ‘z’ (the vertex’s coordinates in the patch).