IRasterConvolutionFilter Interface

Provides access to members that control a raster kernel-based filter.

Description

IRasterConvolutionFilter provides access to members that allow setting up a convolution filter. PutCoefficients() and QueryCoefficients() sets and gets kernel coefficients, which are represented as a double array.QueryCoefficients() expects the array to be allocated by caller, and it fills in the values.

Members

Name Description
Read/write property GainFactor The gain factor of the kernel filter.
Method GetCenterPosition Gets the center position of the kernel filter.
Method GetSize Gets the size of the kernel filter.
Read-only property IsNormalized Indicates whether the filter is normalized.
Method Normalize Normalizes the filter.
Method PutCoefficients Sets the element coefficients of the kernel filter.
Method QueryCoefficients Gets the element coefficients of the kernel filter.
Read/write property Recursive Indicates whether the filter is recursive.
Method ScaleBy Scales the filter coefficients.
Method SetCenterPosition Sets the center position of the kernel filter.
Method SetSize Sets the size of the kernel filter.

IRasterConvolutionFilter.GainFactor Property

The gain factor of the kernel filter.

Public Property GainFactor As Double
public double GainFactor {get; set;}

IRasterConvolutionFilter.GetCenterPosition Method

Gets the center position of the kernel filter.

Public Sub GetCenterPosition ( _
    ByRef atColumn As Integer, _
    ByRef atRow As Integer _
)
public void GetCenterPosition (
    ref int atColumn,
    ref int atRow
);

IRasterConvolutionFilter.GetSize Method

Gets the size of the kernel filter.

Public Sub GetSize ( _
    ByRef nColumns As Integer, _
    ByRef nRows As Integer _
)
public void GetSize (
    ref int nColumns,
    ref int nRows
);

IRasterConvolutionFilter.IsNormalized Property

Indicates whether the filter is normalized.

Public ReadOnly Property IsNormalized As Boolean
public bool IsNormalized {get;}

IRasterConvolutionFilter.Normalize Method

Normalizes the filter.

Public Sub Normalize ( _
)
public void Normalize (
);

IRasterConvolutionFilter.PutCoefficients Method

Sets the element coefficients of the kernel filter.

Public Sub PutCoefficients ( _
    ByRef coefList As Double[]& _
)
public void PutCoefficients (
    ref Double[]& coefList
);

Remarks

PutCoefficents takes a dimentional (1D) array (row * column of the kernel), then transforms automatically to a 2D array. The side of 2D array is defined by SetSize method.

size of 1D array = row * column of the kernel

IRasterConvolutionFilter.QueryCoefficients Method

Gets the element coefficients of the kernel filter.

Public Sub QueryCoefficients ( _
    ByRef coefList As Double[]& _
)
public void QueryCoefficients (
    ref Double[]& coefList
);

IRasterConvolutionFilter.Recursive Property

Indicates whether the filter is recursive.

Public Property Recursive As Boolean
public bool Recursive {get; set;}

IRasterConvolutionFilter.ScaleBy Method

Scales the filter coefficients.

Public Sub ScaleBy ( _
    ByVal ScaleFactor As Double _
)
public void ScaleBy (
    double ScaleFactor
);

IRasterConvolutionFilter.SetCenterPosition Method

Sets the center position of the kernel filter.

Public Sub SetCenterPosition ( _
    ByVal atColumn As Integer, _
    ByVal atRow As Integer _
)
public void SetCenterPosition (
    int atColumn,
    int atRow
);

IRasterConvolutionFilter.SetSize Method

Sets the size of the kernel filter.

Public Sub SetSize ( _
    ByVal nColumns As Integer, _
    ByVal nRows As Integer _
)
public void SetSize (
    int nColumns,
    int nRows
);

Classes that implement IRasterConvolutionFilter

Classes Description
RasterConvolutionFilter A raster kernel-based filter.

Remarks

The IRasterConvlutionFilter interface is used to create a convolution filter, which can be used to apply on a raster to perform image filtering. To create a convolution filter, the size, values and the center of the kernel must be set.

Here is an example of low pass filter kernel

A 3x3 low pass filter kernel

Use SetSize, SetCenterPosition, and PutCoefficents to define a kernel.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.