add_images | R Documentation |
This function re-uses the SpatialExperiment::scaleFactors()
from current
images when adding new images. This is useful if you take for example a
multi-channel VisiumIF image and break into several single-channel images
that all have the same dimensions. So you could have a set of images such as
channel_01_lowres
and channel_02_lowres
that have the same dimensions
and viewing area as the lowres
image produced by SpaceRanger, each with
only one channel. Similarly, you might have done some image manipulation for
a given image and generated one or more images with the same dimensions as
existing images.
add_images(
spe,
image_dir,
image_pattern,
image_id_current = "lowres",
image_id = image_pattern,
image_paths = locate_images(spe, image_dir, image_pattern)
)
spe |
A
SpatialExperiment-class
object. See |
image_dir |
A |
image_pattern |
A |
image_id_current |
A |
image_id |
A |
image_paths |
A named |
A
SpatialExperiment-class object
with the additional image data in imgData(spe)
.
Other Functions for adding non-standard images:
locate_images()
if (enough_ram()) {
## Obtain the necessary data
if (!exists("spe")) spe <- fetch_data("spe")
## Add an image
SpatialExperiment::imgData(add_images(
spe,
image_id_current = "lowres",
image_id = "lowres_aws",
image_paths = c("151507" = "https://spatial-dlpfc.s3.us-east-2.amazonaws.com/images/151507_tissue_lowres_image.png")
))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.