| vec_from_vols | R Documentation |
Factory function to create a NeuroVec object from a list of NeuroVol objects. This is a convenience wrapper around the NeuroVec constructor that combines multiple 3D volumes into a single 4D NeuroVec.
vec_from_vols(vols, mask = NULL)
vols |
A list of |
mask |
An optional logical array or |
A NeuroVec object (either DenseNeuroVec or SparseNeuroVec
depending on whether a mask is provided).
NeuroVec, NeuroVol
# Create a simple NeuroVec from list of volumes
spc <- NeuroSpace(c(10, 10, 10))
vol1 <- NeuroVol(rnorm(10*10*10), spc)
vol2 <- NeuroVol(rnorm(10*10*10), spc)
vec <- vec_from_vols(list(vol1, vol2))
print(dim(vec)) # Should be c(10, 10, 10, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.