Description Usage Arguments Value Loading specific images Author(s) See Also Examples
Function to read in single- or multi-channel images from a specified path or file. The function returns a CytoImageList object containing one image per slot. Supported file extensions are: '.tiff', '.tif', '.png', '.jpeg', '.jpg'.
1 | loadImages(x, pattern = NULL, ...)
|
x |
The function takes a variety of possible character inputs:
|
pattern |
Character inputs of the following form:
|
... |
arguments passed to the |
A CytoImageList object
This function loads images via the readImage
function and
stores them in a CytoImageList object. In the simplest case, x
is an
image file name. If x
is a path, the pattern
argument can be
used to select image names with certain patterns. For convenience, pattern
also takes a vector of characters (e.g. a colData entry in a
SingleCellExperiment object) to select by unique image names.
Furthermore, a vector of image names can be provided to read in multiple
images.
Nils Eling (nils.eling@dqbm.uzh.ch),
Nicolas Damond (nicolas.damond@dqbm.uzh.ch)
readImage
, for reading in individual images.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Providing a single file
single.image <- system.file("extdata/E34_mask.tiff", package = "cytomapper")
single.image <- loadImages(single.image)
# Providing a path and pattern
path.to.images <- system.file("extdata", package = "cytomapper")
image.list <- loadImages(path.to.images, pattern = "mask.tiff")
# Providing multiple patterns
data(pancreasSCE)
path.to.images <- system.file("extdata", package = "cytomapper")
image.list <- loadImages(path.to.images, pattern = pancreasSCE$MaskName)
# Providing multiple files
list.images <- list.files(system.file("extdata", package = "cytomapper"),
pattern = "_mask.tiff", full.names = TRUE)
image.list <- loadImages(list.images)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.