expandSpatialAnnotation | R Documentation |
Expands or shrinks the outer outline of a spatial annotation.
expandSpatialAnnotation(object, id, expand, new_id = FALSE, overwrite = FALSE)
object |
An object of class |
id |
Character value. The ID of the spatial annotation of interest. |
expand |
Distance measure with which to expand the border. Negative values shrink the outline. |
new_id |
Character value or |
overwrite |
Logical value. Must be |
The updated input object, containing the added, removed or computed results.
smoothSpatialAnnotation()
, shiftSpatialAnnotation()
, SpatialAnnotation
library(SPATA2)
library(tidyverse)
data("example_data")
object <- loadExampleObject("UKF275T")
plotImage(object) + ggpLayerSpatAnnOutline(object, ids = "vessel1", line_color = "red")
plotSpatialAnnotations(object, "vessel1")
object <- expandSpatialAnnotation(object, id = "vessel1", expand = "50um", new_id = "vessel1_exp")
plotSpatialAnnotations(object, ids = c("vessel1", "vessel1_exp"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.