Core Optical, Inc.
HistogramProcessor GetHistogram Method Industrial Strength, Scientific Grade
Retrieves a Histogram object based on the specified source data and channel.

Namespace: PrecisionImage.HistogramProcessing
Assembly: PrecisionImage (in PrecisionImage.dll) Version: (

public Histogram GetHistogram(
	SourceData sourceData,
	int channel,
	HistogramResolution histogramResolution = HistogramResolution.EightBit,
	Int32Rect regionOfInterest = null,
	BinaryMask binaryMask = null,
	HistogramRange histogramRange = null


Type: PrecisionImage SourceData
A SourceData type containing the image data.
Type: OnlineSystem Int32
An OnlineInt32 type indicating the data channel to process.
histogramResolution (Optional)
Type: PrecisionImage.HistogramProcessing HistogramResolution
A HistogramResolution enumeration specifying the resolution of the returned histogram.
regionOfInterest (Optional)
Type: OnlineSystem.Windows Int32Rect
An OnlineInt32Rect type indicating the region of interest. Coordinates are zero-index based. This parameter is optional and defaults to the entire image.
binaryMask (Optional)
Type: PrecisionImage.BinarizationAndMorphology BinaryMask
A BinaryMask type specifying a mask indicating areas of the image to bypass when building the histogram.
histogramRange (Optional)
Type: PrecisionImage.HistogramProcessing HistogramRange
A HistogramRange object specifying the minimum and maximum values of the histogram search range.

Return Value

A Histogram object containing the histogram data.

OnlineSystem ArgumentNullException Thrown when sourceData is null.
OnlineSystem ArgumentOutOfRangeException Thrown when channel specifies a channel that is not contained within the sourceData object.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest specifies an invalid region relative to the sourceData dimensions.

Use this method to retrieve a Histogram object containing statistics associated with the specified channel of sourceData.
See Also