getScaleFactor: Obtain scale factors

getScaleFactorR Documentation

Obtain scale factors

Description

Extracts scale factors. See details for more.

Usage

getScaleFactor(object, ...)

## S4 method for signature 'SPATA2'
getScaleFactor(object, fct_name, img_name = activeImage(object))

## S4 method for signature 'SpatialData'
getScaleFactor(object, fct_name, img_name = activeImage(object))

## S4 method for signature 'HistoImage'
getScaleFactor(object, fct_name)

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.

fct_name

Character value. Name of the scale factor.

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().

Details

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.

Value

Single value whose properties depend on fct_name.


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.