View source: R/filebacked_neurovec.R
FileBackedNeuroVec | R Documentation |
Constructs a FileBackedNeuroVec
instance, which represents a file-backed
neuroimaging vector object. This constructor provides memory-efficient access to large
neuroimaging datasets by keeping the data on disk until needed.
FileBackedNeuroVec(file_name, label = basename(file_name))
file_name |
A character string specifying the path to the neuroimaging file. Supported formats include NIFTI (.nii) and ANALYZE (.hdr/.img). |
label |
Optional character string providing a label for the vector |
Create a FileBackedNeuroVec Object
The function performs the following operations:
Reads the header information from the specified file
Validates the dimensionality (must be 4D data)
Creates a NeuroSpace
object with appropriate metadata
Initializes the file-backed vector with minimal memory footprint
A new instance of class FileBackedNeuroVec
.
NeuroSpace
for spatial metadata management
read_header
for header information extraction
sub_vector
for data access methods
## Not run:
# Create a file-backed vector from a NIFTI file
fbvec <- FileBackedNeuroVec("path/to/fmri_data.nii")
# Access specific volumes without loading entire dataset
first_vol <- sub_vector(fbvec, 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.