SparseNeuroVecSource-class | R Documentation |
A class used to produce a SparseNeuroVec
instance. It encapsulates
the necessary information to create a sparse representation of a 4D neuroimaging dataset.
SparseNeuroVecSource acts as a factory for SparseNeuroVec objects. It holds the spatial mask that determines which voxels will be included in the sparse representation. This class is typically used in data loading or preprocessing pipelines where the sparse structure of the data is known or determined before the full dataset is loaded.
mask
An object of class LogicalNeuroVol
representing the subset
of voxels that will be stored in memory. This mask defines the sparse structure of the
resulting SparseNeuroVec.
SparseNeuroVecSource
inherits from:
NeuroVecSource
: Base class for NeuroVec source objects
SparseNeuroVec-class
for the resulting sparse 4D neuroimaging data class.
LogicalNeuroVol-class
for the mask representation.
## Not run:
# Create a simple mask
mask_data <- array(runif(64*64*32) > 0.7, dim = c(64, 64, 32))
mask <- LogicalNeuroVol(mask_data, space = NeuroSpace(dim = c(64, 64, 32)))
# Create a SparseNeuroVecSource
sparse_source <- new("SparseNeuroVecSource", mask = mask)
# Use the source to create a SparseNeuroVec (pseudo-code)
# sparse_vec <- create_sparse_neuro_vec(sparse_source, data)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.