Skip to contents

Create a point ROI

Usage

at_roi_point(x, y, label, level = 0L, ..., call = rlang::caller_env())

Arguments

x, y

Numeric coordinates of the point, in image pixels.

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, and id set those fields; all others become user attributes.

call

The calling environment, for error reporting.

Value

An annot_roi with POINT geometry.

Examples

r <- at_roi_point(10, 20, label = "cell")
at_roi_centroid(r)
#> [1] 10 20