Check the geometry of every ROI in a project
Usage
sg_roi_check_geometry(project, call = rlang::caller_env())Arguments
- project
An sg_roi_project.
- call
The calling environment, for error reporting.
Value
A tibble::tibble with columns roi_id (character), issue
(character), severity (character, "error"/"warning"), and fixable
(logical). Detected issues: self-intersection, invalid geometry, zero area,
degenerate rings, out-of-bounds vertices, duplicate consecutive vertices,
ring orientation, and NA coordinates. A 0-row tibble when all geometry is
valid.
See also
sg_roi_fix_geometry(), sg_roi_validate()
Other geometry:
sg_roi_buffer(),
sg_roi_check_containment(),
sg_roi_clamp(),
sg_roi_contains(),
sg_roi_distance(),
sg_roi_fix_geometry(),
sg_roi_flip_y(),
sg_roi_overlaps(),
sg_roi_rescale(),
sg_roi_ring(),
sg_roi_rois_overlap(),
sg_roi_setops,
sg_roi_simplify(),
sg_roi_snap(),
sg_roi_transform()
Examples
lyr <- sg_roi_layer_add(sg_roi_layer("tissue"),
sg_roi_rect(2, 2, 8, 8, label = "tissue"))
proj <- sg_roi_project(sg_roi_frame(c(20, 20)), lyr)
sg_roi_check_geometry(proj)
#> # A tibble: 0 × 4
#> # ℹ 4 variables: roi_id <chr>, issue <chr>, severity <chr>, fixable <lgl>