Skip to contents

Simplify an ROI

Usage

at_roi_simplify(roi, tolerance, call = rlang::caller_env())

Arguments

roi

An annot_roi.

tolerance

Non-negative Douglas-Peucker tolerance (dTolerance).

call

The calling environment, for error reporting.

Value

An annot_roi with simplified geometry.

Examples

at_roi_simplify(at_roi_circle(50, 50, 10, n_seg = 128, label = "a"), 1)
#> <annot_roi> a (POLYGON)
#> id: "roi_000000071"  |  level: 0  |  source: manual
#> bbox: [40, 40] - [60, 60]