IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

algorithm allowing to create a label 3d image from a collection of shape More...

IPSDKIPLSHAPESEGMENTATION_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::segmentation::shapeToLabel3dImg (const ipsdk::shape::segmentation::Shape3dCollConstPtr &pInLabelsShape3d)
 wrapper function for algorithm allowing to create a label 3d image from a collection of shape More...
 
IPSDKIPLSHAPESEGMENTATION_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::segmentation::shapeToLabel3dImg (const ipsdk::shape::segmentation::PlanIndexedShape3dCollConstPtr &pInPILabelsShape3d)
 wrapper function for algorithm allowing to create a label 3d image from a collection of shape More...
 
IPSDKIPLSHAPESEGMENTATION_API void ipsdk::imaproc::shape::segmentation::shapeToLabel3dImg (const ipsdk::shape::segmentation::Shape3dCollConstPtr &pInLabelsShape3d, const ipsdk::image::ImagePtr &pOutLabelImg3d)
 wrapper function for algorithm allowing to create a label 3d image from a collection of shape More...
 
IPSDKIPLSHAPESEGMENTATION_API void ipsdk::imaproc::shape::segmentation::shapeToLabel3dImg (const ipsdk::shape::segmentation::PlanIndexedShape3dCollConstPtr &pInPILabelsShape3d, const ipsdk::image::ImagePtr &pOutLabelImg3d)
 wrapper function for algorithm allowing to create a label 3d image from a collection of shape More...
 

Detailed Description

algorithm allowing to create a label 3d image from a collection of shape

This algorithm allows to re-create a label image (Connected Component 3d) from a shape 3d image. Shape intersection with image rows and plans are set with respect to shape label.

Note
if some shape intersect, intersection pixels are set to highest label value.

An example of shape to label image algorithm is illustrated in 2d case : see Shape to label 2d image.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InPILabelsShape3d [Input] Plan indexed collection of shape 3d associated to labels X
ipsdk::imaproc::attr::OutLabelImg3d [Output] label image 3d for processing operation customOutput (_pOutLabelImg3d, outputShapeToLabel(_pInPILabelsShape3d))

Global Rule description

Global rule description for algorithm :
ipsdk::processor::none ()

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho
import PyIPSDK.IPSDKIPLShapeSegmentation as shapesegmentation

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath,
PyIPSDK.eTiffDirectoryMode.eTDM_Volume,
PyIPSDK.eTiffBufferMode.eTBM_Binary)
# connected components analysis
inLabelImg3d = advmorpho.connectedComponent3dImg(inImg)
# label contour extraction computation
outShape3dColl = shapesegmentation.labelShapeExtraction3d(inLabelImg3d)
# write extracted shapes to output label image
outLabelImg = shapesegmentation.shapeToLabel3dImg(outShape3dColl);

Example of C++ code :

Example informations

Associated library

IPSDKIPLShapeSegmentation

Header file

Code Example

// opening input image
ImagePtr pInBinImg3d = loadTiffImageFile(inputBinImgPath,
eTiffDirectoryMode::eTDM_Volume,
eTiffBufferMode::eTBM_Binary);
// connected components analysis
ImagePtr pInLabelImg3d = connectedComponent3dImg(pInBinImg3d);
// extract contours from connected component (label) image
Shape3dCollPtr pShape3dColl = labelShapeExtraction3d(pInLabelImg3d);
// write extracted shapes to output label image
ImagePtr pOutLabelImg = shapeToLabel3dImg(pShape3dColl);
See also
ShapeToLabel3dImgLvl1
ShapeToLabel3dImgLvl2
ShapeToLabel3dImgLvl3

Function Documentation

◆ shapeToLabel3dImg() [1/4]

IPSDKIPLSHAPESEGMENTATION_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::segmentation::shapeToLabel3dImg ( const ipsdk::shape::segmentation::Shape3dCollConstPtr pInLabelsShape3d)

wrapper function for algorithm allowing to create a label 3d image from a collection of shape

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeToLabel3dImg() [2/4]

IPSDKIPLSHAPESEGMENTATION_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::segmentation::shapeToLabel3dImg ( const ipsdk::shape::segmentation::PlanIndexedShape3dCollConstPtr pInPILabelsShape3d)

wrapper function for algorithm allowing to create a label 3d image from a collection of shape

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeToLabel3dImg() [3/4]

IPSDKIPLSHAPESEGMENTATION_API void ipsdk::imaproc::shape::segmentation::shapeToLabel3dImg ( const ipsdk::shape::segmentation::Shape3dCollConstPtr pInLabelsShape3d,
const ipsdk::image::ImagePtr pOutLabelImg3d 
)

wrapper function for algorithm allowing to create a label 3d image from a collection of shape

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeToLabel3dImg() [4/4]

IPSDKIPLSHAPESEGMENTATION_API void ipsdk::imaproc::shape::segmentation::shapeToLabel3dImg ( const ipsdk::shape::segmentation::PlanIndexedShape3dCollConstPtr pInPILabelsShape3d,
const ipsdk::image::ImagePtr pOutLabelImg3d 
)

wrapper function for algorithm allowing to create a label 3d image from a collection of shape

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure