Core Optical, Inc.
MidpointFilter GetFilteredImage Method Industrial Strength, Scientific Grade
Applies a Midpoint filter algorithm to the data in sourceData and returns a OnlineBitmapSource image of the result. The original data is unaltered.

Namespace: PrecisionImage.SpatialFiltering
Assembly: PrecisionImage (in PrecisionImage.dll) Version: (

public BitmapSource GetFilteredImage(
	SourceData sourceData,
	int channel,
	GrayBitDepth grayBitDepth = GrayBitDepth.EightBit,
	Int32Rect regionOfInterest = null,
	GammaEncoding gammaEncoding = GammaEncoding.None,
	BinaryMask binaryMask = null


Type: PrecisionImage SourceData
A SourceData type containing the image data.
Type: OnlineSystem Int32
An OnlineInt32 type indicating the data channel to process.
grayBitDepth (Optional)
Type: PrecisionImage GrayBitDepth
A GrayBitDepth enumerator indicating the bit-depth of the returned grayscal BitmapSource image.
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.
gammaEncoding (Optional)
Type: PrecisionImage GammaEncoding
A GammaEncoding enumeration indicating whether or not to gamma-encode the output image.
binaryMask (Optional)
Type: PrecisionImage.BinarizationAndMorphology BinaryMask
A BinaryMask object indicating areas to bypass. Default is no mask.

Return Value

A OnlineBitmapSource portrayal of the filtered data.

OnlineSystem ArgumentNullException Thrown when sourceData is null.
OnlineSystem ArgumentException Thrown when the dimensions of binaryMask do not match those of sourceData.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest is not completely contained within the dimensions of sourceData.
OnlineSystem ArgumentOutOfRangeException Thrown when the specified channel does not exist in the sourceData object.
OnlineSystem ArgumentOutOfRangeException Thrown when the filter's kernel rows and/or columns are negative or larger than the source data.
See Also