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

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 threshold,
	bool maskLowerValues,
	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.
threshold
Type: OnlineSystem Single
A OnlineSingle type indicating the threshold value. The threshold value is inclusive in the mask-building logic and is always unmasked (true).
maskLowerValues
Type: OnlineSystem Boolean
A OnlineBoolean type indicating whether or not values lower than threshold are masked (maskLowerValues = true) or unmasked (maskLowerValues = false).
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 binaryMask does not have the same dimensions as sourceData.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest specifies a region not completely contained within the input data.
Remarks

Use this constructor to generate a BinaryMask based on the specified threshold value. Data above or below the specified threshold can be either masked (false) or unmasked (true) depending on the maskLowerValues parameter.
See Also