load_data,MappedNeuroVecSource-method {neuroim2} | R Documentation |
Load image data from a NeuroVecSource object
Description
This function loads the image data from a NeuroVecSource object, handling various dimensionalities and applying any necessary transformations.
Usage
## S4 method for signature 'MappedNeuroVecSource'
load_data(x)
## S4 method for signature 'NeuroVecSource'
load_data(x)
## S4 method for signature 'NeuroVolSource'
load_data(x)
## S4 method for signature 'SparseNeuroVecSource'
load_data(x)
Arguments
x |
The NeuroVecSource object containing the image metadata and file information. |
Details
This method performs the following steps: 1. Validates the dimensionality of the metadata. 2. Reads the image data using RNifti. 3. Handles 5D arrays by dropping the 4th dimension if it has length 1. 4. Applies slope scaling if present in the metadata. 5. Constructs a NeuroSpace object with appropriate dimensions and spatial information. 6. Creates and returns a DenseNeuroVec object, handling both 3D and 4D input arrays.
Value
a DenseNeuroVec object
Note
This method currently only supports NIfTI file format through RNifti.
See Also
NeuroVecSource
, DenseNeuroVec
, NeuroSpace