Description

Returns the calibrated histogram values, according to the current Mode.

Property type

A Variant value.  

Syntax

object.Values([Index], [Channel])

The Values Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McHistogram.
IndexOptional. A Long value.

Optional bin index, -1 means return all bins.

ChannelOptional. A Long value.

Optional Channel index, -1 means return all channels.

Remarks

The Compute method is called automatically (on the parent IMcImage) whenever it is necessary. In order to compute the Histogram on another image than the parent, one has to call Compute explicitly.

When the spatial calibration is used (mchmApplySpatialCalibration), each bin count is scaled by multiplying it by the calibration pixel width and height.

When the intensity calibration is used (mchmApplyIntensityCalibration), the array is sorted in increasing intensity order (see BinXValues).

The property is exposed as a 2D array Variant ([NumberOfChannels][BinCount] in C, (BinCount,NumberOfChannels) in VB, that is each channel's histogram is the fastest moving dimension and is adjacent in memory) if Index=-1 and Channel=-1, a 1D array Variant representing either channel values (NumberOfChannels) if Channel=-1 or all values for 1 Channel (BinCount) if Index=-1, or a Variant containing a single value when both parameters are positive or null. All counts are reported as double precision floating point values.

Exceptions

The exception mceINVALIDARG (E_INVALIDARG) will be thrown if one of the parameters is invalid.