Test whether two ROIs intersect
Usage
sg_roi_overlaps(roi1, roi2, call = rlang::caller_env())Arguments
- roi1, roi2
sg_roi objects.
- call
The calling environment, for error reporting.
See also
Other geometry:
sg_roi_buffer(),
sg_roi_check_containment(),
sg_roi_check_geometry(),
sg_roi_clamp(),
sg_roi_contains(),
sg_roi_distance(),
sg_roi_fix_geometry(),
sg_roi_flip_y(),
sg_roi_rescale(),
sg_roi_ring(),
sg_roi_rois_overlap(),
sg_roi_setops,
sg_roi_simplify(),
sg_roi_snap(),
sg_roi_transform()
Examples
a <- sg_roi_rect(0, 0, 4, 4, label = "a")
sg_roi_overlaps(a, sg_roi_rect(2, 2, 6, 6, label = "b"))
#> [1] TRUE
sg_roi_overlaps(a, sg_roi_rect(10, 0, 14, 4, label = "c"))
#> [1] FALSE