SparseNeuroVol-class | R Documentation |
This S4 class represents a three-dimensional brain image, which is stored using a sparse data representation, backed by a sparseVector
from the Matrix package. Sparse representations are beneficial for storing and processing large brain images with a high proportion of zero or missing values.
Construct a SparseNeuroVol
instance
SparseNeuroVol(data, space, indices = NULL, label = "")
data |
a numeric vector |
space |
an instance of class |
indices |
a index vector indicating the 1-d coordinates of the data values |
label |
a |
Image data is backed by Matrix::sparseVector
.
SparseNeuroVol
instance
data
A sparseVector
instance from the Matrix package, which stores the image volume data in a sparse format.
NeuroVol
data <- 1:10
indices <- seq(1,1000, length.out=10)
bspace <- NeuroSpace(c(64,64,64), spacing=c(1,1,1))
sparsevol <- SparseNeuroVol(data,bspace,indices=indices)
densevol <- NeuroVol(data,bspace,indices=indices)
sum(sparsevol) == sum(densevol)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.