This function allows you to import a bundle from one of the available datasets by specifying
the dataset and the bundle name. Available datasets can be queried using available_datasets().
Available bundles for a given dataset can be queried using available_bundles(), which
will return the list of bundles in the specified dataset. For multi-subject datasets (e.g.
"TractSeg"), the subjects argument controls which subjects are loaded. For single-atlas
datasets (e.g. "HCP1065"), subjects is ignored.
Arguments
- dataset
A string specifying the dataset to import the bundle from. Currently
"HCP1065"and"TractSeg"are supported.- bundle
A string specifying the bundle to import. Must be one of the names returned by
available_bundles()for the chosen dataset.- subjects
Controls which subjects are loaded for multi-subject datasets (ignored for
"HCP1065"). Four forms are accepted:NULL(default)All available subjects are loaded and returned as a fiber::bundle_set.
- An integer scalar
n nsubjects are drawn at random (without replacement) and returned as a fiber::bundle_set.- A character vector of length > 1
The bundles for those subject IDs are returned as a fiber::bundle_set.
- A character scalar
The bundle for that single subject ID is returned directly as a fiber::bundle object.
Value
For "HCP1065", or for "TractSeg" with a scalar character subjects value: an
object of class fiber::bundle. For "TractSeg" with subjects = NULL, an integer, or a
character vector of length > 1: a fiber::bundle_set with one bundle per subject.
HCP1065
A population-averaged tractography atlas based on 1,065 HCP subjects. See HCP1065 for full details, source, and references.
Examples
bdl <- import_bundle("HCP1065", "Left Cranial Nerve VII")
if (FALSE) { # \dontrun{
# Single subject
bdl <- import_bundle("TractSeg", "Left Arcuate Fasciculus", subjects = "599469")
# Random sample of 10 subjects — returns a bundle_set
bdls <- import_bundle("TractSeg", "Left Arcuate Fasciculus", subjects = 10L)
# Specific subjects by ID — returns a bundle_set
bdls <- import_bundle("TractSeg", "Left Arcuate Fasciculus", subjects = c("599469", "613538"))
} # }