| ggpLayerTissueOutline | R Documentation | 
Adds a hull that outlines the tissue.
ggpLayerTissueOutline(object, ...)
## S4 method for signature 'SPATA2'
ggpLayerTissueOutline(
  object,
  method = "obs",
  img_name = activeImage(object),
  by_section = TRUE,
  fragments = FALSE,
  line_alpha = 0.9,
  line_color = "black",
  line_size = 1,
  line_type = "solid",
  transform = TRUE,
  smooth_with = "none",
  scale_fct = 1,
  outline_fct = c(1.75, 2.75),
  expand_outline = 0,
  ...
)
## S4 method for signature 'SpatialData'
ggpLayerTissueOutline(
  object,
  method = NULL,
  img_name = activeImage(object),
  by_section = TRUE,
  fragments = FALSE,
  line_alpha = 0.9,
  line_color = "black",
  line_size = 1,
  line_type = "solid",
  transform = TRUE,
  smooth_with = "none",
  scale_fct = 1,
  outline_fct = c(1.75, 2.75),
  expand_outline = 0,
  ...
)
## S4 method for signature 'HistoImage'
ggpLayerTissueOutline(
  object,
  by_section = TRUE,
  fragments = FALSE,
  line_alpha = 0.9,
  line_color = "black",
  line_size = 1,
  line_type = "solid",
  transform = TRUE,
  smooth_with = "none",
  scale_fct = 1,
  expand_outline = 0,
  ...
)
## S4 method for signature 'data.frame'
ggpLayerTissueOutline(
  object,
  method = "coords",
  by_section = TRUE,
  line_alpha = 0.9,
  line_color = "black",
  line_size = 1,
  line_type = "solid",
  outline_fct = c(1.75, 2.75),
  use_scattermore = FALSE,
  expand_outline = 0,
  ...
)
| object | An object of class  | 
| ... | Additional arguments given to  | 
| method | Character value. Either 'obs' or 'image'. Decides whether
the tissue outline used based on the observations
or the image is used. If  | 
| img_name | Character value. The name of the image of interest.
If  | 
| by_section | Logical value. If  | 
| line_alpha | Numeric. Affects alpha of main lines of the plot. | 
| line_color | Character. Affects color of the main lines of the plot. | 
| line_size | Numeric. Affects size of the main lines of the plot. | 
| line_type | Character. The line type. One of 'blank', 'solid', 'dashed', 'dotted', 'dotdash', 'longdash' and 'twodash'. | 
| transform | Logical value. Ignored if no images exist in the object. If  | 
| smooth_with | Character vaule. Sets the method with which to smooth
the tissue outline polygon. One of  | 
| expand_outline | Distance measure with which to expand the outline. Must be provided in pixel units! | 
| use_scattermore | Logical value. If  | 
| incl_edge | Logical. If  | 
ggpLayer*()-functions return lists of ggproto objects
that can be added to ggplots via the + operator. In most of the cases
they are supposed to be added to plots created with the plotSurface*()
family.
identifyPixelContent(),identifyTissueOutline(),identifySpatialOutliers()
library(SPATA2)
library(tidyverse)
data("example_data")
object <- loadExampleObject("UKF275T")
plotSurface(object, color_by = "HM_HYPOXIA", pt_clrsp = "Reds 3") +
 ggpLayerTissueOutline(object)
# alternative
plotSurface(object, color_by = "HM_HYPOXIA", pt_clrsp = "Reds 3", outline = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.