This function creates a square region of interest (ROI) in a 3D volume, where the z-dimension is fixed at one voxel coordinate. The ROI is defined within a given NeuroVol or NeuroSpace instance.
Arguments
- bvol
A
NeuroVol
orNeuroSpace
instance representing the 3D volume or space.- centroid
A numeric vector of length 3, representing the center of the square ROI in voxel coordinates.
- surround
A non-negative integer specifying the number of voxels on either side of the central voxel.
- fill
An optional value or values to assign to the data slot of the resulting ROI. If not provided, no data will be assigned.
- nonzero
A logical value indicating whether to keep only nonzero elements from
bvol
. Ifbvol
is aNeuroSpace
instance, this argument is ignored.- fixdim
A logical value indicating whether the fixed dimension is the third, or z, dimension. Default is TRUE.