Get list of neighbours based on Chamfer metric
#include "dip_neighbourlist.h"
dip_Error dip_NeighbourListMakeChamfer ( pixelsize, maxdistance, coords, distance, resources )
A list coords is created with the relative coordinates to the neighbours of a pixel in an pixelsize->size-dimensional image. Here, neighbours are all pixels within a maxdistance distance. pixelsize gives the size of a pixel, and hence controls the size of the neighbourhood with maxdistance. Anisotropic pixel grids are supported. distance contains the distance to each of the neighbours in coords.
Distances between two pixels are taken to be the Euclidean distance. There are better metrics described in the literature for small neighbourhoods, that yield a more isotropic measure when compounded over longer distances. These are not implemented in this function.
coords and distance are allocated and tracked in resources.
Data type | Name | Description |
dip_FloatArray | pixelsize | Physical dimensions of the pixels |
dip_int | maxdistance | Maximum distance to which select neighbours |
dip_CoordinateArray * | coords | Output neighbour coordinates |
dip_FloatArray * | distance | Output distances to neighbours |
dip_Resources | resources | Resources tracking structure. See ResourcesNew |
NeighbourListMake, NeighbourListMakeChamfer, NeighbourListMakeImage, NeighbourListToIndices, NeighbourIndicesListMake
DIPlib on-line documentation | Function reference | Global function index