A class used to produce a MappedNeuroVec
instance. It encapsulates
the necessary information to create a memory-mapped representation of a 4D neuroimaging dataset.
Creates a MappedNeuroVecSource
object that manages the memory
mapping between a neuroimaging file and memory space. This is typically used internally
by MappedNeuroVec
but can be created directly for custom access patterns.
Value
A new MappedNeuroVecSource
object containing:
Meta information about the dataset
File format details
Dimensional information
Details
MappedNeuroVecSource acts as a factory for MappedNeuroVec objects. While it doesn't have any additional slots beyond its parent class, it specifies the intent to create a memory-mapped representation of the neuroimaging data. This class is typically used in data loading pipelines where large datasets need to be accessed efficiently without loading the entire dataset into memory.
Create a Memory-Mapped Source for Neuroimaging Data
The function performs several important checks:
Validates file existence and permissions
Reads and validates header information
Ensures proper dimensionality (>= 3D)
Verifies file format compatibility
Inheritance
MappedNeuroVecSource
inherits from:
NeuroVecSource
: Base class for NeuroVec source objects
See also
MappedNeuroVec
for the main user interface,
read_header
for header reading details
Examples
if (FALSE) { # \dontrun{
# Create a MappedNeuroVecSource
mapped_source <- new("MappedNeuroVecSource")
# Use the source to create a MappedNeuroVec (pseudo-code)
# file_path <- "/path/to/large/brain/image.nii"
# mapped_vec <- create_mapped_neuro_vec(mapped_source, file_path)
} # }
if (FALSE) { # \dontrun{
# Create source from NIFTI file
source <- MappedNeuroVecSource("path/to/fmri.nii")
# Check dimensions
dim(source@meta_info)
# View header information
str(source@meta_info)
} # }