50#ifndef PINK26_NEIGHBORS_H
51#define PINK26_NEIGHBORS_H
56enum { P26_NEIGHBORS_2D_MAX = 8, P26_NEIGHBORS_3D_MAX = 26 };
61 int dx[P26_NEIGHBORS_3D_MAX];
62 int dy[P26_NEIGHBORS_3D_MAX];
63 int dz[P26_NEIGHBORS_3D_MAX];
The image descriptor shared by every pink26 operator.
int p26_neighbor(const p26_neighborhood *neighborhood, const p26_image *img, p26_index i, int k, p26_index *neighbor_index)
Finds neighbor k of pixel i, if it lies inside the image.
p26_status p26_neighborhood_init(const p26_image *img, int connectivity, p26_neighborhood *neighborhood)
Builds the neighborhood of the given connectivity for img's geometry.
p26_status
Result of a pink26 function.
Definition status.h:75
int64_t p26_index
Pixel index or size in pixels (64-bit, so large 3D images fit).
Definition status.h:72
A 2D or 3D image.
Definition image.h:68
The neighbors of a pixel for one connectivity and one image geometry.
Definition neighbors.h:59
int dz[P26_NEIGHBORS_3D_MAX]
Displacement along z of neighbor k.
Definition neighbors.h:63
int dx[P26_NEIGHBORS_3D_MAX]
Displacement along x of neighbor k.
Definition neighbors.h:61
int dy[P26_NEIGHBORS_3D_MAX]
Displacement along y of neighbor k.
Definition neighbors.h:62
p26_index offset[P26_NEIGHBORS_3D_MAX]
Index offset: dz * rs * cs + dy * rs + dx.
Definition neighbors.h:64
int n
Number of neighbors: 4, 8, 6, 18 or 26.
Definition neighbors.h:60