brainstat.datasets.base.fetch_parcellation

brainstat.datasets.base.fetch_parcellation(template, atlas, n_regions, join=True, seven_networks=True, data_dir=None)[source]

Loads the surface parcellation of a given atlas.

Parameters
  • template (str,) – The surface template. Valid values are “fsaverage”, “fsaverage5”, “fsaverage6”, “fslr32k”, “civet41k”, “civet164k”, by default “fsaverage5”.

  • atlas (str) – Name of the atlas. Valid names are “cammoun”, “glasser”, “schaefer”, “yeo”.

  • n_regions (int) – Number of regions of the requested atlas. Valid values for the cammoun atlas are 33, 60, 125, 250, 500. Valid values for the glasser atlas are 360. Valid values for the “schaefer” atlas are 100, 200, 300, 400, 500, 600, 800, 1000. Valid values for “yeo” are 7 and 17.

  • join (bool, optional) – If true, returns parcellation as a single array, if false, returns an array per hemisphere, by default True.

  • seven_networks (bool, optional) – If true, uses the 7 networks parcellation. Only used for the Schaefer atlas, by default True.

  • data_dir (str, pathlib.Path, optional) – Directory to save the data, defaults to $HOME_DIR/brainstat_data/parcellation_data.

Returns

np.ndarray or tuple of np.npdarray – Surface parcellation. If a tuple, then the first element is the left hemisphere.