locate_images: Locate image files

View source: R/locate_images.R

locate_imagesR Documentation

Locate image files

Description

Creates a named character() vector that can be helpful for locating image files and used with add_images(). This function is not necessary if the image files don't use the spe$sample_id.

Usage

locate_images(spe, image_dir, image_pattern)

Arguments

spe

Defaults to the output of fetch_data(type = 'spe'). This is a SpatialExperiment-class object with the spot-level Visium data and information required for visualizing the histology. See fetch_data() for more details.

image_dir

A character(1) specifying a path to a directory containing image files with the pattern sampleID_pattern.png.

image_pattern

A character(1) specifying the pattern for the image files.

Value

A named character() vector with the path to images.

See Also

Other Functions for adding non-standard images: add_images()

Examples

## Not run: 
locate_images(spe, tempdir(), "testImage")

## End(Not run)

LieberInstitute/spatialLIBD documentation built on April 21, 2024, 6:47 p.m.