RegionSquare: Create a square region of interest where the z-dimension is...

Description Usage Arguments Value Examples

View source: R/BrainRegion3D.R

Description

Create a square region of interest where the z-dimension is fixed at one voxel coordinate.

Usage

1
2
RegionSquare(bvol, centroid, surround, fill = NULL, nonzero = FALSE,
  fixdim = 3)

Arguments

bvol

an BrainVolume or BrainSpace instance.

centroid

the center of the cube in voxel coordinates.

surround

the number of voxels on either side of the central voxel.

fill

optional value(s) to assign to data slot.

nonzero

keep only nonzero elements from bvol. If bvol is A BrainSpace then this argument is ignored.

fixdim

the fixed dimension is the third, or z, dimension.

Value

an instance of class ROIVolume.

Examples

1
2
3
4
5
 sp1 <- BrainSpace(c(10,10,10), c(1,1,1))
 square <- RegionSquare(sp1, c(5,5,5), 1)
 vox <- coords(square)
 ## a 3 X 3 X 1 grid
 nrow(vox) == 9

neuroim documentation built on May 2, 2019, 1:04 p.m.