IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Shape 3d filtering algorithm. More...

IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const std::string &inFilterFormula)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const ipsdk::image::ImageConstPtr &pInGreyMsrImg, const std::string &inFilterFormula)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const std::string &inFilterFormula, const ipsdk::imaproc::attr::SurfaceExtractionSettingsConstPtr &pInOptExtractionSettings)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const ipsdk::image::ImageConstPtr &pInGreyMsrImg, const std::string &inFilterFormula, const ipsdk::imaproc::attr::SurfaceExtractionSettingsConstPtr &pInOptExtractionSettings)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const std::string &inFilterFormula, const ipsdk::shape::analysis::MeasureInfoSetConstPtr &pInOptMeasureInfoSet3d)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const ipsdk::image::ImageConstPtr &pInGreyMsrImg, const std::string &inFilterFormula, const ipsdk::shape::analysis::MeasureInfoSetConstPtr &pInOptMeasureInfoSet3d)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const std::string &inFilterFormula, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const ipsdk::image::ImageConstPtr &pInGreyMsrImg, const std::string &inFilterFormula, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const std::string &inFilterFormula, const ipsdk::imaproc::attr::SurfaceExtractionSettingsConstPtr &pInOptExtractionSettings, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const ipsdk::image::ImageConstPtr &pInGreyMsrImg, const std::string &inFilterFormula, const ipsdk::imaproc::attr::SurfaceExtractionSettingsConstPtr &pInOptExtractionSettings, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const std::string &inFilterFormula, const ipsdk::shape::analysis::MeasureInfoSetConstPtr &pInOptMeasureInfoSet3d, const ipsdk::eNeighborhood3dType &inOptNeighborhood3d, const ipsdk::imaproc::attr::eLabelReindexingPolicy &inOptLabelReindexingPolicy, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for Shape 3d filtering algorithm More...
 
IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg (const ipsdk::image::ImageConstPtr &pInBinLabImg, const ipsdk::image::ImageConstPtr &pInGreyMsrImg, const std::string &inFilterFormula, const ipsdk::shape::analysis::MeasureInfoSetConstPtr &pInOptMeasureInfoSet3d, const ipsdk::eNeighborhood3dType &inOptNeighborhood3d, const ipsdk::imaproc::attr::eLabelReindexingPolicy &inOptLabelReindexingPolicy, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for Shape 3d filtering algorithm More...
 

Detailed Description

Shape 3d filtering algorithm.

This algorithm allows to filter an input 3d binary or label image with respect to a shape analysis measure formula.

OutImg output image type is given by InBinLabImg3d input image type which can be a binary or a label 3d image.

This is a packaged algorithm which can be decomposed into the following steps :

Used InFilterFormula formula must be evaluated to a valid measure logic formula (see Logic Formula and Shape Analysis 3d). InGreyMsrImg3d is a grey level (or color) 3d image which can be used to compute intensity measurements.

Additional measures definition can be provided using InOptMeasureInfoSet3d attribute. This allows to create user custom parametred measures (such as histogram quantile which depends on a target quantile value).

Here is an example of shape 3d filtering operation where all small shapes are removed (used formula : $Volume3dMsr > 4000$)

shapeFiltering3dImg1.png

In this case input binary image (on the left) is filtered using a geometric criterion. Intermediate label (connected components) image and measurement results are displayed (on center) before final binary image result (on the right).

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::InGreyMsrImg3d [Input] grey image 3d used for intensity measurements X
ipsdk::imaproc::attr::InFilterFormula [Input] Logic measure formula used for shape analysis filtering stage X
ipsdk::imaproc::attr::InOptMeasureInfoSet3d [Input Optional] shape analysis 3d measure information set X
ipsdk::imaproc::attr::InOptNeighborhood3d [Input optional] neighborhood 3d type for operation X
ipsdk::imaproc::attr::InOptLabelReindexingPolicy [Input Optional] used label reindexing policy X
ipsdk::imaproc::attr::InOptSurfaceExtractionSettings [Input Optional] Settings used for surfaces extraction X
ipsdk::imaproc::attr::OutImg [Output] image for processing operation duplicateInOut (_pOutImg, _pInBinLabImg3d)

Global Rule description

Global rule description for algorithm :
(ipsdk::imaproc::matchSize (eMatchImageSizeType::eMIST_XYZT,_pInBinLabImg3d,_pInGreyMsrImg3d)) && 
(ipsdk::imaproc::matchSizeAndType (_pInBinLabImg3d,_pOutImg))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLShapeAnalysis as shapeanalysis

Code Example

# opening binary input image
inBinImg = PyIPSDK.loadTiffImageFile(inputBinImgPath)
# shape filtering computation
outImg1 = shapeanalysis.shapeFiltering3dImg(inBinImg, "Volume3dMsr > 8000")
# opening grey level input image
inGreyImg = PyIPSDK.loadTiffImageFile(inputGreyImgPath)
# process of shape filtering with custom measure parameters
measureInfoSet = PyIPSDK.createMeasureInfoSet3d()
PyIPSDK.createMeasureInfo(measureInfoSet, "MyQuantileMsr", "HistogramQuantileMsr", shapeanalysis.createHistogramQuantileMsrParamsBinWidth(1.0, 75.0))
outImg2 = shapeanalysis.shapeFiltering3dImg(inBinImg, inGreyImg, "MyQuantileMsr > 100", measureInfoSet)

Example of C++ code :

Example informations

Associated library

IPSDKIPLShapeAnalysis

Header file

Code Example

// opening binary input image
ImagePtr pInBinImg3d = loadTiffImageFile(inputBinImgPath);
// process of shape filtering in simple case
const std::string formulaStr1 = "Volume3dMsr > 8000";
ImagePtr pOutImg1 = shapeFiltering3dImg(pInBinImg3d, formulaStr1);
// opening grey level input image
ImagePtr pInGreyImg3d = loadTiffImageFile(inputGreyImgPath);
// process of shape filtering with custom measure parameters
MeasureInfoSetPtr pMeasureInfoSet = MeasureInfoSet::create3dInstance();
createMeasureInfo(pMeasureInfoSet, "MyQuantileMsr", "HistogramQuantileMsr", createHistogramQuantileMsrParamsBinWidth(1.0, 75.0));
const std::string formulaStr2 = "MyQuantileMsr > 100";
ImagePtr pOutImg2 = shapeFiltering3dImg(pInBinImg3d, pInGreyImg3d, formulaStr2, pMeasureInfoSet);
See also
ShapeFiltering3dImgLvl1
ShapeFiltering3dImgLvl2

Function Documentation

◆ shapeFiltering3dImg() [1/12]

IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const std::string &  inFilterFormula 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [2/12]

IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const ipsdk::image::ImageConstPtr pInGreyMsrImg,
const std::string &  inFilterFormula 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [3/12]

IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const std::string &  inFilterFormula,
const ipsdk::imaproc::attr::SurfaceExtractionSettingsConstPtr pInOptExtractionSettings 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [4/12]

IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const ipsdk::image::ImageConstPtr pInGreyMsrImg,
const std::string &  inFilterFormula,
const ipsdk::imaproc::attr::SurfaceExtractionSettingsConstPtr pInOptExtractionSettings 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [5/12]

IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const std::string &  inFilterFormula,
const ipsdk::shape::analysis::MeasureInfoSetConstPtr pInOptMeasureInfoSet3d 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [6/12]

IPSDKIPLSHAPEANALYSIS_API ipsdk::image::ImagePtr ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const ipsdk::image::ImageConstPtr pInGreyMsrImg,
const std::string &  inFilterFormula,
const ipsdk::shape::analysis::MeasureInfoSetConstPtr pInOptMeasureInfoSet3d 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [7/12]

IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const std::string &  inFilterFormula,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [8/12]

IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const ipsdk::image::ImageConstPtr pInGreyMsrImg,
const std::string &  inFilterFormula,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [9/12]

IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const std::string &  inFilterFormula,
const ipsdk::imaproc::attr::SurfaceExtractionSettingsConstPtr pInOptExtractionSettings,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [10/12]

IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const ipsdk::image::ImageConstPtr pInGreyMsrImg,
const std::string &  inFilterFormula,
const ipsdk::imaproc::attr::SurfaceExtractionSettingsConstPtr pInOptExtractionSettings,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [11/12]

IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const std::string &  inFilterFormula,
const ipsdk::shape::analysis::MeasureInfoSetConstPtr pInOptMeasureInfoSet3d,
const ipsdk::eNeighborhood3dType inOptNeighborhood3d,
const ipsdk::imaproc::attr::eLabelReindexingPolicy inOptLabelReindexingPolicy,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ shapeFiltering3dImg() [12/12]

IPSDKIPLSHAPEANALYSIS_API void ipsdk::imaproc::shape::analysis::shapeFiltering3dImg ( const ipsdk::image::ImageConstPtr pInBinLabImg,
const ipsdk::image::ImageConstPtr pInGreyMsrImg,
const std::string &  inFilterFormula,
const ipsdk::shape::analysis::MeasureInfoSetConstPtr pInOptMeasureInfoSet3d,
const ipsdk::eNeighborhood3dType inOptNeighborhood3d,
const ipsdk::imaproc::attr::eLabelReindexingPolicy inOptLabelReindexingPolicy,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for Shape 3d filtering algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure