Skip to contents

Distance between two ROIs

Usage

sg_roi_distance(roi1, roi2, call = rlang::caller_env())

Arguments

roi1, roi2

sg_roi objects.

call

The calling environment, for error reporting.

Value

A numeric scalar distance in level-0 pixels.

Examples

a <- sg_roi_rect(0, 0, 4, 4, label = "a")
b <- sg_roi_rect(10, 0, 14, 4, label = "b")
sg_roi_distance(a, b)
#> [1] 6