DIPlib Documentation - ©1995-2009 Quantitative Imaging Group, Delft University of Technology.

# NeighbourListMake

Get list of direct neighbours

## SYNOPSIS

`#include "dip_neighbourlist.h"`

dip_Error dip_NeighbourListMake ( ndims, connectivity, coords, resources )

## FUNCTION

A list `coords` is created with the relative coordinates to the direct neighbours of a pixel in an `ndims`-dimensional image. How many direct neighbours are returned is controlled by `connectivity`, see The connectivity parameter for the available values and their meaning.

`coords` is allocated and tracked in `resources`.

## ARGUMENTS

Data type | Name | Description
`dip_int` | `ndims` | Image dimensionality
`dip_int` | `connectivity` | Connectivity
`dip_CoordinateArray *` | `coords` | Output neighbour coordinates
`dip_Resources` | `resources` | Resources tracking structure. See `ResourcesNew`

## SEE ALSO

`NeighbourListMake`, `NeighbourListMakeChamfer`, `NeighbourListMakeImage`, `NeighbourListToIndices`, `NeighbourIndicesListMake`

DIPlib on-line documentation | Function reference | Global function index