createMask: Create a binary mask from a base 64 string

View source: R/coordinateGeneration.R

createMaskR Documentation

Create a binary mask from a base 64 string

Description

Create a binary mask from a base 64 string

Usage

createMask(b64string, metadata, outline = TRUE)

Arguments

b64string

base 64 string

metadata

metadata of AOI including: Height, Width of AOI

outline

only the outline points should be returned

Value

binary mask image

Examples


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

samp <- which(sampNames(muBrain) == "DSP-1012999073013-A-F12")

ROIMask <- createMask(b64string = position(overlay(muBrain))[samp], 
                      metadata = meta(overlay(muBrain))[samp,],
                      outline = TRUE)

pheatmap::pheatmap(ROIMask, cluster_rows = FALSE, cluster_cols = FALSE)


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