atlas_view_remove_region

atlas_view_remove_region(atlas, pattern, match_on='label', views=None)

Remove specific region geometry from sf data only.

Core, palette, and 3D data are unchanged. Use this to clean up 2D projections without affecting the underlying atlas structure.

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: ‘label’ or ‘region’. 'label'
views str | list[str] | None Optional view name(s) to scope the removal. If None, applies to all views. None

Returns

Name Type Description
BrainAtlas Modified atlas copy.