Load image data from a NeuroVecSource object
Source:R/mapped_neurovec.R
, R/neurovec.R
, R/neurovol.R
, and 1 more
load_data-methods.Rd
This function loads the image data from a NeuroVecSource object, handling various dimensionalities and applying any necessary transformations.
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.
Examples
if (FALSE) { # \dontrun{
# Assuming 'source' is a valid NeuroVecSource object
vec_data <- load_data(source)
} # }