Skip to contents

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.

Value

A logical scalar.

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