Core Optical, Inc.
Utilities GetMinMaxValues Method Industrial Strength, Scientific Grade
Retrieves the current minimum and maximum values in the data source.

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

public static float[] GetMinMaxValues(
	SourceData sourceData,
	int channel,
	Int32Rect regionOfInterest = null,
	BinaryMask binaryMask = null


Type: PrecisionImage SourceData
A SourceData object containing the data to operate on.
Type: OnlineSystem Int32
An OnlineInt32 type indicating the channel to operate on.
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 object indicating areas to bypass. Default is no mask.

Return Value

A two-element OnlineArray of type OnlineSingle. The first entry is the minimum value, the second entry is the maximum value.

OnlineSystem ArgumentNullException Thrown when sourceData is null.
OnlineSystem ArgumentOutOfRangeException Thrown when channel refers to a channel that does not exist in sourceData.
OnlineSystem ArgumentException Thrown when the dimensions of binaryMask do not match those of sourceData.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest specifies a region not completely contained within the input data.

Use this method to retrieve the current minimum and maximum values in the specified channel of the data source. The primary difference between this method and GetCurrentMinValue(Int32) / GetCurrentMaxValue(Int32) is that this method allows the use of a region of interest and/or BinaryMask as part of the query.
See Also