sum_neighbors_vol | R Documentation |
For each voxel in a 3D logical or numeric array, sum the values of the six neighboring voxels.
sum_neighbors_vol(arr, pad = 0)
arr |
The 3D array. |
pad |
In order to compute the sum, the array is temporarily padded along
each edge with the value of |
Diagonal voxels are not considered adjacent, i.e. the voxel at (0,0,0) is not adjacent to the voxels at (1,1,0) or (1,1,1), although it is adjacent to (1,0,0).
An array with the same dimensions as arr
. Each voxel value
will be the sum across the immediate neighbors. If arr
was a logical
array, this value will be between 0 and 6.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.