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

# ChainCodeNew

Chain code object allocation

## SYNOPSIS

`#include "dip_chaincode.h"`

dip_Error dip_ChainCodeNew ( chaincode, resources )

## FUNCTION

Allocates an object of type `dip_ChainCode`. However, since it's fields are private and there currently exist only read access functions, it is of little use creating such an object.

A `dip_ChainCode` object stores the following data:

Data type | Name | Description
`dip_int` | `startX` | Start coordinates for chain, `ChainCodeGetStart`
`dip_int` | `startY` | Start coordinates for chain, `ChainCodeGetStart`
`dip_int` | `label` | Label ID of object, `dip_ChainCodeGetLabel`
`dip_int` | `connectivity` | Connectivity of chain, `dip_ChainCodeGetConnectivity`
`dip_int` | `number` | Number of elements in chain, `dip_ChainCodeGetSize`
`dip_Chain *` | `chain` | Pointer to first element in chain, `dip_ChainCodeGetChains`

## ARGUMENTS

Data type | Name | Description
`dip_ChainCode *` | `chaincode` | Receives pointer to allocated structure
`dip_Resources` | `resources` | Resources tracking structure. See `ResourcesNew`

## SEE ALSO

`ImageChainCode`, `ChainCodeFree`, `ChainCodeArrayNew`, `ChainCodeArrayFree`, `ChainCodeGetSize`, `ChainCodeGetChains`, `ChainCodeGetStart`, `ChainCodeGetLabel`, `ChainCodeGetConnectivity`, `ChainCodeGetLength`, `ChainCodeGetLongestRun`, `ChainCodeGetFeret`

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