MappedNeuroVecSource-class | R Documentation |
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.
MappedNeuroVecSource(file_name)
file_name |
Character string specifying the path to the neuroimaging file. Supported formats include NIFTI (.nii) and ANALYZE (.hdr/.img). |
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
A new MappedNeuroVecSource
object containing:
Meta information about the dataset
File format details
Dimensional information
MappedNeuroVecSource
inherits from:
NeuroVecSource
: Base class for NeuroVec source objects
MappedNeuroVec-class
for the resulting memory-mapped 4D neuroimaging data class.
MappedNeuroVec
for the main user interface
read_header
for header reading details
## Not run:
# Create a MappedNeuroVecSource
mapped_source <- new("MappedNeuroVecSource")
# Use the source to create a MappedNeuroVec (pseudo-code)
# file_path <- "/path/to/large/brain/image.dat"
# mapped_vec <- create_mapped_neuro_vec(mapped_source, file_path)
## End(Not run)
## Not run:
# Create source from NIFTI file
source <- MappedNeuroVecSource("path/to/fmri.nii")
# Check dimensions
dim(source@meta_info)
# View header information
str(source@meta_info)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.