IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Set the intensity to 1 if the number of neighbours with higher values are greater than the specified input value. More...

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::checkMultiphasedNeighourhood3dImg (const image::ImageConstPtr &pInLabelImg, const ipUInt32 nbLabels, const ipBool bIgnoreForeground)
 wrapper function for Set the intensity to 1 if the number of neighbours with higer values are greater than the specified input value More...
 
IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::checkMultiphasedNeighourhood3dImg (const image::ImageConstPtr &pInLabelImg, const ipUInt32 nbLabels, const ipBool bIgnoreForeground, const image::ImagePtr &pOutImg)
 wrapper function for Set the intensity to 1 if the number of neighbours with higer values are greater than the specified input value More...
 

Detailed Description

Set the intensity to 1 if the number of neighbours with higher values are greater than the specified input value.

Given an iput label image, the algorithm computes a binary image in which pixels are set to 1 if the label image counts at least InNbLabels different labels in its 3x3x3 neighbourhood.

It is possible to process only background pixels by setting the InIgnoreForeground flag to true.

A 2D example is given in the Check multiphased 2d neighourhood description.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InLabelImg3d [Input] label image 3d for processing operation X
ipsdk::imaproc::attr::InNbLabels [Input] number of labels for processing operation X
ipsdk::imaproc::attr::InIgnoreForeground [Input] Flags indicating if the forground is ignored during a calculation X
ipsdk::imaproc::attr::OutBinImg [Output] binary image for processing operation ipsdk::imaproc::duplicateInOut (_pOutBinImg, _pInLabelImg3d, ipsdk::image::eImageBufferType::eIBT_Binary)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInLabelImg3d,_pOutBinImg)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# boundary 3d image computation
outImg = morpho.checkMultiphasedNeighourhood3dImg(inImg, 3, True)

Example of C++ code :

Example informations

Associated library

IPSDKIPLBasicMorphology

Header file

Code Example

// opening input image
ImagePtr pInLabelImg = loadTiffImageFile(inputImgPath);
// compute boundary on input image
ImagePtr pOutImg = checkMultiphasedNeighourhood3dImg(pInLabelImg, 3, bIgnoreForeground);
See also
CheckMultiphasedNeighourhood3dImgLvl1
CheckMultiphasedNeighourhood3dImgLvl2
CheckMultiphasedNeighourhood3dImgLvl3

Function Documentation

◆ checkMultiphasedNeighourhood3dImg() [1/2]

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::checkMultiphasedNeighourhood3dImg ( const image::ImageConstPtr pInLabelImg,
const ipUInt32  nbLabels,
const ipBool  bIgnoreForeground 
)

wrapper function for Set the intensity to 1 if the number of neighbours with higer values are greater than the specified input value

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ checkMultiphasedNeighourhood3dImg() [2/2]

IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::checkMultiphasedNeighourhood3dImg ( const image::ImageConstPtr pInLabelImg,
const ipUInt32  nbLabels,
const ipBool  bIgnoreForeground,
const image::ImagePtr pOutImg 
)

wrapper function for Set the intensity to 1 if the number of neighbours with higer values are greater than the specified input value

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure