Convert pixel index to coordinate
#include "dip_globals.h"
dip_Error dip_IndexToCoordinate ( index, coordinate, stride )
This function converts an pixel index of image in to a coordinate array. The conversion is done by calculating the modulus of the index with the strides of the in image. coordinate has to be an allocated integer array with its size equal to the dimensionality of in.
Data type | Name | Description |
dip_int | index | lineair index |
dip_IntegerArray | coordinate | output coordinates |
dip_IntegerArray | stride | stride array |
CoordinateToIndex, GetUniqueNumber
DIPlib on-line documentation | Function reference | Global function index