Skip to contents

A view holding nothing but context is a panel of grey: it takes up room in the layout, carries a title, and shows no region of the atlas. It is the mirror of atlas_undrawn() – that reports regions no view draws, this reports views that draw no region – and the same silence applies, since the atlas validates and plots without complaint.

Usage

atlas_views_empty(atlas)

Arguments

atlas

A ggseg_atlas.

Value

The view names drawing no core region, as a character vector; empty when every view draws at least one, and when the atlas carries no 2D geometry at all.

Details

Usually it is a consequence of your own editing rather than of the build: remove the ventricles from an aseg, or prune small depictions, and a view whose only content was those regions is left empty.

This reports rather than removes, so the decision stays with you, and it measures the atlas you hand it. To act on the answer use ggseg.extra::atlas_view_remove_empty(), which takes the atlas once and so always measures the atlas it is about to change — naming the atlas twice to feed this into atlas_view_remove() reads as a pipe but is not one, and in a longer pipeline the name in hand is the atlas before the editing that emptied the view. ggseg.extra::atlas_view_remove_sparse() is the build-time counterpart, for views a pipeline left thin against a threshold rather than empty.

Examples

atlas_views_empty(aseg())
#> character(0)