Ensures section specific processing of observations in relation by identifying the outline of the tissue section (or -sections in case of multiple tissue sections per sample). Additionally, allows to relate observations to the spatial position and extent of image annotations.

include_tissue_outline(
  coords_df,
  input_df,
  img_ann_center = NULL,
  ias_circles = FALSE,
  ccd = NULL,
  remove = TRUE,
  inside_if = c(1, 2),
  opt = "concaveman",
  buffer = 0,
  ...
)

Arguments

input_df

A data.frame that contains at least numeric x and y variables.

ias_circles

Logical value. If TRUE, input data.frame is assumed to contain polygon coordinates of the expanded image annotation encircling and sorts them after filtering for those that lie inside the tissue section in order to plot them via ggplot2::geom_path().

opt

Either 'concaveman'' or 'chull'. Defines with which function the tissue outline is computed.

...

Used to absorb deprecated arguments or functions.

Value

Filtered input data.frame.