Skip to contents

Combine ROIs geometrically. Each accepts several annot_roi via ..., or a single annot_layer. Multi-part results are returned as one ROI with MULTIPOLYGON geometry (the return type is always a single annot_roi).

Usage

at_roi_union(..., call = rlang::caller_env())

at_roi_intersect(..., call = rlang::caller_env())

at_roi_difference(..., call = rlang::caller_env())

at_roi_symdiff(..., call = rlang::caller_env())

Arguments

...

Two or more annot_roi, or a single annot_layer.

call

The calling environment, for error reporting.

Value

A single annot_roi with source = "derived".

Examples

a <- at_roi_rect(0, 0, 6, 6, label = "x")
b <- at_roi_rect(4, 4, 10, 10, label = "x")
at_roi_area(at_roi_intersect(a, b))
#> [1] 4