Converts one or more image annotations to a binary segmentation variable in the feature data.frame.

imageAnnotationToSegmentation(
  object,
  ids,
  segmentation_name,
  inside = "inside",
  outside = "outside",
  overwrite = FALSE
)

Arguments

object

An object of class spata2.

ids

Character vector. Specifies the image annotation(s) of interest. Barcode-spots that fall into the area of these annotations are labeled with the input for argument inside.

segmentation_name

Character value. The name of the new segmentation variable.

inside

Character value. The group name for the barcode-spots that are located inside the area of the image annotation(s).

outside

Character value. The group name for the barcode-spots that are located outside the area of the image annotation(s).

overwrite

Logical. Set to TRUE to overwrite existing variables with the same name.

Value

The input spata2 object containing the added or computed results.