Core Optical, Inc.
Utilities SubtractChannels Method Industrial Strength, Scientific Grade
Performs a pointwise subtraction (sourceData1 - sourceData2) and stores the result in targetData.

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

public static void SubtractChannels(
	SourceData sourceData1,
	int channel1,
	SourceData sourceData2,
	int channel2,
	SourceData targetData,
	int targetChannel,
	Int32Rect regionOfInterest = null,
	BinaryMask binaryMask = null
)

Parameters

sourceData1
Type: PrecisionImage SourceData
A SourceData object containing the data to which the subtraction is applied.
channel1
Type: OnlineSystem Int32
An OnlineInt32 type indicating the channel of sourceData1 to which the subtraction is applied.
sourceData2
Type: PrecisionImage SourceData
A SourceData object containing the data to subtract.
channel2
Type: OnlineSystem Int32
An OnlineInt32 type indicating the channel of sourceData2 to subtract.
targetData
Type: PrecisionImage SourceData
A SourceData object to which the results of the subtraction are stored.
targetChannel
Type: OnlineSystem Int32
An OnlineInt32 type indicating the channel of targetData to use to store the results.
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.
Exceptions

ExceptionCondition
OnlineSystem ArgumentNullException Thrown when sourceData1, sourceData2, or targetData are null.
OnlineSystem ArgumentOutOfRangeException Thrown when channel1, channel2 or targetChannel specify a channel that does not exist.
OnlineSystem ArgumentException Thrown when the dimensions of binaryMask do not match those of sourceData1, sourceData2 and targetData.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest specifies a region not completely contained within the input data.
Remarks

Use this function to perform a pointwise subtraction of the values within the specified channel of sourceData2 from the specified channel of sourceData1. The results are stored in the specified targetChannel of targetData. The target SourceData object can be one of the input SourceData objects.

sourceData1, sourceData2 and targetData must all have the same dimensions.

See Also