Skip to contents

Create a point ROI

Usage

sg_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 sg_roi with POINT geometry.

Examples

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