Topology2d#
Defines basic 2d discrete topology utils.
- extract_neighbourhood(img, x, y)[source]#
Return the neighbourhoods of the indicated voxels
- Arguments:
img (array): the 2d image x,y (n array): coordinates of the voxels to extract neighbourhoods from
- Returns:
array (nx9 array): neighbourhoods
- Note:
Assumes borders of the image are zero so that 0<x,y<w,h !