IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Connected component image 3d labeling algorithm. More...

IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::image::ImagePtr ipsdk::imaproc::advmorpho::connectedComponent3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg3d)
 wrapper function for Connected component image 3d labeling algorithm More...
 
IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::image::ImagePtr ipsdk::imaproc::advmorpho::connectedComponent3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg3d, const ipsdk::eNeighborhood3dType &inOptNeighborhood3d)
 wrapper function for Connected component image 3d labeling algorithm More...
 
IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::ipUInt32 ipsdk::imaproc::advmorpho::connectedComponent3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg3d, const ipsdk::eNeighborhood3dType &inOptNeighborhood3d, const ipsdk::image::ImagePtr &pOutLabelImg3d)
 wrapper function for Connected component image 3d labeling algorithm More...
 

Detailed Description

Connected component image 3d labeling algorithm.

Connected component labeling algorithm allows to uniquely labeled subsets of connected components with respect to a given neighborhood policy.

Output labels start with 1 and are consecutive with respect to scanning order (from lower x then y then z to higher).

For more informations on used neighborhood 3d types report to 3d neighborhood models.

Resulting image buffer type must be one of the following :

Here is an example of connected component extraction operation applied to a binary input image (with 26 connexity neighborhood type) :

connectedComponent3dImg.png

The algorithm also allows to relabel a label image. This way all connected component will be assigned to a unique label.

Please, see Connected Component 2d for an illustration of relabeling in a 2d case.

Note
Last wrapper function returns number of extracted connected components (unique labels).
If number of extracted connected components exceed output image data type capacity (case of a number of connected components greater than 65535 and an output image associated to a ipsdk::image::eImageBufferType::eIBT_Label16 data type), output image data type is automatically upgraded to ipsdk::image::eImageBufferType::eIBT_Label32.
See also
http://en.wikipedia.org/wiki/Connected-component_labeling

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InBinLabImg3d [Input] binary or label 3d image for processing operation X
ipsdk::imaproc::attr::InOptNeighborhood3d [Input optional] neighborhood 3d type for operation X
ipsdk::imaproc::attr::OutLabelImg3d [Output] label image 3d for processing operation ipsdk::imaproc::duplicateInOut (_pOutLabelImg3d, _pInBinLabImg3d, ipsdk::image::eImageBufferType::eIBT_Label16)
ipsdk::imaproc::attr::OutMaxLabel [Output] maximum computed label value X

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInBinLabImg3d,_pOutLabelImg3d)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# connected components 3d computation
outImg = advmorpho.connectedComponent3dImg(inImg)

Example of C++ code :

Example informations

Associated library

IPSDKIPLAdvancedMorphology

Header file

Code Example

// opening input image
ImagePtr pInBinLabImg3d = loadTiffImageFile(inputImgPath);
// compute connected component label image associated to input image
ImagePtr pOutLabelImg3d = connectedComponent3dImg(pInBinLabImg3d);
See also
ConnectedComponent3dImgLvl1
ConnectedComponent3dImgLvl2

Function Documentation

◆ connectedComponent3dImg() [1/3]

IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::image::ImagePtr ipsdk::imaproc::advmorpho::connectedComponent3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg3d)

wrapper function for Connected component image 3d labeling algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ connectedComponent3dImg() [2/3]

IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::image::ImagePtr ipsdk::imaproc::advmorpho::connectedComponent3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg3d,
const ipsdk::eNeighborhood3dType inOptNeighborhood3d 
)

wrapper function for Connected component image 3d labeling algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ connectedComponent3dImg() [3/3]

IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::ipUInt32 ipsdk::imaproc::advmorpho::connectedComponent3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg3d,
const ipsdk::eNeighborhood3dType inOptNeighborhood3d,
const ipsdk::image::ImagePtr pOutLabelImg3d 
)

wrapper function for Connected component image 3d labeling algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure