NeuroVec-class | R Documentation |
This S4 class represents a four-dimensional brain image, which can be used to store and process time series data such as fMRI or 4D functional connectivity maps. The class extends the basic functionality of NeuroObj
.
Constructor function for the NeuroVec
class. This function is used to create an instance of a NeuroVec object, which represents a four-dimensional brain image.
NeuroVec(data, space = NULL, mask = NULL, label = "")
data |
The image data, which can be a matrix, a 4D array, or a list of |
space |
An optional |
mask |
An optional |
label |
A label of type |
A concrete instance of the NeuroVec
class. If a mask
is provided, the function returns a SparseNeuroVec
object; otherwise, it returns a DenseNeuroVec
object.
To create a NeuroVec object, use the constructor function NeuroVec()
.
# Load an example 4D brain image
example_4d_image <- read_vec(system.file("extdata", "global_mask_v4.nii", package="neuroim2"))
# Create a NeuroVec object by copying the @.Data field (not advised in practice)
neuro_vec <- NeuroVec(data=example_4d_image@.Data, space=space(example_4d_image))
# Load an example 4D brain image
example_4d_image <- read_vec(system.file("extdata", "global_mask_v4.nii", package="neuroim2"))
# Create a NeuroVec object
neuro_vec <- NeuroVec(data=example_4d_image@.Data, space=space(example_4d_image))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.