readSpatialOverlay: Read in 'SpatialOverlay' from tiff file and annotations

View source: R/readSpatialOverlay.R

readSpatialOverlayR Documentation

Read in SpatialOverlay from tiff file and annotations

Description

Create an instance of class SpatialOverlay by reading data from OME-TIFF and annotation sheet.

Usage

readSpatialOverlay(
  ometiff,
  annots,
  slideName,
  image = FALSE,
  res = NULL,
  saveFile = FALSE,
  outline = TRUE,
  ...,
  segCol = NULL
)

Arguments

ometiff

path to OME-TIFF

annots

path to annotation file: can be labWorksheet, DA excel file, or delimted file

slideName

name of slide

image

should image be extracted from OME-TIFF

res

resolution of image 1 = largest, higher number = smaller This value will affect the coordinates of the overlays. res = 2, resolution is 1/2 the size as the raw image res = 3, resolution is 1/4 the size as the raw image res = 4, resolution is 1/8 the size as the raw image resolution = 1/2^(res-1)

saveFile

should xml & image be saved, file is saved in working directory with same name as OME-TIFF

outline

returned coordinates only contain outlinearies, will not work for segmented ROIs

...

additional parameters for 'readLabWorksheet' like 'roiCol' and 'slideCol'

segCol

additional parameter for ‘annotMatching' if default search doesn’t work. For default search, set to NULL

Value

SpatialOverlay of slide

See Also

SpatialOverlay-class

Examples


muBrain_GxT <- readRDS(unzip(system.file("extdata", "muBrain_GxT.zip", 
                         package = "SpatialOmicsOverlay")))

image <- downloadMouseBrainImage()

muBrain <- readSpatialOverlay(ometiff = image, annots = muBrain_GxT[,1:5], 
                              slideName = "D5761 (3)", image = TRUE, res = 8, 
                              saveFile = FALSE, outline = FALSE)


Nanostring-Biostats/SpatialOmicsOverlay documentation built on Dec. 18, 2024, 9:26 a.m.