qsirecon.utils.atlases module
Loading atlases
- qsirecon.utils.atlases.collect_atlases(datasets, atlases, bids_filters={})[source]
Collect atlases from a list of BIDS-Atlas datasets.
Selection of labels files and metadata does not leverage the inheritance principle. That probably won’t be possible until PyBIDS supports the BIDS-Atlas extension natively.
- Parameters:
datasets (dict of str:str or str:BIDSLayout pairs) – Dictionary of BIDS datasets to search for atlases.
atlases (list of str) – List of atlases to collect from across the datasets.
bids_filters (dict) – Additional filters to apply to the BIDS query. Only the “atlas” key is used.
- Returns:
atlas_cache – Dictionary of atlases with metadata. Keys are the atlas names, values are dictionaries with keys:
- ”dataset”str
Name of the dataset containing the atlas.
- ”image”str
Path to the atlas image.
- ”labels”str
Path to the atlas labels file.
- ”metadata”dict
Metadata associated with the atlas.
- ”xfm_to_anat”: str
Path to the transform to get the atlas into T1w/T2w space.
- Return type: