UserFilter example for Visual Basic
Dim RasterProc As New LEADRasterProcess
Dim i, j As Integer
RasterProc.UserFilterWidth = 3
RasterProc.UserFilterHeight = 3
RasterProc.UserFilterXCenter = 1
RasterProc.UserFilterYCenter = 1
RasterProc.UserFilterDivisor = 1
RasterProc.UserFilterOffset = 0
RasterProc.UserFilterFlags = UD_SUM
For i = 0 To RasterProc.UserFilterWidth - 1
For j = 0 To RasterProc.UserFilterHeight - 1
If (j = 1 Or i = 1) Then
If (j = 1 And i = 1) Then
RasterProc.UserFilterData(i, j) = 5
Else
RasterProc.UserFilterData(i, j) = -1
End If
Else
RasterProc.UserFilterData(i, j) = 0
End If
Next j
Next i
RasterProc.UserFilter LEADRasterView1.Raster