Return a tidy table of ROIs, optionally filtered by layer and/or label.
Usage
at_rois(project, layer = NULL, label = NULL, call = rlang::caller_env())Arguments
- project
An annot_project.
- layer
Optional single layer name to filter to.
- label
Optional character vector of labels to filter to.
- call
The calling environment, for error reporting.
Value
A tibble::tibble with one row per ROI and, in this exact order, the columns:
roi_idUnique identifier (character).
layerLayer name (character).
labelClass label (character).
geom_typeGeometry type, e.g.
"POLYGON"(character).levelReference pyramid level (integer).
area_pxArea in level-0 pixels (double);
NAfor points/lines.centroid_x,centroid_yCentroid at level 0 (double).
n_verticesVertex count (integer).
created,modifiedTimestamps (POSIXct).
authorAuthor (character).
sourceProvenance source (character).
geometryThe
sfgeometry column (sfc), at level 0.
Returns a 0-row tibble with these columns if no ROIs match.
Details
Coordinates in the geometry column, together with area_px and the
centroid, are expressed at pyramid level 0; the level column records the
level at which each ROI was originally defined.