Reads the NIfTI header for one or more BOLD files and returns the 4th data dimension, i.e. the number of time points/volumes in each scan.
Usage
n_volumes(x, ...)
# S3 method for class 'character'
n_volumes(x, ...)
# S3 method for class 'bids_project'
n_volumes(
x,
subid = ".*",
task = ".*",
run = ".*",
session = ".*",
scope = c("raw", "derivatives"),
as_tibble = FALSE,
...
)Arguments
- x
A character vector of NIfTI paths, or a
bids_projectobject.- ...
Additional arguments passed to methods.
- subid
Regex pattern to match subject IDs.
- task
Regex pattern to match task names.
- run
Regex pattern to match run IDs.
- session
Regex pattern to match session IDs.
- scope
Scan source.
"raw"usesfunc_scans(), while"derivatives"usespreproc_scans().- as_tibble
If
TRUE, return.path, parsed entities, andnvols.