IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

calculates the histogram for each 3d data of an input image More...

IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::HistogramDataPtr ipsdk::imaproc::glbmsr::histogramMsr3d (const image::ImageConstPtr &pInImg)
 wrapper function for calculates the histogram for each 3d data of an input image More...
 
IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::HistogramDataPtr ipsdk::imaproc::glbmsr::histogramMsr3d (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistoMsrParamsConstPtr &pHistoPrms)
 wrapper function for calculates the histogram for each 3d data of an input image More...
 
IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::PlanIndexedHistogramDataPtr ipsdk::imaproc::glbmsr::multiSlice_histogramMsr3d (const image::ImageConstPtr &pInImg)
 wrapper function for calculates the histogram for each 3d data of an input image More...
 
IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::PlanIndexedHistogramDataPtr ipsdk::imaproc::glbmsr::multiSlice_histogramMsr3d (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HistoMsrParamsConstPtr &pHistoPrms)
 wrapper function for calculates the histogram for each 3d data of an input image More...
 

Detailed Description

calculates the histogram for each 3d data of an input image

This algorithm computes the histogram for each 3d data of the input image.

In other words, the results will be computed :

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

See Histogram measurement 2d for a description of the histogram measurement.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg3d [Input] 3d image for operation X
ipsdk::imaproc::attr::InOptHistoMsrParams [Input Optional] histogram measure parameters X
ipsdk::imaproc::attr::OutPIHistogram [Output] Plan indexed collection of histogram properties ipsdk::imaproc::fromImageButVolume (_pOutPIHistogram, _pInImg3d)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchImagePlans (_pOutPIHistogram,_pInImg3d,eImagePlansMatchPolicy::eIPMP_CT) && 
(ipsdk::processor::ifIsSet (_pInOptHistoMsrParams,ipsdk::imaproc::matchImageRange<ipsdk::imaproc::attr::HistoMsrParams::Min>(_pInImg3d,_pInOptHistoMsrParams) && ipsdk::imaproc::matchImageRange<ipsdk::imaproc::attr::HistoMsrParams::Max>(_pInImg3d,_pInOptHistoMsrParams) && ipsdk::processor::isGreater<ipsdk::imaproc::attr::HistoMsrParams::BinWidth>(_pInOptHistoMsrParams,0)))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLGlobalMeasure as glbmsr

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath, PyIPSDK.eTiffDirectoryMode.eTDM_Volume)
# definition of histogram measure parameters (optional step)
histogramMsrParams = PyIPSDK.createHistoMsrParamsWithBinWidth(0, 255, 2)
# statistics measurement
histogramMs3drResult = glbmsr.histogramMsr3d(inImg)#, histogramMsrParams)
# retrieve measurement results
frequencies = histogramMs3drResult.frequencies
print("Population for bin [100, 101] is " + str(frequencies[50]))

Example of C++ code :

Example informations

Associated library

IPSDKIPLGlobalMeasure

Header file

Code Example

// -------------------------- Calculation on a mono-slice grey level image -------------------------- //
// Load the input image
ImagePtr pInImg = loadTiffImageFile(inImgPath, eTiffDirectoryMode::eTDM_Volume);
// Compute statistics on input image
HistogramDataPtr pHistogram = histogramMsr3d(pInImg);
// -------------------------- Calculation on a mono-slice grey level image -------------------------- //
// Load the input image
ImagePtr pInImg_multiSlice = loadTiffImageFile(inImgPath_multiSlice, eTiffDirectoryMode::eTDM_Volume);
// Compute statistics on input image
PlanIndexedHistogramDataPtr pHistogram_multiSlice = multiSlice_histogramMsr3d(pInImg_multiSlice);
See also
HistogramMsr3dLvl1
HistogramMsr3dLvl2
HistogramMsr3dLvl3

Function Documentation

◆ histogramMsr3d() [1/2]

IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::HistogramDataPtr ipsdk::imaproc::glbmsr::histogramMsr3d ( const image::ImageConstPtr pInImg)

wrapper function for calculates the histogram for each 3d data of an input image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ multiSlice_histogramMsr3d() [1/2]

IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::PlanIndexedHistogramDataPtr ipsdk::imaproc::glbmsr::multiSlice_histogramMsr3d ( const image::ImageConstPtr pInImg)

wrapper function for calculates the histogram for each 3d data of an input image

Note
This wrapper can be used with multi slice input images to retrieve by slice results
Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ histogramMsr3d() [2/2]

IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::HistogramDataPtr ipsdk::imaproc::glbmsr::histogramMsr3d ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistoMsrParamsConstPtr pHistoPrms 
)

wrapper function for calculates the histogram for each 3d data of an input image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ multiSlice_histogramMsr3d() [2/2]

IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::PlanIndexedHistogramDataPtr ipsdk::imaproc::glbmsr::multiSlice_histogramMsr3d ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::HistoMsrParamsConstPtr pHistoPrms 
)

wrapper function for calculates the histogram for each 3d data of an input image

Note
This wrapper can be used with multi slice input images to retrieve by slice results
Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure