Core Optical, Inc.
SourceData GetChannelImage Method (GrayBitDepth, Int32, GammaEncoding, 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,
	GammaEncoding gammaEncoding = GammaEncoding.None,
	OutputWindowing outputWindowing = null,
	Int32Rect regionOfInterest = null
)

Parameters

outputBitDepth
Type: PrecisionImage GrayBitDepth
A GrayBitDepth type indicating the format of the generated image.
channel
Type: OnlineSystem Int32
An OnlineInt32 indicating the zero-based index of the channel from which the data for the image is sourced.
gammaEncoding (Optional)
Type: PrecisionImage GammaEncoding
A GammaEncoding enumeration specifying the type of gamma encoding to apply to the scaled values. This parameter is optional and defaults to None.
outputWindowing (Optional)
Type: PrecisionImage.Visualization OutputWindowing
An OutputWindowing object containing an associated channel and output range to visualize.
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.

Return Value

A OnlineBitmapSource object containing the channel data image.
Exceptions

ExceptionCondition
OnlineSystem ArgumentOutOfRangeException Thrown when channel specifies a channel that does not exist within the current SourceData object.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest specifies a rectangular region not completely contained within the dimensions of the source data.
Remarks

Use this method to visualize the data within a given channel as a grayscaled image. Channel data falling within the specified outputWindowing range for that channel are scaled to gray with the specified specifier. If ThirtyTwoBit is specified, the GammaEncoding specifier is ignored and the data is scaled linearly within the specified range. Outlier values (values falling outside of the specified range) are clamped to the range limits.

This method only scales the depiction of the data. The actual values within the SourceData object itself are not altered.

See Also