Creates a new `H5ClusterRun` 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).
See also
Other H5Cluster:
$,H5ClusterExperiment-method
,
H5ClusterExperiment
,
H5ClusterExperiment-class
,
H5ClusterRun-class
,
H5ClusterRunSummary-class
,
H5ClusteredArray-class
,
[,H5ClusterRun,ANY,ANY,ANY-method
,
[,H5ClusterRun,ANY,missing,ANY-method
,
as.data.frame()
,
as.matrix()
,
close()
,
cluster_metadata,H5ClusterExperiment-method
,
clusters()
,
dim()
,
h5file,H5ClusteredArray-method
,
linear_access-methods
,
make_run_summary()
,
mask()
,
matrix_concat()
,
n_scans,H5ClusterExperiment-method
,
scan_metadata,H5ClusterExperiment-method
,
scan_names,H5ClusterExperiment-method
,
series()
,
series_concat()
,
show,H5ClusterRun-method
Examples
if (FALSE) { # \dontrun{
# Note: This function is deprecated in favor of H5ClusterRun()
# Create temporary HDF5 file
temp_file <- tempfile(fileext = ".h5")
exp_file <- fmristore:::create_minimal_h5_for_H5ClusterExperiment(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)
} # }