This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > GeoAnalyst > ESRI.ArcGIS.GeoAnalyst > Interfaces > IR > IRasterNeighborhood Interface > IRasterNeighborhood.SetWeight Method (ArcObjects .NET 10.5 SDK) |
Sets a neighborhood object each of whose entries can be assigned a weight.
[Visual Basic .NET] Public Sub SetWeight ( _ ByVal height As Integer, _ ByVal width As Integer, _ ByRef entryValues As Object _ )
[C#] public void SetWeight ( int height, int width, ref object entryValues );
[C++]
HRESULT SetWeight(
long height,
long width,
VARIANT* entryValues
);
[C++]
Parameters height [in] height is a parameter of type long width [in] width is a parameter of type long entryValues [in] entryValues is a parameter of type VARIANT
height |
The number of cells in the x-direction of the neighborhood. |
width |
The number of cells in the y-direction of the neighborhood. |
entryValues |
An array that defines the neighborhood and respective weight values. The value of each cell position in the neighborhood is multiplied by the corresponding weight value and the products are used in the neighborhood calculation. A "0" value is treated like any other value in the kernel. example: a weighted neighborhood array may look like the following. 3 0 0 0 4 |
Allows for defining an irregular neighborhood and for specifying which weights will be used to multiply the cell values on an input raster. The x,y position for the processing cell within the neighborhood, with respect to the upper-left corner of the neighborhood, is determined by the following equations:
x=(width + 1)/2
y=(height + 1)/2
If the input number of cells is even, the x- and y-coordinates are computed using truncation.