getImgAnnCenter: Obtain center of an image annotation

getImageAnnotationCenterR Documentation

Obtain center of an image annotation

Description

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.

Usage

getImageAnnotationCenter(...)

getImgAnnCenter(object, ...)

## S4 method for signature 'spata2'
getImgAnnCenter(object, id)

## S4 method for signature 'ImageAnnotation'
getImgAnnCenter(object)

getImgAnnCenters(object, ...)

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

## S4 method for signature '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.


kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.