
Method to extract image scale factors
GetScaleFactors.Rd
Method to extract image scale factors
Usage
GetScaleFactors(object)
# S4 method for Staffli
GetScaleFactors(object)
# S4 method for Seurat
GetScaleFactors(object)
Examples
# Load example data
se_mbrain <- readRDS(system.file("extdata/mousebrain", "se_mbrain", package = "semla")) |>
LoadImages()
#>
#> ── Loading H&E images ──
#>
#> ℹ Loading image from /private/var/folders/z8/nrcst881607gn95xh3_4qvb00000gp/T/Rtmpf80zo9/temp_libpath1c4b5544360a/semla/extdata/mousebrain/spatial/tissue_lowres_image.jpg
#> ℹ Scaled image from 600x565 to 400x377 pixels
#> ℹ Saving loaded H&E images as 'rasters' in Seurat object
# Fetch Staffli object
staffli_object <- GetStaffli(se_mbrain)
# Fetch images from a Staffli object
scalefactors <- GetScaleFactors(staffli_object)
scalefactors
#> # A tibble: 1 × 5
#> spot_diameter_fullres tissue_hires_scalef fiducial_diameter_fullres
#> <dbl> <dbl> <dbl>
#> 1 143. 0.104 215.
#> # ℹ 2 more variables: tissue_lowres_scalef <dbl>, sampleID <chr>
# Fetch images from a Seurat object
scalefactors <- GetScaleFactors(se_mbrain)
scalefactors
#> # A tibble: 1 × 5
#> spot_diameter_fullres tissue_hires_scalef fiducial_diameter_fullres
#> <dbl> <dbl> <dbl>
#> 1 143. 0.104 215.
#> # ℹ 2 more variables: tissue_lowres_scalef <dbl>, sampleID <chr>