getSpatAnnArea | R Documentation |
Computes the area of spatial annotations.
getSpatAnnArea(object, ...)
## S4 method for signature 'SPATA2'
getSpatAnnArea(
object,
ids = NULL,
unit = "mm2",
tags = NULL,
test = "any",
as_numeric = TRUE,
verbose = NULL,
...
)
## S4 method for signature 'SpatialData'
getSpatAnnArea(
object,
ids = NULL,
tags = NULL,
test = "any",
unit = "mm2",
as_numeric = TRUE,
verbose = NULL,
...
)
object |
An object of class |
... |
Used to absorb deprecated arguments or functions. |
unit |
Character value. Specifies the desired unit in
which distance measures
or area measures are provided.
Run |
tags |
Character vector or |
test |
Character value. One of c('any'. 'all', 'identical', 'not_identical', 'none').
Specifies how input for |
verbose |
Logical. If (Warning messages will always be printed.) |
Contains the area of the spatial annotations in the unit that is specified in unit
.
The unit is attached to the output as an attribute named unit. E.g. if
unit = *mm2*
the output value has the unit mm^2.
The area is computed solely based on the outline of the annotation even
if the annotation transgresses the tissue outline! If you only want the area
of the annotation on the tissue section adjust the annotation with mergeWithTissueOutline()
.
See examples.
getSpatAnnOutlineDf()
, getCCD()
, as_unit()
library(SPATA2)
object <- loadExampleObject("UKF313T")
ids <- c("necrotic_edge2", "necrotic_edge2_transgr")
plotSpatialAnnotations(object, ids = ids)
getSpatAnnArea(object, ids = ids)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.