Skip to contents

ROI centroid

Usage

sg_roi_centroid(roi, call = rlang::caller_env())

Arguments

roi

An sg_roi.

call

The calling environment, for error reporting.

Value

A numeric vector c(x, y) in the ROI's stored coordinates (at its own level).

Examples

sg_roi_centroid(sg_roi_rect(0, 0, 10, 10, label = "a"))
#> [1] 5 5