ImageDev

Histogram

This attribute manages measurements belonging to the Histogram category of native measurements.

All measurements available in the Histogram category are customizable with the following methods.

Syntax

Method Description
void setAutoAdjusted( bool autoAdjusted ) Enables or disables the automatic setting of the histogram parameters. If it equals false, the bin size and gray level ranges must be user defined.
bool isAutoAdjusted() Returns true if automatic mode for setting histogram parameters is enabled, false otherwise.
void setInterpolated( bool interpolated ) Enables or disables quantile interpolation.
bool isInterpolated() Returns true if quantile interpolation is enabled, false otherwise.
void setBinSize( float size ) Sets the histogram bin size. It must be strictly positive. It is ignored when the automatic mode is disabled.
float binSize() Returns the bin size of the histogram. This parameter is ignored is the automatic mode is disabled.
void setMinIntensity( float value ) Sets the minimum gray level value used to compute the histogram. This parameter is ignored if the automatic mode is disabled.
float minIntensity() Returns the minimum gray level value used to compute the histogram. This parameter is ignored if the automatic mode is disabled.
void setMaxIntensity( float value ) Sets the maximum gray level value used to compute the histogram. This parameter is ignored if the automatic mode is disabled.
float maxIntensity() Returns the maximum gray level value used to compute the histogram. This parameter is ignored if the automatic mode is disabled.

Histogram::Ptr histo = MeasurementAttributes::histogram();
histo->setAutoAdjusted( false );
bool valueAutoAdjusted = histo->isAutoAdjusted();
histo->setInterpolated( false );
bool valueInterpolated = histo->isInterpolated();
histo->setBinSize( 2 );
float valueBinSize = histo->binSize();
histo->setMinIntensity( 5 );
float valueMinValue = histo->minIntensity();
histo->setMaxIntensity( 200 );
float valueMaxValue = histo->maxIntensity();
        
Attributes Description
auto_adjusted Returns or sets the automatic mode for setting histogram parameters. If it equals false, the bin size and gray level ranges must be user defined.
interpolated Returns or sets the quantile interpolation mode.
bin_size Returns or sets the histogram bin size. It must be strictly positive. It is ignored when the automatic mode is disabled.
min_intensity Returns or sets the minimum gray level value used to compute the histogram. This parameter is ignored if the automatic mode is disabled.
max_intensity Returns or sets the maximum gray level value used to compute the histogram. This parameter is ignored if the automatic mode is disabled.

histogram = imagedev.MeasurementAttributes.histogram
histogram.auto_adjusted = True
is_adjusted = histogram.auto_adjusted
histogram.interpolated = True
is_interpolated = histogram.interpolated
histogram.min_intensity = 10.0
min_intensity_value = histogram.min_intensity
histogram.max_intensity = 51.0
max_intensity_value = histogram.max_intensity
histogram.bin_size = 1
bin_size_value = histogram.bin_size
        
Attributes Description
autoAdjusted Enables or disables the automatic setting of the histogram parameters. If it equals false, the bin size and gray level ranges must be user defined. True if automatic mode for setting histogram parameters is enabled, false otherwise.
interpolated Enables or disables quantile interpolation.
binSize Gets or sets the histogram bin size. It must be strictly positive. It is ignored when the automatic mode is disabled.
minIntensity Gets or sets the minimum gray level value used to compute the histogram. This parameter is ignored if the automatic mode is disabled.
maxIntensity Gets or sets the maximum gray level value used to compute the histogram. This parameter is ignored if the automatic mode is disabled.

Histogram histo = MeasurementAttributes.histogram();
histo.autoAdjusted = false;
auto valueAutoAdjusted = histo.autoAdjusted;
histo.interpolated = false;
auto valueInterpolated = histo.interpolated;
histo.binSize = 2;
auto valueBinSize = histo.binSize;
histo.minIntensity =5;
auto valueMinValue = histo.minIntensity;
histo.maxIntensity = 200;
auto valueMaxValue = histo.maxIntensity;