Skip to contents

Create a layer

Usage

sg_roi_layer(
  name,
  labels = character(),
  style = sg_roi_style(),
  ...,
  call = rlang::caller_env()
)

Arguments

name

Single string layer name (unique within a project).

labels

Character vector; the controlled label vocabulary for the layer.

style

An annot_style, from sg_roi_style().

...

Additional named metadata stored on the layer.

call

The calling environment, for error reporting.

Value

An sg_roi_layer with no ROIs and a resolved colour mapping.

Examples

lyr <- sg_roi_layer("tumour", labels = c("tumour", "stroma"))
sg_roi_layer_n(lyr)
#> [1] 0