# Create a file-backed vector from a NIFTI file
fbvec <- FileBackedNeuroVec(system.file("extdata", "global_mask_v4.nii", package = "neuroim2"))
# Access specific volumes without loading entire dataset
first_vol <- sub_vector(fbvec, 1)
Run the code above in your browser using DataLab