This function creates a window for a `spatstat::ppp` object, the type of window can be specified using the `window` argument.
Arguments
- data
A single image data frame from a SingleCellExperiment object or PPP object.
- window
The shape of window around the regions, can be `square`, `convex` or `concave`
- window.length
A tuning parameter for controlling the level of concavity when estimating concave windows.
Examples
data <- data.frame(x = rnorm(10), y = rnorm(10))
ow <- makeWindow(data, window = "square")
spatstat.geom::ppp(x = data$x, y = data$y, window = ow)
#> Planar point pattern: 10 points
#> window: rectangle = [-1.3187779, 0.7669156] x [-2.2423765, 2.051987] units