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

ChainCodeGetChains

Chain code access function

SYNOPSIS

#include "dip_chaincode.h"

dip_Error dip_ChainCodeGetChains ( chaincode, chain )

FUNCTION

Returns a pointer to the first element of the chain. Each chain element contains a pointer to the next element. The last element has a NULL pointer. ChainCodeGetSize returns the number of elements in the chain. The border value in each element indicates whether the pixel is on the edge of the image or not. This usually indicates that the object is cut by the imaging window and needs to be treated differently.

ARGUMENTS

Data typeNameDescription
dip_ChainCodechaincodeChain code
dip_Chain **chainReceives the pointer to the first element in the chain

The dip_Chain structure has the following elements:

Data typeNameDescription
dip_intcodeDirection of step taken from previous to this pixel (Freeman code)
dip_intborderPixel is on the border
dip_Chain *nextPointer to the next element in the chain

SEE ALSO

ImageChainCode, ChainCodeNew, ChainCodeFree, ChainCodeGetSize, ChainCodeGetStart, ChainCodeGetLabel, ChainCodeGetConnectivity

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