as.mask {spatstat} | R Documentation |
Obtain a discrete (pixel image) approximation of a given window
as.mask(w, eps=NULL, dimyx=NULL)
w |
A window (object of class "owin" ). |
eps |
(optional) width and height of pixels. |
dimyx |
(optional) pixel array dimensions |
The shape of the window w
will be approximated
by a binary pixel image. See owin.object
for
explanation of binary image masks.
The pixel raster will be an m x n rectangular grid
where m, n are given by dimyx[2]
, dimyx[1]
respectively (if the argument dimyx
is given)
or by the constraint that
pixel widths and heights should be approximately eps
.
If neither eps
nor dimyx
is given,
the pixel raster dimensions are obtained from
spatstat.options("npixel")
.
There is no inverse of this function!
A window (object of class "owin"
)
of type "mask"
representing a binary pixel image.
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf
owin.object
,
as.rectangle
,
spatstat.options
library(spatstat) w <- owin(c(0,10),c(0,10), poly=list(x=c(1,2,3,2,1), y=c(2,3,4,6,7))) plot(w) m <- as.mask(w) plot(m)