Core Optical, Inc.
Utilities CountRangedValue Method Industrial Strength, Scientific Grade
Determines the number of values that occur within a given range in the SourceData object.

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

public static int CountRangedValue(
	SourceData sourceData,
	int channel,
	float lowerValue,
	float upperValue,
	Int32Rect regionOfInterest = null,
	BinaryMask binaryMask = null
)

Parameters

sourceData
Type: PrecisionImage SourceData
A SourceData object containing the data to operate on.
channel
Type: OnlineSystem Int32
An OnlineInt32 type indicating the channel to operate on.
lowerValue
Type: OnlineSystem Single
A OnlineSingle type whose value defines the lower limit of the range (inclusive).
upperValue
Type: OnlineSystem Single
A OnlineSingle type whose value defines the upper limit of the range (inclusive).
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

An OnlineInt32 type containing the count value.
Exceptions

ExceptionCondition
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.
OnlineSystem ArgumentOutOfRangeException Thrown when lowerValue or upperValue is NaN, or when lowerValue is not less than upperValue.
Remarks

Use this function to count the number of values that occur within a given range in the specified channel of the sourceData object.
See Also