DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

MeasurementToHistogram

Creats a histogram for a measurement

SYNOPSIS

#include "dip_measurement.h" #include "dip_distribution.h"

dip_Error dip_MeasurementToHistogram ( histogram, measurement, featureID, binSize, maximum, minimum, percentage, addMeasurement )

DATA TYPES

integer

FUNCTION

This function creates a (possibly multi-dimensional) histogram with the measurement results of one feature. If addMeasurement is DIP_TRUE, new data points are added to the existing histogram, and binSize, maximum, minimum and percentage input arguments are ignored. Otherwise, histogram is destroyed and recreated according to the chosen values for binSize, maximum, minimum and percentage. If percentage is DIP_TRUE, maximum and minimum represent a percentage of the data range, otherwise they represent absolute values. If maximum or minimum are NULL, the maximum or minimum of the data is used.

ARGUMENTS

Data typeNameDescription
dip_DistributionhistogramOutput histogram
dip_MeasurementmeasurementMeasurement data
dip_IntegerArrayfeatureIDList of feature IDs to use
dip_FloatArraybinSizeSize of the histogram bins
dip_FloatArraymaximumMaximum value represented in the histogram
dip_FloatArrayminimumMinimum value represented in the histogram
dip_BooleanpercentageWhether maximum and minimum are percentages
dip_BooleanaddMeasurementWhether to add data to histogram or create a new one

SEE ALSO

Measure, MeasurementToImage, ObjectToMeasurement