SparseBrainVector-class {neuroim} | R Documentation |
a sparse four-dimensional brain image, backed by a matrix
, where each column represents
a vector spanning the fourth dimension (e.g. time)
constructs a SparseBrainVector object
SparseBrainVector(data, space, mask, source = NULL, label = "")
data |
an array which can be a |
space |
a BrainSpace instance |
mask |
a 3D |
source |
the data source – an instance of class |
label |
associated sub-image labels |
mask
the mask defining the sparse domain
data
the matrix of series, where rows span across voxel space and columns span the fourth dimensions
map
instance of class IndexLookupVolume
is used to map between spatial and index/row coordinates
bspace <- BrainSpace(c(10,10,10,100), c(1,1,1))
mask <- array(rnorm(10*10*10) > .5, c(10,10,10))
mat <- matrix(rnorm(sum(mask)), 100, sum(mask))
svec <- SparseBrainVector(mat, bspace,mask)
length(indices(svec)) == sum(mask)