rasterizeEachCluster: Create a raster object from a labeled sample

View source: R/rasterization.R

rasterizeEachClusterR Documentation

Create a raster object from a labeled sample

Description

Converts a labeled spatial tissue map into a raster object, in which each spatial cluster is represented by a pixel coded by label assignment.

Usage

rasterizeEachCluster(sampleInfo)

Arguments

sampleInfo

A data.frame contains the pixel information and cluster labels for each barcode of a human breast cancer sample. The index contains barcodes, and at least three other columns that have these information are required and the column names should be the same as following: "imagerow": The row pixel coordinate of the center of the spot "imagecol": The column pixel coordinate of the center of the spot "Cluster": The label that corresponding to this barcode

Value

This function returns a class of RasterLayer. This raster object is converted from a labeled spatial tissue map.

Examples

fpath <- system.file("extdata", "dataframe.rda", package="stJoincount")
load(fpath)
mosaicIntegration <- rasterizeEachCluster(humanBC)

Nina-Song/stJoincount documentation built on Oct. 23, 2022, 4:55 p.m.