powered by
Determines whether the given window is really a rectangle aligned with the coordinate axes, and if so, converts it to a rectangle object.
rescue.rectangle(W)
Another object of class "owin" representing the same window.
"owin"
A window (object of class "owin").
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
and Rolf Turner r.turner@auckland.ac.nz
This function decides whether the window W is actually a rectangle aligned with the coordinate axes. This will be true if W is
W
a rectangle (window object of type "rectangle");
"rectangle"
a polygon (window object of type "polygonal" with a single polygonal boundary) that is a rectangle aligned with the coordinate axes;
"polygonal"
a binary mask (window object of type "mask") in which all the pixel entries are TRUE.
"mask"
TRUE
If so, the function returns this rectangle, a window object of type "rectangle". If not, the function returns W.
as.owin, owin.object
as.owin
owin.object
w <- owin(poly=list(x=c(0,1,1,0),y=c(0,0,1,1))) rw <- rescue.rectangle(w) w <- as.mask(unit.square()) rw <- rescue.rectangle(w)
Run the code above in your browser using DataLab