SwitchResolution: Function used to reload images in different quality and apply...

SwitchResolutionR Documentation

Function used to reload images in different quality and apply image transformations

Description

If you want to use histological images in your analyses the recommendation is to load them in low resolution (default 400 pixels width) and apply any transformations that you want, e.g. masking and alignment. Then, whenever you need to increase the resolution of your images you can use this function to reload higher resolution versions of the same images and apply the same transformations.

Usage

SwitchResolution(object, xdim, reference.index = 1, verbose = FALSE)

Arguments

object

Seurat object

xdim

Sets the pixel width for scaling, e.g. 400 (maximum allowed width is 2000 pixels)

reference.index

Set reference image used for image alignment. This should be the same the reference.index used for AlignImages or ManualAlignImages.

verbose

Print messages

Details

Masking and alignment has been optimized for small images and will be significanlty slower for images of higher resolution. For this reson we recommend users to use this function instead.

Examples

## Not run: 
# Create Seurat object, load, mask and align images at low resolution
se <- InputFromTable(infoTable) %>%
   LoadImages() %>%
   MaskImages() %>%
   AlignImages()

# Reload images and apply transformations to higher resolution images, e.g. 2000 pixels width
se <- SwitchResolution(se, 2000)

## End(Not run)


jbergenstrahle/STUtility documentation built on March 14, 2023, 7:15 a.m.