neighbor_counts: Count each voxel's neighbors with value 'TRUE'

Description Usage Arguments Value

View source: R/format_data.R

Description

For each voxel in a 3D logical array, count the number of immediate neighbors with value TRUE.

Usage

1
neighbor_counts(arr, pad = FALSE)

Arguments

arr

The 3D logical array.

pad

Pad value for edge.

Value

An array with the same dimensions as arr. Each voxel value will be the number of its immediate neighbors (0 to 6) which are TRUE.


neuroconductor/fMRIscrub documentation built on Dec. 22, 2021, 1:10 a.m.