SparseBrainVector-class {neuroim}R Documentation

SparseBrainVector

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

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


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)

[Package neuroim version 0.0.6 Index]