Computes the pixel scale factor. Only possible for methods that have a fixed center to center distance between their observational units (e.g. Visium).

computePixelScaleFactor(object, ...)

# S4 method for class 'SPATA2'
computePixelScaleFactor(object, verbose = TRUE, ...)

# S4 method for class 'SpatialData'
computePixelScaleFactor(object, verbose = 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.

verbose

Logical. If TRUE, informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

Value

The updated input object, containing the added, removed or computed results.

See also

containsCCD(), getPixelScaleFactor(), setPixelScaleFactor()

Examples


library(SPATA2)

data("example_data")

object <- example_data$object_UKF275T_diet

containsCDD(object) # must be TRUE

object <- computePixelScaleFactor(object)

getPixelScaleFactor(object, unit = "mm")