getScaleFactor.Rd
Extracts scale factors. See details for more.
getScaleFactor(object, ...)
# S4 method for class 'SPATA2'
getScaleFactor(object, fct_name, img_name = activeImage(object))
# S4 method for class 'SpatialData'
getScaleFactor(object, fct_name, img_name = activeImage(object))
# S4 method for class 'HistoImage'
getScaleFactor(object, fct_name)
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.
Character value. Name of the scale factor.
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()
.
Single value whose properties depend on fct_name
.
This function gives access to slot @scale_factors of each registered HistoImage
.
As it is a list it can be flexibly expanded. The following scale factor slots are
reserved:
image: The image scale factor used to create variables x and y from
variables x_orig and y_orig in the coordinates data.frame and the outline data.frames
of the spatial annotations and the tissue. The scale factor depends on the deviation in
resolution from the original image - based on which the coordinates data.frame
was created - and the image picked in img_name
.
pixel: The pixel scale factor is used to convert pixel values into SI units. It should have an attribute called "unit" conforming to the format "SI-unit/px
Find more information here
.