RegionCube: Create A Cuboid Region of Interest

Description Usage Arguments Value Examples

View source: R/BrainRegion3D.R

Description

Create A Cuboid Region of Interest

Usage

1
RegionCube(bvol, centroid, surround, fill = NULL, nonzero = FALSE)

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. A vector of length 3.

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.

Value

an instance of class ROIVolume

Examples

1
2
3
4
5
6
 sp1 <- BrainSpace(c(10,10,10), c(1,1,1))
 cube <- RegionCube(sp1, c(5,5,5), 3)
 vox <- coords(cube)
 cube2 <- RegionCube(sp1, c(5,5,5), 3, fill=5)
 
 

Example output

Loading required package: stringr
Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: grid
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. 

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