A continuous region is a rectangle of non-empty cells. The smallest continuous region is an isolated cell containing a value. A column can be a region, as can be a row. Regions can be used to specify or extract subsets of the data you want to work with.

Planarly provides functions that return references to cells and references to regions that can be used to programmatically discover and define regions of interest.

Cell references in continuous regions

GoE(a)

Go east. Starting from cell a, walk right (east) over occupied cells until a non-occupied cell is reached. Return the last occupied cell. An occupied cell is a cell in any cell's spill area, including its own.

GoS(a)

Go south. Starting from cell a, walk down (south) over occupied cells until a non-occupied cell is reached. Return the last occupied cell. An occupied cell is a cell in any cell's spill area, including its own.

GoSE(a)

Go south east. Find the smallest rectangular region with a as its top-left corner, such that the region is bordered on the right, on the bottom, and on the bottom-right, by only non-occupied cells. Return the bottom right corner of this region.

Region references in continuous regions

GrowE(a)

Same as a:GoE(a). This function returns the region bounded by the top left corner at a and the bottom right corner at the cell returned by GoE(a). The region will be a row vector or a single cell.

GrowS(a)

Same as a:GoS(a). This function returns the region bounded by the top left corner at a and the bottom right corner at the cell returned by GoS(a). The region will be a column vector or a single cell.

GrowSE(a)

Same as a:GoSE(a). This function return the region bounded by the top left corner at a and the bottom right corner at the cell returned by GoSE(a). The region will be rectangular or a single cell.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f5169a30-8e2b-4d7c-b742-466262b71231/Screenshot_2021-07-08_at_14.47.56.png