## 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))
Run the code above in your browser using DataLab