This function loads the image data from a NeuroVecSource object, handling various dimensionalities and applying any necessary transformations.
# S4 method for MappedNeuroVecSource
load_data(x)# S4 method for NeuroVecSource
load_data(x)
# S4 method for NeuroVolSource
load_data(x)
# S4 method for SparseNeuroVecSource
load_data(x)
a DenseNeuroVec object
The NeuroVecSource object containing the image metadata and file information.
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.
NeuroVecSource, DenseNeuroVec, NeuroSpace