Extracts the centroid of the polygon used to outline the whole tissue.

getTissueOutlineCentroid(object, ...)

# S4 method for class 'SpatialData'
getTissueOutlineCentroid(
  object,
  method = NULL,
  img_name = activeImage(object),
  transform = TRUE,
  ...
)

# S4 method for class 'HistoImage'
getTissueOutlineCentroid(object, transform = TRUE, ...)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

...

Used to absorb deprecated arguments or functions.

method

Character value. Either 'obs' or 'image'. Decides whether the tissue outline used based on the observations or the image is used. If method = NULL, the function checks first if any HistoImage is registered. If so, the outline from the image specified with img_name is returned. If there are no images, the outline computed with identifyTissueOutline(..., method = 'obs') is used.

img_name

Character value. The name of the image of interest. If NULL, the active image is chosen by default. Either way, must be one of getImageNames().

transform

Logical value. Ignored if no images exist in the object. If TRUE, spatial transformation instructions saved during image alignment of the image img_name are applied. Only relevant if there are any images registered in the SPATA2 object.

Value

Numeric vector of length two.