createSpatialWindow: Create Spatial Window of MSI Data

View source: R/createSpatialWindow.R

createSpatialWindowR Documentation

Create Spatial Window of MSI Data

Description

This function creates 'spatstat.geom::owin' polygonal spatial window which represents the boundaries of the tissue under study.

Usage

createSpatialWindow(pixelCoords, isPolygon = FALSE, clean = FALSE, plot = TRUE)

Arguments

pixelCoords:

a data frame with x and y columns containing the coordinates of all pixels within a given MSI data. A 'matrix' will be coerced into a data frame.

isPolygon:

a logical, whether 'pixelCoords' represents the coordinates of a polygon or not.

clean:

logical, whether to fill holes created by missing pixels.

plot:

whether to plot.

Value

A spatial window object of type 'spatstat.geom::owin'.


CeMOS-Mannheim/moleculaR documentation built on April 14, 2025, 8:27 a.m.