fetch_preset_parcel_approach#

neurocaps.utils.fetch_preset_parcel_approach(name, n_nodes=None)[source]#

Fetches a Preset “Custom” Parcellation Approach.

Creates a directory in the user home directory named “neurocaps_data” and downloads the parcel_approach (a JSON file) and the associated NifTI image from the Open Science Framework (OSF) if the corresponding files are not present in the directory.

Changed in version 0.37.3: The data directory location can now be overridden via the NEUROCAPS_DATA environment variable. If unset, the default ~/neurocaps_data location is used.

Parameters:
  • name (str) – Name of the preset “Custom” parcellation approach to fetch. Options are “HCPex”, “4S”, and “Gordon”.

  • n_nodes (int or None, default=None) –

    Currently only relevant to “4S”. Options for the “4S” are: 156, 256, 356, 456, 556, 656, 756, 956, 1056. Defaults to 456 if None.

    Note

    The 856 node version of “4S” is currently unavailable.

Returns:

dict[Literal[“Custom”], CustomParcelApproach] – A dictionary representing the “Custom” parcellation approach.

Note

Region Mapping: The mapping of regions/networks corresponds to the indices in the “nodes” list not its label ID. So, the first non-background index will be 0.

See also

CustomParcelApproach

The type definition for the Custom parcellation approach. (See CustomParcelApproach Documentation)

ParcelApproach

Type definition representing the structure of the Schaefer, AAL, and Custom parcellation approaches. (See ParcelApproach Documentation)