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

GrowRegions

Dilate the regions in a labelled image

SYNOPSIS

#include "dip_regions.h"

dip_Error dip_GrowRegions ( in, grey, mask, out, connectivity, iterations, order )

DATA TYPES

in: binary, integer

grey: interger, float (converted to dip_sfloat)

mask: dip_uint8

FUNCTION

The regions in the input image in are grown with several options:

If grey is NULL, the regions are dilated iterations steps, according to connectivity (see The connectivity parameter), and optionally constrained by mask. This is the labelled equivalent to BinaryPropagation. If iterations is 0, the objects are dilated until no further change is possible. order is ignored.

If an image grey is given, the labels are grown in order of the grey-values in grey. order indicates whether pixels with high grey-values are added first or last. iterations is ignored, and mask is an optional constraint. This is a watershed algorithm with initial labels. The function Watershed does not accept an initial segmentation, so these two functions complement each other. Note that GrowRegions does not leave any watershed pixels in between the regions.

ARGUMENTS

Data typeNameDescription
dip_ImageinInput binary or labelled image
dip_ImagegreyInput grey-value image
dip_ImagemaskMask image
dip_ImageoutOutput binary or labelled image
dip_intconnectivityConnectivity
dip_intiterationsNumber of iterations
dipf_GreyValueSortOrderorderWhether to grow from low to high or high to low

The dipf_GreyValueSortOrder enumeration consists of the following values:

NameDescription
DIP_GVSO_HIGH_FIRSTProcess the pixels from high grey-value to low grey-value.
DIP_GVSO_LOW_FIRSTProcess the pixels from low grey-value to high grey-value.

SEE ALSO

GrowRegionsWeighted, Watershed, BinaryPropagation, Label