getSpatAnnCenter | R Documentation |
getSpatAnnCenter()
computes the
x- and y- coordinates of the center of the outer border, returns
a numeric vector of length two. getSpatAnnCenters()
computes the center of the outer
and every inner border and returns a list of numeric vectors of length two.
getSpatAnnCenter(object, ...)
## S4 method for signature 'SPATA2'
getSpatAnnCenter(object, id)
## S4 method for signature 'SpatialData'
getSpatAnnCenter(object, id)
## S4 method for signature 'SpatialAnnotation'
getSpatAnnCenter(object)
getSpatAnnCenters(object, ...)
## S4 method for signature 'SPATA2'
getSpatAnnCenters(object, id, outer = TRUE, inner = TRUE)
## S4 method for signature 'SpatialData'
getSpatAnnCenters(object, id, outer = TRUE, inner = TRUE)
## S4 method for signature 'SpatialAnnotation'
getSpatAnnCenters(object, outer = TRUE, inner = TRUE)
object |
An object of class |
... |
Used to absorb deprecated arguments or functions. |
id |
Character value specifying the ID of the spatial annotation of interest. If there is only one spatial annotation in the object, the function will default to using it. However, if there are multiple annotations, this argument must be explicitly specified to identify the target annotation. |
outer |
Logical value. Only applies if an image annotation contains a secondary image annotation within its own area. If |
inner |
Logical value. Only applies if an image annotation contains a secondary image annotation within its own area. If |
Numeric vector of length two or a list of these. Values are named x and y.
library(SPATA2)
object <- loadExampleObject("LMU_MCI")
plotSpatialAnnotations(object, unit = "px")
getSpatAnnCenter(object, id = "inj1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.