vols | R Documentation |
This function extracts an ordered series of 3D volumes from an object that supplies volume data.
The indices
argument specifies the subset of volumes to extract, and can be a vector
of indices or a logical vector. The return value is a list containing the extracted volumes
in the same order as the specified indices.
vols(x, indices, ...)
## S4 method for signature 'NeuroVec,numeric'
vols(x, indices)
## S4 method for signature 'NeuroVec,missing'
vols(x)
x |
the object that supplies the volume data. |
indices |
the subset of volumes to extract. |
... |
additional arguments to be passed to methods. |
vec <- read_vec(system.file("extdata", "global_mask_v4.nii", package="neuroim2"))
vs <- vols(vec)
length(vs) == dim(vec)[4]
vs <- vols(vec, indices=1:3)
length(vs) == 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.