IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

seeded watershed 3d algorithm More...

IPSDKIPLADVANCEDMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::advmorpho::seededWatershed3dImg (const image::ImageConstPtr &pInIntImg3d, const image::ImageConstPtr &pInLabMarkImg3d, const ipsdk::imaproc::attr::eWatershedOutputMode &inWatershedOutputMode)
 wrapper function for seeded watershed 3d algorithm More...
 
IPSDKIPLADVANCEDMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::advmorpho::seededWatershed3dImg (const image::ImageConstPtr &pInIntImg3d, const image::ImageConstPtr &pInLabMarkImg3d, const ipsdk::imaproc::attr::eWatershedOutputMode &inWatershedOutputMode, const ipsdk::imaproc::attr::eWatershedProcessingMode &inOptWatershedProcMode)
 wrapper function for seeded watershed 3d algorithm More...
 
IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::seededWatershed3dImg (const image::ImageConstPtr &pInIntImg3d, const image::ImageConstPtr &pInLabMarkImg3d, const ipsdk::imaproc::attr::eWatershedOutputMode &inWatershedOutputMode, const ipsdk::imaproc::attr::eWatershedProcessingMode &inOptWatershedProcMode, const ipUInt32 inOptNbMinDataByThread, const image::ImagePtr &pOutBinLabImg)
 wrapper function for seeded watershed 3d algorithm More...
 

Detailed Description

seeded watershed 3d algorithm

Watershed algorithm allows to partition an input grey image InIntImg3d, associated to a marker image InLabMarkImg3d, into area of influence. This is a classical technic used for segmentation purposes.

A detailed description of this algorithm is provided in 2d case, see Seeded Watershed 2d.

Note
this algorithm has been packaged for easy separation in classical cases, see :
Warning
This algorithm will not be distributed, flooding processing computation and memory are proceeded on local computer.
See also
https://en.wikipedia.org/wiki/Watershed_%28image_processing%29

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InIntImg3d [Input] image 3d for processing operation (data contained in image buffer are integers) X
ipsdk::imaproc::attr::InLabMarkImg3d [Input] label marker image 3d for processing operation X
ipsdk::imaproc::attr::InWatershedOutputMode [Input] parameter allowing to define watershed output mode X
ipsdk::imaproc::attr::InOptWatershedProcMode [Input Optional] Watershed processing mode X
ipsdk::imaproc::attr::InOptNbMinDataByThread [Input Optional] minimum number of data by thread X
ipsdk::imaproc::attr::OutOptWk1Img [Output Optional] Temporary working image for algorithm X
ipsdk::imaproc::attr::OutBinLabImg [Output] binary or label image for processing operation customOutput (_pOutBinLabImg, outputWatershed(_pInLabMarkImg3d,_pInWatershedOutputMode))

Global Rule description

Global rule description for algorithm :
(ipsdk::imaproc::matchSize (_pInIntImg3d,_pInLabMarkImg3d) && 
 ipsdk::imaproc::customImageProperty (_pOutBinLabImg,
  allowedBufferType (_pInWatershedOutputMode)) && 
 ipsdk::processor::ifIsSet (_pOutOptWk1Img,
  ipsdk::imaproc::matchSize (_pInIntImg3d,_pOutOptWk1Img)) && 
 ipsdk::processor::If (
  ipsdk::imaproc::bufferType (_pOutBinLabImg,ipsdk::image::eImageBufferType::eIBT_Binary),
  ipsdk::imaproc::matchSize (_pOutBinLabImg,_pInLabMarkImg3d),
  ipsdk::imaproc::matchSizeAndType (_pOutBinLabImg,_pInLabMarkImg3d)))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input images
inIntImg3d = PyIPSDK.loadTiffImageFile(inputGreyImgPath,
PyIPSDK.eTiffDirectoryMode.eTDM_Volume)
inLabMarkImg3d = PyIPSDK.loadTiffImageFile(inputLabelImgPath,
PyIPSDK.eTiffDirectoryMode.eTDM_Volume,
PyIPSDK.eTiffBufferMode.eTBM_Label)
# process seeded watershed (watershed lines extraction mode)
outImg = advmorpho.seededWatershed3dImg(inIntImg3d, inLabMarkImg3d,
PyIPSDK.eWatershedOutputMode.eWOM_Lines,
PyIPSDK.eWPM_Repeatable)

Example of C++ code :

Example informations

Associated library

IPSDKIPLAdvancedMorphology

Header file

Code Example

// opening of input grey image
ImagePtr pInIntImg3d = loadTiffImageFile(inputGreyImgPath,
eTiffDirectoryMode::eTDM_Volume);
// opening of input label seeds image
ImagePtr pInLabMarkImg3d = loadTiffImageFile(inputLabelImgPath,
eTiffDirectoryMode::eTDM_Volume,
eTiffBufferMode::eTBM_Label);
// process seeded watershed (watershed lines extraction mode)
ImagePtr pOutImg = seededWatershed3dImg(pInIntImg3d, pInLabMarkImg3d, eWatershedOutputMode::eWOM_Lines);
See also
SeededWatershed3dImgLvl1

Function Documentation

◆ seededWatershed3dImg() [1/3]

IPSDKIPLADVANCEDMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::advmorpho::seededWatershed3dImg ( const image::ImageConstPtr pInIntImg3d,
const image::ImageConstPtr pInLabMarkImg3d,
const ipsdk::imaproc::attr::eWatershedOutputMode inWatershedOutputMode 
)

wrapper function for seeded watershed 3d algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ seededWatershed3dImg() [2/3]

IPSDKIPLADVANCEDMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::advmorpho::seededWatershed3dImg ( const image::ImageConstPtr pInIntImg3d,
const image::ImageConstPtr pInLabMarkImg3d,
const ipsdk::imaproc::attr::eWatershedOutputMode inWatershedOutputMode,
const ipsdk::imaproc::attr::eWatershedProcessingMode inOptWatershedProcMode 
)

wrapper function for seeded watershed 3d algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ seededWatershed3dImg() [3/3]

IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::seededWatershed3dImg ( const image::ImageConstPtr pInIntImg3d,
const image::ImageConstPtr pInLabMarkImg3d,
const ipsdk::imaproc::attr::eWatershedOutputMode inWatershedOutputMode,
const ipsdk::imaproc::attr::eWatershedProcessingMode inOptWatershedProcMode,
const ipUInt32  inOptNbMinDataByThread,
const image::ImagePtr pOutBinLabImg 
)

wrapper function for seeded watershed 3d algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure