powered by
Convenience wrapper that inspects the file metadata and dispatches to read_vol for 3D data or read_vec for 4D data.
read_vol
read_vec
read_image( file_name, type = c("auto", "vol", "vec"), index = 1, indices = NULL, mask = NULL, mode = c("normal", "mmap", "bigvec", "filebacked") )
A NeuroVol when the input is effectively 3D (or when
NeuroVol
type = "vol"), otherwise a NeuroVec/NeuroVecSeq.
type = "vol"
NeuroVec
NeuroVecSeq
Character vector of file paths.
One of "auto", "vol", or "vec" to override dispatch.
"auto"
"vol"
"vec"
Volume index to use when returning a NeuroVol or when you want to load a subset of volumes while still returning a NeuroVec.
Optional vector of indices passed through to read_vec.
Optional mask passed to read_vec.
IO mode forwarded to read_vec.
vol <- read_image(system.file("extdata", "global_mask2.nii.gz", package = "neuroim2")) vec <- read_image(system.file("extdata", "global_mask_v4.nii", package = "neuroim2"))
Run the code above in your browser using DataLab