calc_neighbours_pix_nrs: Find Neigbour Cells in a Matrix

Description Usage Arguments Value Note

View source: R/region_growing_functions.r

Description

When given a the nrow and ncol of a matrix, this function returns the cellnumbers of the cardinal neighbours of each cell.You can choose whether to also include diagonal neighbours using the include.diags flag.

Usage

1
calc_neighbours_pix_nrs(nrow_, ncol_, include.diags = T)

Arguments

nrow_

number of rows in the matrix

ncol_

number of columns in the matrix

include.diags

should diagonally neighbouring cells be considered? Default is TRUE.

Value

a matrix providing the linear cell number in the first row, and in following rows, the linear cell numbers of neighbour cells

Note

called in region_growing_wrapper.r


pieterbeck/CanHeMonR documentation built on May 25, 2019, 7:11 a.m.