Core Optical, Inc.
SourceData GetChannelImage Method (GrayBitDepth, Int32, BinaryMask, GammaEncoding, OutputWindowing, OutputWindowing, Int32Rect)Industrial Strength, Scientific Grade
Retrieves a grayscale image of the data contained within the specified data channel and scaled to the specified OutputWindowing.

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

public BitmapSource GetChannelImage(
	GrayBitDepth outputBitDepth,
	int channel,
	BinaryMask binaryMask,
	GammaEncoding gammaEncoding = GammaEncoding.None,
	OutputWindowing unmaskedWindowing = null,
	OutputWindowing maskedWindowing = null,
	Int32Rect regionOfInterest = null
)

Parameters

outputBitDepth
Type: PrecisionImage GrayBitDepth
A GrayBitDepth type indicating the type of grayscale mapping to perform.
channel
Type: OnlineSystem Int32
An OnlineInt32 indicating the channel of interest in the current SourceData object.
binaryMask
Type: PrecisionImage.BinarizationAndMorphology BinaryMask
A BinaryMask type used to partition the data into independantly contrast-stretched regions.
gammaEncoding (Optional)
Type: PrecisionImage GammaEncoding
A GammaEncoding enumeration indicating whether or not to gamma encode the grayscale mapping. Default value is GammaEncoding.None.
unmaskedWindowing (Optional)
Type: PrecisionImage.Visualization OutputWindowing
A OutputWindowing type that contains the minimum and maximum clipping values for linear mapping of unmasked data. This parameter is optional. Default values are the current minimum and maximum values in the SourceData object.
maskedWindowing (Optional)
Type: PrecisionImage.Visualization OutputWindowing
A OutputWindowing type that contains the minimum and maximum clipping values for linear mapping of masked data. This parameter is optional. Default values are the current minimum and maximum values in the SourceData object.
regionOfInterest (Optional)
Type: OnlineSystem.Windows Int32Rect
A OnlineInt32Rect indicating the zero-based row and column coordinates of the region to process. This parameter is optional. Default is the entire data image.

Return Value

A OnlineBitmapSource object containing the windowed data image.
Exceptions

ExceptionCondition
OnlineSystem ArgumentOutOfRangeException Thrown when channel is negative or greater than the current number of data channels.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest specifies a rectangular region not completely contained within the dimensions of the source data.
OnlineSystem ArgumentNullException Thrown when binaryMask is null.
OnlineSystem ArgumentOutOfRangeException Thrown when binaryMask does not contain a number of rows and columns equal to the current SourceData object.
Remarks

Use this method to independently visualize and contrast-stretch masked and unmasked data within the specified channel of the current SourceData object. This method allows for the application of a binary mask to partition the source data into separate regions that can be independently contrast-stretched via the maskedWindowing and unmaskedWindowing arguments. In addition, regionOfInterest allows for this processing to be applied to a selected region of the data. The resulting OnlineBitmapSource object returned can be either a Gray8, Gray16 or Gray32Float image type.

This method is useful when only a certain region of the data needs to be contrast-stretched. Use the binaryMask parameter to partition the data into masked and unmasked regions, then use the maskedWindowing and unmaskedWindowing parameters to control the linear mapping range of the masked/unmasked data regions. For interactive implementations, see the overload version of this method that returns a OnlineArray object for use with a OnlineWriteableBitmap. Use the gammaEncoding parameter to gamma-encode the output pixel values of the resulting OnlineBitmapSource image.

See Also