Dilate the regions in a labelled image
dip_Error dip_GrowRegions ( in, grey, mask, out, connectivity, iterations, order )
in: binary, integer
grey: interger, float (converted to dip_sfloat)
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.
|dip_Image||in||Input binary or labelled image|
|dip_Image||grey||Input grey-value image|
|dip_Image||out||Output binary or labelled image|
|dip_int||iterations||Number of iterations|
|dipf_GreyValueSortOrder||order||Whether to grow from low to high or high to low|
The dipf_GreyValueSortOrder enumeration consists of the following values:
|DIP_GVSO_HIGH_FIRST||Process the pixels from high grey-value to low grey-value.|
|DIP_GVSO_LOW_FIRST||Process the pixels from low grey-value to high grey-value.|
GrowRegionsWeighted, Watershed, BinaryPropagation, Label