Core Optical, Inc.
BinaryMask Constructor (SourceData, Int32, Single, Single, Boolean, Int32Rect, BinaryMask)Industrial Strength, Scientific Grade
Instantiates a BinaryMask object based on the SourceData and a pair of threshold values.

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

public BinaryMask(
	SourceData sourceData,
	int channel,
	float lowThreshold,
	float highThreshold,
	bool maskOutOfRangeValues,
	Int32Rect regionOfInterest = null,
	BinaryMask binaryMask = null
)

Parameters

sourceData
Type: PrecisionImage SourceData
A SourceData object upon which the BinaryMask is to be based.
channel
Type: OnlineSystem Int32
An OnlineInt32 type indicating the channel containing the data upon which the mask is based.
lowThreshold
Type: OnlineSystem Single
A OnlineSingle type indicating the threshold pixel value delimiting the lower limit of the masked/unmasked region. The threshold value is inclusive in the mask-building logic and is always unmasked (true).
highThreshold
Type: OnlineSystem Single
A OnlineSingle type indicating the threshold pixel value delimiting the upper limit of the masked/unmasked region. The threshold value is inclusive in the mask-building logic and is always unmasked (true).
maskOutOfRangeValues
Type: OnlineSystem Boolean
A OnlineBoolean type indicating whether or not the range of values contained within the lower and upper thresholds is masked (maskOutOfRangeValues = false) or unmasked (maskOutOfRangeValues = true).
regionOfInterest (Optional)
Type: OnlineSystem.Windows Int32Rect
An OnlineInt32Rect type indicating the region of interest from which to generate the mask. This parameter is optional and defaults to the entire image.
binaryMask (Optional)
Type: PrecisionImage.BinarizationAndMorphology BinaryMask
A BinaryMask indicating regions in the input sourceData to bypass from the thresholding operation. Bypassed regions are unmasked in the generated output BinaryMask that this returned from this method. This parameter is optional and defaults to null.
Exceptions

ExceptionCondition
OnlineSystem ArgumentNullException Thrown when sourceData is null.
OnlineSystem ArgumentOutOfRangeException Thrown when channel is negative or greater than the number of channels in sourceData.
OnlineSystem ArgumentException Thrown when lowThreshold is greater or equal to highThreshold.
OnlineSystem ArgumentException Thrown when binaryMask does not have the same dimensions as sourceData.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest specifies a region not completely contained within the input data.
See Also