IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

generic seeded distance map transform of a 3d input binary image according to a 3d seeded image More...

IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::image::ImagePtr ipsdk::imaproc::advmorpho::genericSeededDistanceMap3dImg (const ipsdk::image::ImageConstPtr &pInBinImg3d, const ipsdk::image::ImageConstPtr &pInBinSeedImg3d, const ipsdk::imaproc::attr::DistWeight3dConstPtr &pInDistWeight3d)
 wrapper function for generic seeded distance map transform of a 3d input binary image according to a 3d seeded image More...
 
IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::genericSeededDistanceMap3dImg (const ipsdk::image::ImageConstPtr &pInBinImg3d, const ipsdk::image::ImageConstPtr &pInBinSeedImg3d, const ipsdk::imaproc::attr::DistWeight3dConstPtr &pInDistWeight3d, const ipsdk::image::ImagePtr &pOutDistImg)
 wrapper function for generic seeded distance map transform of a 3d input binary image according to a 3d seeded image More...
 
IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::image::ImagePtr ipsdk::imaproc::advmorpho::genericSeededDistanceMap3dImg (const ipsdk::image::ImageConstPtr &pInBinImg3d, const ipsdk::image::ImageConstPtr &pInBinSeedImg3d, const ipsdk::imaproc::attr::DistWeight3dConstPtr &pInDistWeight3d, const ipsdk::ipReal32 maxDistanc)
 wrapper function for generic seeded distance map transform of a 3d input binary image according to a 3d seeded image constrained to a maximum distance propagation More...
 
IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::genericSeededDistanceMap3dImg (const ipsdk::image::ImageConstPtr &pInBinImg3d, const ipsdk::image::ImageConstPtr &pInBinSeedImg3d, const ipsdk::imaproc::attr::DistWeight3dConstPtr &pInDistWeight3d, const ipsdk::ipReal32 maxDistance, const ipsdk::image::ImagePtr &pOutDistImg)
 wrapper function for generic seeded distance map transform of a 3d input binary image according to a 3d seeded image constrained to a maximum distance propagation More...
 

Detailed Description

generic seeded distance map transform of a 3d input binary image according to a 3d seeded image

3d generic seeded distance map algorithm is the 3d extension of Generic Seeded Distance Map 2d. It allows to compute the distance to the closest seeded voxel in a region for each voxel of this region, according to given weights stored in a ipsdk::imaproc::attr::DistWeight3d attribute. The region is defined by a binary volume with voxel intensities set to 1. The seeded voxels are defined by a seeded volume with voxel intensities set to 1. If the parameter $ maxDistance $ is provided, the propagation is constrained so that it stops when the distance is higher than the $ maxDistance $ value.

The resulting image buffer type must be one of the following :

See Generic Seeded Distance Map 2d for more details.

Here is an example of a 3d seeded distance map computation applied to a binary input image with a real result image with each weighting coefficients set to 1 :

genericSeededDistanceMap3dImg.png
See also
Generic Seeded Distance Map 2d

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InBinImg3d [Input] binary 3d image for processing operation X
ipsdk::imaproc::attr::InBinSeedImg3d [Input] 3d seeded binary image X
ipsdk::imaproc::attr::InDistWeight3d [Input] Weighting coefficients for 3d distance calculation X
ipsdk::imaproc::attr::InOptMaxDistance [Input Optional] Maximum distance authorized for the propagation (a value of 0 means no distance restriction) X
ipsdk::imaproc::attr::OutDistImg [Output] distance map image ipsdk::imaproc::duplicateInOut (_pOutDistImg, _pInBinImg3d, ipsdk::image::eImageBufferType::eIBT_Real32)

Global Rule description

Global rule description for algorithm :
(ipsdk::imaproc::matchSize (_pInBinImg3d,_pOutDistImg)) && 
(ipsdk::imaproc::matchSize (_pInBinSeedImg3d,_pOutDistImg))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
inSeedsImg = PyIPSDK.loadTiffImageFile(inputSeedsImgPath)
# setting of used distance weights
inDistWeight3d = PyIPSDK.createDistWeight3d(1, 1, 2, math.sqrt(2), math.sqrt(5), math.sqrt(5), math.sqrt(6))
# generic seeded distance map 3d computation
outDistImg = advmorpho.genericSeededDistanceMap3dImg(inImg, inSeedsImg, inDistWeight3d)

Example of C++ code :

Example informations

Associated library

IPSDKIPLAdvancedMorphology

Header file

Code Example

// opening input image
ImagePtr pInBinImg = loadTiffImageFile(inputImgPath);
// opening seed input image
ImagePtr pInSeedImg = loadTiffImageFile(inputSeedImgPath);
// Distance weighting coefficients
DistWeight3dPtr pDistWeight3d = createDistWeight3d(xWeight, yWeight, zWeight, xyWeight, xzWeight, yzWeight, xyzWeight);
// define output image geometry
ImageGeometryPtr pDistGeometry = geometry3d(outputImageBufferType,
pInBinImg->getSizeX(),
pInBinImg->getSizeY(),
pInBinImg->getSizeZ());
// creation of output image
boost::shared_ptr<MemoryImage> pOutDistImg(boost::make_shared<MemoryImage>());
pOutDistImg->init(*pDistGeometry);
// compute distance map on input image
genericSeededDistanceMap3dImg(pInBinImg, pInSeedImg, pDistWeight3d, pOutDistImg);
See also
GenericSeededDistanceMap3dImgLvl1
GenericSeededDistanceMap3dImgLvl2

Function Documentation

◆ genericSeededDistanceMap3dImg() [1/4]

IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::image::ImagePtr ipsdk::imaproc::advmorpho::genericSeededDistanceMap3dImg ( const ipsdk::image::ImageConstPtr pInBinImg3d,
const ipsdk::image::ImageConstPtr pInBinSeedImg3d,
const ipsdk::imaproc::attr::DistWeight3dConstPtr pInDistWeight3d 
)

wrapper function for generic seeded distance map transform of a 3d input binary image according to a 3d seeded image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ genericSeededDistanceMap3dImg() [2/4]

IPSDKIPLADVANCEDMORPHOLOGY_API ipsdk::image::ImagePtr ipsdk::imaproc::advmorpho::genericSeededDistanceMap3dImg ( const ipsdk::image::ImageConstPtr pInBinImg3d,
const ipsdk::image::ImageConstPtr pInBinSeedImg3d,
const ipsdk::imaproc::attr::DistWeight3dConstPtr pInDistWeight3d,
const ipsdk::ipReal32  maxDistanc 
)

wrapper function for generic seeded distance map transform of a 3d input binary image according to a 3d seeded image constrained to a maximum distance propagation

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ genericSeededDistanceMap3dImg() [3/4]

IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::genericSeededDistanceMap3dImg ( const ipsdk::image::ImageConstPtr pInBinImg3d,
const ipsdk::image::ImageConstPtr pInBinSeedImg3d,
const ipsdk::imaproc::attr::DistWeight3dConstPtr pInDistWeight3d,
const ipsdk::image::ImagePtr pOutDistImg 
)

wrapper function for generic seeded distance map transform of a 3d input binary image according to a 3d seeded image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ genericSeededDistanceMap3dImg() [4/4]

IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::genericSeededDistanceMap3dImg ( const ipsdk::image::ImageConstPtr pInBinImg3d,
const ipsdk::image::ImageConstPtr pInBinSeedImg3d,
const ipsdk::imaproc::attr::DistWeight3dConstPtr pInDistWeight3d,
const ipsdk::ipReal32  maxDistance,
const ipsdk::image::ImagePtr pOutDistImg 
)

wrapper function for generic seeded distance map transform of a 3d input binary image according to a 3d seeded image constrained to a maximum distance propagation

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure