Build a band straddling an ROI's boundary – the natural shape for a
"penumbra" region along an injury or wound margin. The ring extends outer
units outside the boundary and inner units inside it, formed as the set
difference of the outward and inward buffers.
Usage
at_roi_ring(
roi,
outer,
inner = 0,
label = roi$label,
call = rlang::caller_env()
)Arguments
- roi
An annot_roi.
- outer
Non-negative outward width (dilation) of the ring.
- inner
Non-negative inward width (erosion) of the ring. Default
0, a purely external band.- label
Label for the derived ring ROI. Default the source ROI's label.
- call
The calling environment, for error reporting.
Value
A derived annot_roi (an annulus) with source = "derived".
See also
at_roi_buffer(), at_roi_difference()
Other geometry:
at_check_containment(),
at_check_geometry(),
at_clamp(),
at_fix_geometry(),
at_flip_y(),
at_roi_buffer(),
at_roi_contains(),
at_roi_distance(),
at_roi_overlaps(),
at_roi_rescale(),
at_roi_setops,
at_roi_simplify(),
at_rois_overlap(),
at_snap(),
at_transform()
Examples
inj <- at_roi_rect(10, 10, 20, 20, label = "injury")
at_roi_ring(inj, outer = 3, label = "penumbra")
#> <annot_roi> penumbra (POLYGON)
#> id: "roi_000000067" | level: 0 | source: derived
#> bbox: [7, 7] - [23, 23]