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 :
- for the whole grey level 3d volume,
- for each channel of a color volume,
- for each frame in a 3d sequence,
- for each channel of each volume of a 3d sequence.
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
inImg = PyIPSDK.loadTiffImageFile(inputImgPath, PyIPSDK.eTiffDirectoryMode.eTDM_Volume)
histogramMsrParams = PyIPSDK.createHistoMsrParamsWithBinWidth(0, 255, 2)
histogramMs3drResult = glbmsr.histogramMsr3d(inImg)
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
ImagePtr pInImg_multiSlice =
loadTiffImageFile(inImgPath_multiSlice, eTiffDirectoryMode::eTDM_Volume);
PlanIndexedHistogramDataPtr pHistogram_multiSlice = multiSlice_histogramMsr3d(pInImg_multiSlice);