RegionSphere: Create a Spherical Region of Interest

Description Usage Arguments Value Examples

Description

Creates a Spherical ROI based on a Centroid.

Usage

1
RegionSphere(bvol, centroid, radius, fill = NULL, nonzero = FALSE)

Arguments

bvol

an BrainVolume or BrainSpace instance

centroid

the center of the sphere in voxel space

radius

the radius in real units (e.g. millimeters) of the spherical ROI

fill

optional value(s) to store as data

nonzero

if TRUE, keep only nonzero elements from bvol

Value

an instance of class ROIVolume

Examples

1
2
3
4
5
6
7
 sp1 <- BrainSpace(c(10,10,10), c(1,2,3))
 cube <- RegionSphere(sp1, c(5,5,5), 3.5)
 vox <- coords(cube)
 cds <- coords(cube, real=TRUE)
 ## fill in ROI with value of 6
 cube1 <- RegionSphere(sp1, c(5,5,5), 3.5, fill=6)
 all(cube1@data == 6)

bbuchsbaum/neuroim documentation built on March 29, 2021, 11:01 a.m.