fillholes.owin {spatstat.geom} | R Documentation |
Remove Small Holes in a Window
Description
Given a window, this function removes any small holes in the window.
Usage
fillholes.owin(W, amin)
Arguments
W |
Window (object of class |
amin |
Numeric value. The smallest permissible area of a hole. |
Details
This function simplifies a window W
by removing any holes with area less than amin
.
The argument W
must be a window (object of class
"owin"
).
Value
Another window (object of class "owin"
)
of the same type as W
.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.
See Also
Examples
## make object with small hole
A <- meningitis$kreise
W <- setminus.owin(Window(A), tiles(A)[[102]])
amin <- 500
opa <- par(mfrow=c(1,2))
plot(W)
plot(fillholes.owin(W, amin))
M <- as.mask(W)
plot(M)
plot(fillholes.owin(M, amin))
[Package spatstat.geom version 3.5-0 Index]