Core Optical, Inc.
Resampler GetResampledChannel Method Industrial Strength, Scientific Grade
Returns a single-channel SourceData object containing the resampled data.

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

public SourceData GetResampledChannel(
	SourceData sourceData,
	int sourceChannel,
	ResamplingKernel kernel,
	int newWidth,
	int newHeight,
	Int32Rect regionOfInterest = null
)

Parameters

sourceData
Type: PrecisionImage SourceData
A SourceData type containing the data to resample.
sourceChannel
Type: OnlineSystem Int32
An OnlineInt32 type indicating the channel containing the data to resample.
kernel
Type: PrecisionImage.Resampling ResamplingKernel
A ResamplingKernel type that indicates the kernel to use during the resampling operation.
newWidth
Type: OnlineSystem Int32
An OnlineInt32 type indicating the number of horizontal samples.
newHeight
Type: OnlineSystem Int32
An OnlineInt32 type indicating the number of vertical samples.
regionOfInterest (Optional)
Type: OnlineSystem.Windows Int32Rect
An OnlineInt32Rect type indicating the region of interest to resample. This parameter is optional and defaults to the entire image.

Return Value

A single-channel SourceData object containing the resampled data.
Exceptions

Remarks

Use this method to resample an entire channel (or a portion of a channel) and retrieve the result as a new single-channel SourceData object. This method is a pure resampler that does not implement any anti-aliasing. To avoid aliasing effects when downsampling, it is recommended to pre-filter the data first using the GaussianBlurFilter with the appropriate kernel radii.

One may notice a difference in resampling results if the image data has been loaded using None versus sRGB gamme-encoding specifiers, particularly at sharp edges and discontinuities. This is due to the decreased gradient at these features caused by the application of gamma encoding, and is usually manifest as an increase/decrease in the filter's overshoot/undershoot behavior which can aapear as halo artifacts.

See Also