View source: R/imageManipulation.R
cropSamples | R Documentation |
Crop to zoom in on given ROIs
cropSamples(overlay, sampleIDs, buffer = 0.1, sampsOnly = TRUE)
overlay |
SpatialOverlay object |
sampleIDs |
sampleIDs of ROIs to keep in image |
buffer |
percent of new image size to add to each edge as a buffer |
sampsOnly |
should only ROIs with given sampleIDs be in image |
SpatialOverlay object
muBrain <- readRDS(unzip(system.file("extdata", "muBrainSubset_SpatialOverlay.zip",
package = "SpatialOmicsOverlay")))
image <- downloadMouseBrainImage()
muBrain <- addImageOmeTiff(overlay = muBrain,
ometiff = image, res = 8)
samps <- sampNames(muBrain)
muBrainCrop <- suppressWarnings(cropSamples(overlay = muBrain,
sampleIDs = samps,
sampsOnly = TRUE))
plotSpatialOverlay(overlay = muBrainCrop, scaleBar = FALSE,
hiRes = TRUE, legend = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.