fmri_mem_dataset | R Documentation |
This function creates an fMRI memory dataset object, which is a list containing information about the scans, mask, TR, number of runs, event table, base path, sampling frame, and censor.
fmri_mem_dataset(
scans,
mask,
TR,
run_length = sapply(scans, function(x) dim(x)[4]),
event_table = data.frame(),
base_path = ".",
censor = NULL
)
scans |
A list of objects of class |
mask |
A binary mask of class |
TR |
Repetition time (TR) of the fMRI acquisition. |
run_length |
A numeric vector specifying the length of each run in the dataset. Default is the length of the scans. |
event_table |
An optional data frame containing event information. Default is an empty data frame. |
base_path |
An optional base path for the dataset. Default is "." (current directory). |
censor |
An optional numeric vector specifying which time points to censor. Default is NULL. |
An fMRI memory dataset object of class c("fmri_mem_dataset", "volumetric_dataset", "fmri_dataset", "list").
# Create a NeuroVec object
d <- c(10, 10, 10, 10)
nvec <- neuroim2::NeuroVec(array(rnorm(prod(d)), d), space=neuroim2::NeuroSpace(d))
# Create a NeuroVol mask
mask <- neuroim2::NeuroVol(array(rnorm(10*10*10), d[1:3]), space=neuroim2::NeuroSpace(d[1:3]))
mask[mask < .5] <- 0
# Create an fmri_mem_dataset
dset <- fmri_mem_dataset(list(nvec), mask, TR=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.