IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
Histogram measurement 3d
HistogramDatahistogramMsr3d (inImg)
HistogramDatahistogramMsr3d (inImg,histoPrms)

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.

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

Header file

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

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);