Discovers the available output spaces (MNI152NLin2009cAsym, fsaverage, etc.)
for a derivative dataset. Parses BIDS _space- entity from filenames.
Arguments
- derivative
A single-row tibble from
on_derivatives()output. Must contain columns:dataset_id,pipeline, andsource.- refresh
If
TRUE, bypass cache and fetch fresh data. Default isFALSEto use cached results.- client
An
openneuro_clientobject for API calls (embedded sources). IfNULL(default), creates a default client.
Value
A character vector of space names, sorted alphabetically. Common spaces include:
Volumetric: MNI152NLin2009cAsym, MNI152NLin6Asym, T1w
Surface: fsaverage, fsaverage5, fsaverage6, fsnative
Returns character(0) with a warning if no spaces are found.
Details
Space Discovery
This function samples derivative files and extracts the _space-<label>
entity from BIDS-formatted filenames. It does NOT infer T1w from files
without a space entity (per BIDS convention, native space files may
omit the space entity).
See also
on_derivatives() to discover available derivative datasets
Examples
if (FALSE) { # \dontrun{
# First, get available derivatives for a dataset
derivs <- on_derivatives("ds000102")
print(derivs)
# Then get spaces for the first derivative
spaces <- on_spaces(derivs[1, ])
print(spaces)
# Example output: c("MNI152NLin2009cAsym", "fsaverage")
# Force refresh of cached spaces
spaces <- on_spaces(derivs[1, ], refresh = TRUE)
} # }