Create a rectangular ROI
Usage
at_roi_rect(
xmin,
ymin,
xmax,
ymax,
label,
level = 0L,
...,
call = rlang::caller_env()
)Arguments
- xmin, ymin, xmax, ymax
Numeric bounds in image pixels.
xmax/ymaxmust exceedxmin/ymin.- label
Single string class label.
- level
Integer pyramid level the coordinates refer to. Default
0.- ...
Additional named attributes stored on the ROI. The reserved names
author,source, andidset those fields; all others become user attributes.- call
The calling environment, for error reporting.
Value
An annot_roi with POLYGON geometry (an axis-aligned rectangle).
Examples
r <- at_roi_rect(0, 0, 10, 5, label = "tissue")
at_roi_bbox(r)
#> [1] 0 0 10 5