Sets a neighborhood object each of whose entries can be assigned a weight.

[Visual Basic .NET]Public Sub SetWeight ( _ByValheightAsInteger, _ByValwidthAsInteger, _ByRefentryValuesAsObject _)

[C#]publicvoidSetWeight (intheight,intwidth,ref objectentryValues);

[C++]HRESULT SetWeight(longheight,longwidth,VARIANT*entryValues);

[C++]

Parametersheight[in]heightis a parameter of typelongwidth[in]widthis a parameter of typelongentryValues[in]entryValuesis a parameter of typeVARIANT

#### Product Availability

#### Remarks

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.