IPSDK 4.1
IPSDK : Image Processing Software Development Kit
Sequence projection measurement
imageseqProjectionImg (inImg,eInProjStatType)

Detailed Description

measure of common statistics indicators in the image sequence (mean, max, etc.) computed along the sequence

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 sizeT the number of images in the input sequence

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

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_Temporal)
# computation of sequence projection image
outImg = glbmsr.seqProjectionImg(inImg, PyIPSDK.eProjStatType.ePST_Mean)

Example of C++ code :

Example informations

Header file

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

Code Example

// compute minimum sequence projection for input image
// --------------------------------------------
ImagePtr pRetOutImgMin = glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Min);
boost::shared_ptr<MemoryImage> pOutImgMin(boost::make_shared<MemoryImage>());
pOutImgMin->init(*pOutputImageGeometry);
glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Min, pOutImgMin);
ImagePtr pOutRefImgMin = computeSeqProjectionMinImg<inType, outType>(pInImg);
// compute maximum sequence projection for input image
// --------------------------------------------
ImagePtr pRetOutImgMax = glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Max);
boost::shared_ptr<MemoryImage> pOutImgMax(boost::make_shared<MemoryImage>());
pOutImgMax->init(*pOutputImageGeometry);
glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Max, pOutImgMax);
ImagePtr pOutRefImgMax = computeSeqProjectionMaxImg<inType, outType>(pInImg);
// compute sum sequence projection for input image
// --------------------------------------------
ImagePtr pRetOutImgSum = glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Sum);
boost::shared_ptr<MemoryImage> pOutImgSum(boost::make_shared<MemoryImage>());
pOutImgSum->init(*pOutputImageGeometry);
glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Sum, pOutImgSum);
ImagePtr pOutRefImgSum = computeSeqProjectionSumImg<inType, outType>(pInImg);
// compute mean sequence projection for input image
// --------------------------------------------
ImagePtr pRetOutImgMean = glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Mean);
boost::shared_ptr<MemoryImage> pOutImgMean(boost::make_shared<MemoryImage>());
pOutImgMean->init(*pOutputImageGeometry);
glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Mean, pOutImgMean);
ImagePtr pOutRefImgMean = computeSeqProjectionMeanImg<inType, outType>(pInImg);
// compute variance sequence projection for input image
// --------------------------------------------
ImagePtr pRetOutImgVar = glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Variance);
boost::shared_ptr<MemoryImage> pOutImgVar(boost::make_shared<MemoryImage>());
pOutImgVar->init(*pOutputImageGeometry);
glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Variance, pOutImgVar);
ImagePtr pOutRefImgVar = computeSeqProjectionVarImg<inType, outType>(pInImg);
// compute standard deviation sequence projection for input image
// --------------------------------------------
ImagePtr pRetOutImgStdDev = glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_StdDev);
boost::shared_ptr<MemoryImage> pOutImgStdDev(boost::make_shared<MemoryImage>());
pOutImgStdDev->init(*pOutputImageGeometry);
glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_StdDev, pOutImgStdDev);
ImagePtr pOutRefImgStdDev = computeSeqProjectionStdDevImg<inType, outType>(pInImg);
// compute median sequence projection for input image
// --------------------------------------------
ImagePtr pRetOutImgMedian = glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Median);
boost::shared_ptr<MemoryImage> pOutImgMedian(boost::make_shared<MemoryImage>());
pOutImgMedian->init(*pOutputImageGeometry);
glbmsr::seqProjectionImg(pInImg, eProjStatType::ePST_Median, pOutImgMedian);
ImagePtr pOutRefImgMedian = computeSeqProjectionMedianImg<inType, outType>(pInImg);