IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

extraction of local extrema (minima or maxima) in a 3d image More...

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::extractLocalExtrema3d (const image::ImageConstPtr &pInImg3d, const ipsdk::ipUInt32 inFeaturesDistX, const ipsdk::ipUInt32 inFeaturesDistY, const ipsdk::ipUInt32 inFeaturesDistZ)
 wrapper function for extraction of local extrema (minima or maxima) in a 3d image This wrapper must be used with single grey level input volumes (sizeC=sizeT=1) More...
 
IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::extractLocalExtrema3d (const image::ImageConstPtr &pInImg3d, const ipsdk::ipUInt32 inFeaturesDistX, const ipsdk::ipUInt32 inFeaturesDistY, const ipsdk::ipUInt32 inFeaturesDistZ, const ipsdk::imaproc::attr::LocalExtremaConfigConstPtr &localExtremaConfig)
 wrapper function for extraction of local extrema (minima or maxima) in a 3d image This wrapper must be used with single grey level input volumes (sizeC=sizeT=1) More...
 
IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_extractLocalExtrema3d (const image::ImageConstPtr &pInImg3d, const ipsdk::ipUInt32 inFeaturesDistX, const ipsdk::ipUInt32 inFeaturesDistY, const ipsdk::ipUInt32 inFeaturesDistZ)
 multi slices version of wrapper function for extraction of local extrema (minima or maxima) in a 3d image This wrapper can be used with multi slice input images More...
 
IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_extractLocalExtrema3d (const image::ImageConstPtr &pInImg3d, const ipsdk::ipUInt32 inFeaturesDistX, const ipsdk::ipUInt32 inFeaturesDistY, const ipsdk::ipUInt32 inFeaturesDistZ, const ipsdk::imaproc::attr::LocalExtremaConfigConstPtr &localExtremaConfig)
 multi slices version of wrapper function for extraction of local extrema (minima or maxima) in a 3d image This wrapper can be used with multi slice input images More...
 
IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_harrisCorner3d (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::ipUInt64 inNbTotPoints, const ipsdk::ipUInt32 inFeaturesDist)
 multi slices version of wrapper function for extracts the corners in a 3d image. This wrapper can be used with multi slice input images More...
 
IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_harrisCorner3d (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::ipReal32 inGradStdDev, const ipsdk::ipUInt64 inNbTotPoints, const ipsdk::ipUInt32 inFeaturesDist)
 multi slices version of wrapper function for extracts the corners in a 3d image. This wrapper can be used with multi slice input images More...
 
IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_harrisCorner3d (const ipsdk::image::ImageConstPtr &pInImg, const ipsdk::ipReal32 inGradStdDev, const attr::GaussianCoverageConstPtr &pInOptGradientGaussianCoverage, const ipsdk::imaproc::attr::CornerDetectionParamsConstPtr &pInCornerDetectionParams, const ipsdk::ipUInt64 inNbTotPoints, const ipsdk::ipReal64 inThreshold, const ipsdk::ipUInt32 inFeaturesDistX, const ipsdk::ipUInt32 inFeaturesDistY, const ipsdk::ipUInt32 inFeaturesDistZ)
 multi slices version of wrapper function for extracts the corners in a 3d image. This wrapper can be used with multi slice input images More...
 

Detailed Description

extraction of local extrema (minima or maxima) in a 3d image

This algorithm computes the local extrema (minimum or maximum, strict or not) for each 3d data of the input image.

In other words, the results will be computed :

Two wrappers can be called : the extractLocalExtrema3d wrapper is only used to compute the extrema extraction on a grey level 3d volume, whereas the multiSlice_extractLocalExtrema3d wrapper must be used for more complex data (sequence and/or color).

See Local Extrema Extraction 2d for more details about the algorithm parameters.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg3d [Input] 3d image for operation X
ipsdk::imaproc::attr::InFeaturesDistX [Input] distance between detected features along x axis (tchebychev distance) X
ipsdk::imaproc::attr::InFeaturesDistY [Input] distance between detected features along y axis (tchebychev distance) X
ipsdk::imaproc::attr::InFeaturesDistZ [Input] distance between detected features along z axis (tchebychev distance) X
ipsdk::imaproc::attr::InOptLocalExtremaConfig [Input Optional] Attribute for local extrema calculation configuration X
ipsdk::imaproc::attr::OutPIVoxels3d [Output] plan indexed collection of positions and intensities of 3d voxels ipsdk::imaproc::fromImageButVolume (_pOutPIVoxels3d, _pInImg3d)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchImagePlans (_pOutPIVoxels3d,_pInImg3d,eImagePlansMatchPolicy::eIPMP_CT)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFeatureDetection as fd

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# half size neighbourhood definition
halfSizeKnlX = 1
halfSizeKnlY = 1
halfSizeKnlZ = 1
# local extrema configuration definition
threshold = -30
nbTotPoints = 2000
localExtremaConfig = PyIPSDK.createLocalExtremaConfig(PyIPSDK.eLocalExtremumType.eLET_StrictMax, threshold, nbTotPoints)
# local extrema computation
outVoxels3d = fd.extractLocalExtrema3d(inImg, halfSizeKnlX, halfSizeKnlY, halfSizeKnlZ, localExtremaConfig)
# retrieve coordinates of maximum detected extrema
maxVoxel3d = PyIPSDK.toPyDict(outVoxels3d)['Coll'][0]
print("Maximum extrema value " + str(maxVoxel3d['Intensity'] ) + " found on coordinates x=" + str(maxVoxel3d['X'] ) + ", y=" + str(maxVoxel3d['Y'] ) + " and z=" + str(maxVoxel3d['Z'] ))

Example of C++ code :

Example informations

Associated library

IPSDKIPLFeatureDetection

Header file

Code Example

// ------------ Calculation on a mono-slice grey level image ------------ //
// Create the local extrema configuration instance, specifying the local extremum type,
// the threshold and the number of total points. All these parameters are optional
LocalExtremaConfigPtr pLocalExtremaConfig = createLocalExtremaConfig(localExtremumType, threshold, nbTotPoints);
// Define the image geometry
ImageGeometryPtr pInputImageGeometry = geometry3d(type, sizeX, sizeY, sizeZ);
// Load the input image
ImagePtr pInImg = loadRawImageFile(inImgFilePath, *pInputImageGeometry);
// Extrcat the local extrema, in a given neighbourhood
Voxels3dPtr pExtremaColl = extractLocalExtrema3d(pInImg, halfKnlSizeX, halfKnlSizeY, halfKnlSizeZ, pLocalExtremaConfig);
// Retrieve the extrema collection
const std::vector< boost::shared_ptr<Voxel3d> > extremaColl = pExtremaColl->getNodeColl<Voxels3d::Coll>();
const ipUInt64 nbPoints = extremaColl.size();
// ------------ Calculation on a multi-slice grey level image ------------ //
// Extrcat the local extrema, in a given neighbourhood
PlanIndexedVoxels3dPtr pExtremaColl_multiSlice = multiSlice_extractLocalExtrema3d(pInImg_multiSlice, halfKnlSizeX, halfKnlSizeY, halfKnlSizeZ, pLocalExtremaConfig);
// Retrieve the extrema collection for the frame 2, the channel 1
const std::vector< boost::shared_ptr<Voxel3d> > extremaColl_multiSlice = pExtremaColl_multiSlice->getValue(0, 1, 2).getNodeColl<Voxels3d::Coll>();
See also
ExtractLocalExtrema3dLvl1
ExtractLocalExtrema3dLvl2
ExtractLocalExtrema3dLvl3

Function Documentation

◆ extractLocalExtrema3d() [1/2]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::extractLocalExtrema3d ( const image::ImageConstPtr pInImg3d,
const ipsdk::ipUInt32  inFeaturesDistX,
const ipsdk::ipUInt32  inFeaturesDistY,
const ipsdk::ipUInt32  inFeaturesDistZ 
)

wrapper function for extraction of local extrema (minima or maxima) in a 3d image This wrapper must be used with single grey level input volumes (sizeC=sizeT=1)

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ multiSlice_extractLocalExtrema3d() [1/2]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_extractLocalExtrema3d ( const image::ImageConstPtr pInImg3d,
const ipsdk::ipUInt32  inFeaturesDistX,
const ipsdk::ipUInt32  inFeaturesDistY,
const ipsdk::ipUInt32  inFeaturesDistZ 
)

multi slices version of wrapper function for extraction of local extrema (minima or maxima) in a 3d image This wrapper can be used with multi slice input images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ multiSlice_harrisCorner3d() [1/3]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_harrisCorner3d ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::ipUInt64  inNbTotPoints,
const ipsdk::ipUInt32  inFeaturesDist 
)

multi slices version of wrapper function for extracts the corners in a 3d image. This wrapper can be used with multi slice input images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ extractLocalExtrema3d() [2/2]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::extractLocalExtrema3d ( const image::ImageConstPtr pInImg3d,
const ipsdk::ipUInt32  inFeaturesDistX,
const ipsdk::ipUInt32  inFeaturesDistY,
const ipsdk::ipUInt32  inFeaturesDistZ,
const ipsdk::imaproc::attr::LocalExtremaConfigConstPtr localExtremaConfig 
)

wrapper function for extraction of local extrema (minima or maxima) in a 3d image This wrapper must be used with single grey level input volumes (sizeC=sizeT=1)

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ multiSlice_extractLocalExtrema3d() [2/2]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_extractLocalExtrema3d ( const image::ImageConstPtr pInImg3d,
const ipsdk::ipUInt32  inFeaturesDistX,
const ipsdk::ipUInt32  inFeaturesDistY,
const ipsdk::ipUInt32  inFeaturesDistZ,
const ipsdk::imaproc::attr::LocalExtremaConfigConstPtr localExtremaConfig 
)

multi slices version of wrapper function for extraction of local extrema (minima or maxima) in a 3d image This wrapper can be used with multi slice input images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ multiSlice_harrisCorner3d() [2/3]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_harrisCorner3d ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::ipReal32  inGradStdDev,
const ipsdk::ipUInt64  inNbTotPoints,
const ipsdk::ipUInt32  inFeaturesDist 
)

multi slices version of wrapper function for extracts the corners in a 3d image. This wrapper can be used with multi slice input images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ multiSlice_harrisCorner3d() [3/3]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedVoxels3dPtr ipsdk::imaproc::fd::multiSlice_harrisCorner3d ( const ipsdk::image::ImageConstPtr pInImg,
const ipsdk::ipReal32  inGradStdDev,
const attr::GaussianCoverageConstPtr pInOptGradientGaussianCoverage,
const ipsdk::imaproc::attr::CornerDetectionParamsConstPtr pInCornerDetectionParams,
const ipsdk::ipUInt64  inNbTotPoints,
const ipsdk::ipReal64  inThreshold,
const ipsdk::ipUInt32  inFeaturesDistX,
const ipsdk::ipUInt32  inFeaturesDistY,
const ipsdk::ipUInt32  inFeaturesDistZ 
)

multi slices version of wrapper function for extracts the corners in a 3d image. This wrapper can be used with multi slice input images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure