image = | zStackFocusMaximumImg (inImg) |
image = | zStackFocusMaximumImg (inImg,inOptContrastRadius) |
image = | zStackFocusMaximumImg (inImg,inOptContrastRadius,inOptMeanSmoothingValue,inOptZoomFactor) |
outImg,outLabelImg = | zStackFocusMaximumWithMapImg (inImg) |
outImg,outLabelImg = | zStackFocusMaximumWithMapImg (inImg,inOptContrastRadius) |
outImg,outLabelImg = | zStackFocusMaximumWithMapImg (inImg,inOptContrastRadius,inOptMeanSmoothingValue,inOptZoomFactor) |
function for computing a contrasted image by maximum along the Z axis
The Z stack focus by maximum computes the contrast of pixels for each plan of a 3D image, then keep pixels with the highest contrast on a 2D output image.
The parameters of this filter are :
is the radius of the structuring element used to compute the contrast. With a low value for
we are more sensitive to small details but also to noise. The default value is 10.
defines the way the different plans are combined. If the value is too low the transitions between plans won't be smooth, and if the value is too high it will results in a blurred image. The default value is 1.
is the factor by which the image is resized before processing. A low value allows us to save time during the process. The lower this value is, the more we are sensitive to macro elements in the image, instead of small details. The defaut value is 1.
The algorithm can also return an optional depth map image. This labeled image shows which plan had the highest contrast, for each pixel of the image.
Here is an example with default parameters.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
smoothing = 1
zoomFactor = 0.25
contrastRay = 1
outImg = filter.zStackFocusMaximumWithMapImg(inImg, contrastRay, smoothing, zoomFactor)
outImg, labelImg = filter.zStackFocusMaximumWithMapImg(inImg, contrastRay, smoothing, zoomFactor)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLFiltering/Processor/ZStackFocusMaximumImg/ZStackFocusMaximumImg.h>
Code Example
ipUInt32 meanSmoothingValue = 1;
ipReal32 zoomFactor = 0.25;
ipUInt16 contrastRadius = 1;
ImagePtr pOutImgAlone = zStackFocusMaximumImg(pInImg, contrastRadius, meanSmoothingValue, zoomFactor);
ZStackFocusMaximumResult zStackFocusMaximumResult = zStackFocusMaximumWithMapImg(pInImg, contrastRadius, meanSmoothingValue, zoomFactor);
ImagePtr pOutImg = zStackFocusMaximumResult._pOutImg;
ImagePtr pOutLabelImg = zStackFocusMaximumResult._pOutLabelImg;