# NOT RUN {
# pixel image
v <- as.im(function(x,y){factor(round(5 * (x^2 + y^2)))}, W=owin())
levels(v) <- letters[seq(length(levels(v)))]
as.tess(v)
# quadrat counts
data(nztrees)
qNZ <- quadratcount(nztrees, nx=4, ny=3)
as.tess(qNZ)
# }
Run the code above in your browser using DataLab