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

# ChainCodeGetLongestRun

Chain code measurement function

## SYNOPSIS

`#include "dip_chaincode.h"`

dip_Error dip_ChainCodeGetLongestRun ( chaincode, longestRun )

## FUNCTION

Returns the number of pixels in the longest run of identical codes in `chaincode`. This represents the longest straight section of the boundary. `ChainCodeGetLongestRun` is the function used by `Measure` for the `FeatureLongestChaincodeRun` measurement.

## ARGUMENTS

Data type | Name | Description
`dip_ChainCode` | `chaincode` | Input chain code
`dip_int *` | `longestRun` | Receives the pixel count for the longest run

## SEE ALSO

`ImageChainCode`, `ChainCodeNew`, `ChainCodeFree`, `ChainCodeGetLength`, `ChainCodeGetFeret`, `ChainCodeGetRadius`