IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Z ProjectionImg algorithmSee full documentation
imagezProjectionImg (inImg,eInProjStatType)

Detailed Description

measure of common statistics indicators in the image 3d (mean, max, etc.) computed along Z axis

Depending on the type of indicator specified by the user, (see ipsdk::imaproc::attr::eProjStatType), values of the output image are given by one of the following formula:

with sizeZ the number of images in the image 3d

Output image must have same dimensions in x and y that images of input 3d image

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLGlobalMeasure as glbmsr

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath, PyIPSDK.eTiffDirectoryMode.eTDM_Volume)
# computation of Z projection image
outImg = glbmsr.zProjectionImg(inImg, PyIPSDK.eProjStatType.ePST_Mean)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLGlobalMeasure/Processor/ZProjectionImg/ZProjectionImg.h>

Code Example

// compute minimum Z projection for input image
// --------------------------------------------
ImagePtr pRetOutImgMin = glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Min);
boost::shared_ptr<MemoryImage> pOutImgMin(boost::make_shared<MemoryImage>());
pOutImgMin->init(*pOutputImageGeometry);
glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Min, pOutImgMin);
ImagePtr pOutRefImgMin = computeZProjectionMinImg<inType, outType>(pInImg);
// compute maximum Z projection for input image
// --------------------------------------------
ImagePtr pRetOutImgMax = glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Max);
boost::shared_ptr<MemoryImage> pOutImgMax(boost::make_shared<MemoryImage>());
pOutImgMax->init(*pOutputImageGeometry);
glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Max, pOutImgMax);
ImagePtr pOutRefImgMax = computeZProjectionMaxImg<inType, outType>(pInImg);
// compute sum Z projection for input image
// --------------------------------------------
ImagePtr pRetOutImgSum = glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Sum);
boost::shared_ptr<MemoryImage> pOutImgSum(boost::make_shared<MemoryImage>());
pOutImgSum->init(*pOutputImageGeometry);
glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Sum, pOutImgSum);
ImagePtr pOutRefImgSum = computeZProjectionSumImg<inType, outType>(pInImg);
// compute mean Z projection for input image
// --------------------------------------------
ImagePtr pRetOutImgMean = glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Mean);
boost::shared_ptr<MemoryImage> pOutImgMean(boost::make_shared<MemoryImage>());
pOutImgMean->init(*pOutputImageGeometry);
glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Mean, pOutImgMean);
ImagePtr pOutRefImgMean = computeZProjectionMeanImg<inType, outType>(pInImg);
// compute variance Z projection for input image
// --------------------------------------------
ImagePtr pRetOutImgVar = glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Variance);
boost::shared_ptr<MemoryImage> pOutImgVar(boost::make_shared<MemoryImage>());
pOutImgVar->init(*pOutputImageGeometry);
glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Variance, pOutImgVar);
ImagePtr pOutRefImgVar = computeZProjectionVarImg<inType, outType>(pInImg);
// compute standard deviation Z projection for input image
// --------------------------------------------
ImagePtr pRetOutImgStdDev = glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_StdDev);
boost::shared_ptr<MemoryImage> pOutImgStdDev(boost::make_shared<MemoryImage>());
pOutImgStdDev->init(*pOutputImageGeometry);
glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_StdDev, pOutImgStdDev);
ImagePtr pOutRefImgStdDev = computeZProjectionStdDevImg<inType, outType>(pInImg);
// compute median Z projection for input image
// --------------------------------------------
ImagePtr pRetOutImgMedian = glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Median);
boost::shared_ptr<MemoryImage> pOutImgMedian(boost::make_shared<MemoryImage>());
pOutImgMedian->init(*pOutputImageGeometry);
glbmsr::zProjectionImg(pInImg, eProjStatType::ePST_Median, pOutImgMedian);
ImagePtr pOutRefImgMedian = computeZProjectionMedianImg<inType, outType>(pInImg);