image = | dilateLabel2dImg (inLabImg) |
image = | dilateLabel2dImg (inLabImg,mode) |
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
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
Code Example
inBinImg = PyIPSDK.loadTiffImageFile(inputImgPath)
labelImg = advmorpho.connectedComponent2dImg(inBinImg)
outBasinsImg = advmorpho.dilateLabel2dImg(labelImg)
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);