IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Dilation of 2D labelsSee full documentation
imagedilateLabel2dImg (inLabImg)
imagedilateLabel2dImg (inLabImg,mode)

Detailed Description

Dilate the labels in the input label image until filling all pixels.

This algorithm dilates the labels in the input image until the image contains no more background pixels.

It is also possible to ask to the algorithm an additional step to compute the separation lines.

Here is an example of label dilation

dilageLabel2dImg.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input binary image
inBinImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# Labelize the binary image
labelImg = advmorpho.connectedComponent2dImg(inBinImg)
# dilate the labels to have a basins image
outBasinsImg = advmorpho.dilateLabel2dImg(labelImg)
# dilate the labels to have separated basins
outSplitImg = advmorpho.dilateLabel2dImg(labelImg, PyIPSDK.eDLM_Split)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/DilateLabel2dImg/DilateLabel2dImg.h>

Code Example

ImagePtr pOutImg = dilateLabel2dImg(pInLabelImg, mode);