Etienne Bellemare etiennebr@gmail.com<mailto:etiennebr@gmail.com> writes:

> When using erode.owin from spatstat package, you can specify to keep the

> window extent (shrink.frame=FALSE). But, with dilate.owin, you cannot use

> shrink.frame. What can I use to keep the same extent ?

This question refers to the 'frame' or 'bounding rectangle' of a window (object of class "owin" in spatstat). You can find the bounding rectangle of a window using as.rectangle() or by extracting the $xrange and $yrange entries of the window.

In principle you can't keep the same bounding rectangle when you dilate a window, because the dilation could be larger than this rectangle.

However, you can manipulate the bounding rectangle of a window using

            w <- rebound.owin(w, rect)

where 'rect' is a rectangular window e.g. rect=owin(xrange, yrange).

This will generate an error if 'rect' does not contain 'w'.



Adrian Baddeley

	[[alternative HTML version deleted]]

