The spatial_gradient function calculates the spatial gradient of a NeuroVol instance within the specified mask.
Arguments
- vol
A
NeuroVolinstance for which the spatial gradient should be calculated.- mask
A
NeuroVolmask defining the voxels to include in the spatial gradient calculation. If the mask containsnumericdata, nonzero values will define the included voxels. If the mask is aLogicalNeuroVol, thenTRUEwill define the set of included voxels.- sigma
A numeric value controlling the spatial weighting function. Default is 0.5.