SparseBrainVolume-class {neuroim}R Documentation

SparseBrainVolume

Description

Three-dimensional brain image, backed by a sparseVector for Matrix package

Construct a SparseBrainVolume instance

Usage

SparseBrainVolume(data, space, indices = NULL, source = NULL, label = "")

Arguments

data

a numeric vector

space

an instance of class BrainSpace

indices

a index vector indicating the 1-d coordinates of the data values

source

an instance of class BrainSource

label

a character string

Details

Image data is backed by Matrix::sparseVector.

Value

SparseBrainVolume instance

Slots

data

a sparseVector instance

Examples

data <- 1:10
indices <- seq(1,1000, length.out=10)
bspace <- BrainSpace(c(64,64,64), spacing=c(1,1,1))
sparsevol <- SparseBrainVolume(data,bspace,indices=indices)
densevol <- BrainVolume(data,bspace,indices=indices)
sum(sparsevol) == sum(densevol)




[Package neuroim version 0.0.6 Index]