atlas_region_remove
atlas_region_remove(atlas, pattern, match_on='region')Remove regions matching a pattern.
Completely removes regions from core, palette, sf, and 3D data.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| atlas | BrainAtlas | Brain atlas object. | required |
| pattern | str | Regex pattern to match (case-insensitive). | required |
| match_on | str | Column to match: ‘region’ or ‘label’. | 'region' |
Returns
| Name | Type | Description |
|---|---|---|
| BrainAtlas | Modified atlas copy. |
Examples
>>> from ggsegpy import dk, atlas_region_remove
>>> atlas = dk()
>>> filtered = atlas_region_remove(atlas, "banks")