SparseBrainVector-class: SparseBrainVector

Description Usage Arguments Slots Examples

Description

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

Usage

1
SparseBrainVector(data, space, mask, source = NULL, label = "")

Arguments

data

an array which can be a matrix or 4-D array

space

a BrainSpace instance

mask

a 3D array of type logical

source

the data source – an instance of class BrainSource

label

associated sub-image labels

Slots

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

Examples

1
2
3
4
5
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)

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