CustomParcelApproach#
- class neurocaps.typing.CustomParcelApproach[source]#
Bases:
dictType Definition for the Custom Parcellation Approach.
A
TypedDictrepresenting the subkeys (second level keys for “Custom”) for the user-defined deterministic “Custom” parcellation approach. The structure is as follows:# Lateralized regions { "maps": "path/to/parcellation.nii.gz", "nodes": ["LH_Vis1", "LH_Vis2", "LH_Hippocampus", "RH_Vis1", "RH_Vis2", "RH_Vis3", "RH_Hippocampus"], "regions": { "Visual": CustomRegionHemispheres "Hippocampus": CustomRegionHemispheres } } # Non-lateralized regions { "maps": "path/to/parcellation.nii.gz", "nodes": ["Vis1", "Vis2", "Vis3", "Hippocampus"], "regions": { "Visual": range(3) "Hippocampus": [3] } } # Mixture of lateralized and non-lateralized regions { "maps": "path/to/parcellation.nii.gz", "nodes": ["Vis1", "Vis2", "Vis3", "LH_Vis2", "LH_Hippocampus"], "regions": { "Visual": range(3) "Hippocampus": CustomRegionHemispheres } }
- Parameters:
maps (
str) – Path to the Custom parcellation.nodes (
list[str]) – List of nodes (ROIs) in the Custom parcellation. Ordered in ascending order of their label ID in the parcellation and must exclude “Background”.regions (
dict[str, list[int] | range]ordict[str, CustomRegionHemispheres]) –Dictionary mapping the regions to a list integers (or range) representing the index positions of elements in the “nodes” list belonging to the region or a dictionary mapping the region to a dictionary.
Note
The use of
CustomRegionHemispheresto define lateralized regions (i.e., with “lh” and “rh” keys) is only relevant when callingCAP.caps2plotwith theadd_custom_node_labelskwarg set toTrue. This information allows for the creation of simplified axis labels that include hemisphere information. In all other methods, the lateralization structure is ignored.Note
Non-lateralized “regions” is only supported in versions >= 0.30.0.
metadata (
dict[str, Any]) – Dictionary containing metadata information about the parcellation. This key is purely informational and can be removed, modified, or extended.
See also
CustomRegionHemispheresType definition of the Custom hemisphere dictionary for the “regions” subkeys. (See CustomRegionHemispheres Documentation)
ParcelApproachType definition representing the structure of the Schaefer, AAL, and Custom parcellation approaches. (See ParcelApproach Documentation)
Note
For additional information, refer to NeuroCAPs Parcellation Documentation