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

# ChainCodeGetRadius

Chain code measurement function

## SYNOPSIS

`#include "dip_chaincode.h"`

dip_Error dip_ChainCodeGetRadius ( chaincode, radius )

## FUNCTION

This function computes statistics on the radius of an object. The centre of gravity of the object's border pixels is used as the centre of the object. The distance from each border pixel to this centre is is computed. The maximum, minimum, mean and variance of these distances are returned in the `radius` structure, which contains the following elements:

Data type | Name | Description
`dip_float` | `max` | Maximum object radius
`dip_float` | `mean` | Mean object radius
`dip_float` | `min` | Minimum object radius
`dip_float` | `var` | Variance of object radius

`ChainCodeGetRadius` is the function used by `Measure` for the `FeatureRadius` measurement.

## ARGUMENTS

Data type | Name | Description
`dip_ChainCode` | `chaincode` | Input chain code
`dip_CCRadius *` | `radius` | Output measurement

## SEE ALSO

`ImageChainCode`, `ChainCodeNew`, `ChainCodeFree`, `ChainCodeGetLength`, `ChainCodeGetLongestRun`, `ChainCodeGetFeret`