Creates a new `H5ParcellatedScan` object, representing a single run of full voxel-level clustered data from an HDF5 file.
It performs necessary validation and can read metadata like `n_time` directly from the HDF5 file attributes or metadata dataset.
Arguments
- file_source
Either an open `H5File` object or a character string path to the HDF5 file.
- scan_name
The character string name of the scan (e.g., "run1").
- mask
A `LogicalNeuroVol` object for the brain mask.
- clusters
A `ClusteredNeuroVol` object for cluster assignments.
- n_time
(Optional) The number of time points. If `NULL` (default), the function will attempt to read it from the HDF5 file attributes (e.g., `/scans/<scan_name>@n_time` or `/scans/<scan_name>/metadata/n_time`).
- compress
(Optional) Logical indicating compression status (metadata).
Examples
if (FALSE) { # \dontrun{
# Note: This function is deprecated in favor of H5ParcellatedScan()
# Create temporary HDF5 file
temp_file <- tempfile(fileext = ".h5")
exp_file <- fmristore:::create_minimal_h5_for_H5ParcellatedMultiScan(file_path = temp_file)
# Create mask and clusters
mask <- fmristore:::create_minimal_LogicalNeuroVol(dims = c(5, 5, 4))
clusters <- fmristore:::create_minimal_ClusteredNeuroVol(mask_vol = mask, num_clusters = 3)
# Create run object (deprecated - will show deprecation warning)
suppressWarnings({
run <- make_run_full(exp_file, scan_name = "Run1_Full", mask = mask, clusters = clusters)
})
# Clean up - note: make_run_full returns an object that doesn't own the file handle
unlink(temp_file)
} # }