getImgAnnCenter() computes the x- and y- coordinates of the center of the outer border, returns a numeric vector of length two. getImgAnnCenters() computes the center of the outer and every inner border and returns a list of numeric vectors of length two.

getImageAnnotationCenter(...)

getImgAnnCenter(object, ...)

# S4 method for spata2
getImgAnnCenter(object, id)

# S4 method for ImageAnnotation
getImgAnnCenter(object)

getImgAnnCenters(object, ...)

# S4 method for spata2
getImgAnnCenters(object, id, outer = TRUE, inner = TRUE)

# S4 method for ImageAnnotation
getImgAnnCenters(object, outer = TRUE, inner = TRUE)

Arguments

...

Used to absorb deprecated arguments or functions.

object

An object of class spata2.

id

Character value. The ID of the image annotation of interest.

outer

Logical value. Only applies if an image annotation contains a secondary image annotation within its own area. If FALSE, the outer border of the image annotation is not included in the output.

inner

Logical value. Only applies if an image annotation contains a secondary image annotation within its own area. If FALSE, the inner borders of the image annotation are not included in the output.

Value

Numeric vector of length two or a list of these. Values are named x and y.