eelbrain.pipeline.CombinationParc

class eelbrain.pipeline.CombinationParc(base, labels, views=None)

Recombine labels from an existing parcellation

Parameters:
  • base (str) – The name of the parcellation that provides the input labels. A common base is the 'aparc' parcellation [1].

  • labels (dict {str: str}) – New labels to create in {name: expression} format. All label names should be composed of alphanumeric characters (plus underline) and should not contain the -hemi tags. In order to create a given label only on one hemisphere, add the -hemi tag in the name (not in the expression, e.g., {'occipitotemporal-lh': "occipital + temporal"}).

  • views (str | Sequence[str]) – Views shown in anatomical plots, e.g. ("medial", "lateral").

Examples

These are pre-defined parcellations:

parcs = {
    'lobes-op': CombinationParc('lobes', {'occipitoparietal': "occipital + parietal"}),
    'lobes-ot': CombinationParc('lobes', {'occipitotemporal': "occipital + temporal"}),
}

An example using a split label. In split(superiorfrontal, 3)[2], 3 indicates a split into three parts, and the index [2] picks the last one. Label are split along their longest axis, and ordered posterior to anterior, so [2] picks the most anterior part of superiorfrontal:

parcs = {
    'medial': CombinationParc('aparc', {
        'medialparietal': 'precuneus + posteriorcingulate',
        'medialfrontal': 'medialorbitofrontal + rostralanteriorcingulate'
                         ' + split(superiorfrontal, 3)[2]',
        }, views='medial'),
}

References