cropTissue: Crop to remove black boundary around tissue.

View source: R/imageManipulation.R

cropTissueR Documentation

Crop to remove black boundary around tissue.

Description

Crop to remove black boundary around tissue.

Usage

cropTissue(overlay, buffer = 0.05)

Arguments

overlay

SpatialOverlay object

buffer

percent of new image size to add to each edge as a buffer

Value

SpatialOverlay object

Examples


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

image <- downloadMouseBrainImage()

muBrain <- addImageOmeTiff(overlay = muBrain, 
                           ometiff = image, res = 8)

muBrainCrop <- cropTissue(overlay = muBrain)

plotSpatialOverlay(overlay = muBrainCrop, legend = FALSE, 
                   hiRes = FALSE, scaleBar = FALSE)
            

Nanostring-Biostats/SpatialOmicsOverlay documentation built on April 20, 2024, 5:36 a.m.