neuromaps.images.annot_to_gifti

neuromaps.images.annot_to_gifti(parcellation, background=None)[source]

Convert FreeSurfer-style annotation parcellation files to GIFTI images.

Parameters:
  • parcellation (tuple of str or os.PathLike) – Paths to surface annotation files (.annot)

  • background (list-of-str, optional) – If provided, a list of IDs in parcellation that should be set to 0 (the presumptive background value). Other IDs will be shifted so they are consecutive (i.e., 0–N). If not specified will use labels in neuromaps.images.PARCIGNORE. Default: None

Returns:

gifti – Converted GIFTI images

Return type:

tuple-of-nib.GiftiImage