netneurotools.freesurfer.parcels_to_vertices

netneurotools.freesurfer.parcels_to_vertices(data, *, lhannot, rhannot, drop=None)[source]

Project parcellated data to vertices defined in annotation files.

Assigns np.nan to all ROIs in drop

Parameters:
  • data ((N,) numpy.ndarray) – Parcellated data to be projected to vertices. Parcels should be ordered by [left, right] hemisphere; ordering within hemisphere should correspond to the provided annotation files.

  • {lh (str) – Path to .annot file containing labels of parcels on the {left,right} hemisphere. These must be specified as keyword arguments to avoid accidental order switching.

  • rh}annot (str) – Path to .annot file containing labels of parcels on the {left,right} hemisphere. These must be specified as keyword arguments to avoid accidental order switching.

  • drop (list, optional) – Specifies regions in {lh,rh}annot that are not present in data. NaNs will be inserted in place of the these regions in the returned data. If not specified, parcels defined in netneurotools.freesurfer.FSIGNORE are assumed to not be present. Default: None

Returns:

projected – Vertex-level data

Return type:

numpy.ndarray