IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Z Stack Focus MaximumSee full documentation
imagezStackFocusMaximumImg (inImg)
imagezStackFocusMaximumImg (inImg,inOptContrastRadius)
imagezStackFocusMaximumImg (inImg,inOptContrastRadius,inOptMeanSmoothingValue,inOptZoomFactor)
outImg,outLabelImgzStackFocusMaximumWithMapImg (inImg)
outImg,outLabelImgzStackFocusMaximumWithMapImg (inImg,inOptContrastRadius)
outImg,outLabelImgzStackFocusMaximumWithMapImg (inImg,inOptContrastRadius,inOptMeanSmoothingValue,inOptZoomFactor)

Detailed Description

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 :

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.

ZFocusMaximum.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# Optional parameters
smoothing = 1
zoomFactor = 0.25
contrastRay = 1
# Z stack focus maximum
outImg = filter.zStackFocusMaximumWithMapImg(inImg, contrastRay, smoothing, zoomFactor)
# Or Z stack focus maximum with depth map
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

// opening input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// define optionals parameters
ipUInt32 meanSmoothingValue = 1;
ipReal32 zoomFactor = 0.25;
ipUInt16 contrastRadius = 1;
// compute Z stack focus maximum without depth map on input image
ImagePtr pOutImgAlone = zStackFocusMaximumImg(pInImg, contrastRadius, meanSmoothingValue, zoomFactor);
// compute Z stack focus maximum with depth map on input image
ZStackFocusMaximumResult zStackFocusMaximumResult = zStackFocusMaximumWithMapImg(pInImg, contrastRadius, meanSmoothingValue, zoomFactor);
ImagePtr pOutImg = zStackFocusMaximumResult._pOutImg;
ImagePtr pOutLabelImg = zStackFocusMaximumResult._pOutLabelImg;