Extracts the minimum and maximum x- and y-coordinates of the spatial annotation border.

getSpatAnnRange(object, ...)

# S4 method for class 'SPATA2'
getSpatAnnRange(object, id, expand = 0, scale_fct = 1, ...)

# S4 method for class 'SpatialData'
getSpatAnnRange(object, id, scale_fct = 1)

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.

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.

expand

Specifies image expansion. An image that is cropped based on an image annotation centers around the image annotation. If expand = 0, the default, the dimensions of the image, that is width/x-axis and height/y-axis, are set to include only the image annotation area and nothing more. Using expand, the cropped image section can be adjusted. See section Expansion of cropped image sections for more information.

Value

List of length two. Named with x and y. Each slot contains a vector of length two with the minima and maxima in pixel.