Skip to main content

Module path_builder

Module path_builder 

Source
Expand description

Build BIDS-compliant file paths from entity key-value pairs.

Uses configurable patterns with optional sections ([/ses-{session}]), value constraints ({suffix<T1w|T2w>}), and defaults ({datatype|anat}) to construct paths that conform to BIDS naming conventions.

Functionsยง

build_path
Build a file path given entities and a list of path patterns.
build_path_multi
Build potentially multiple paths when entities contain list values.
build_paths_expanded
Build paths with entity expansion: when entities map to Vec of values, produce Cartesian product of all combinations.
expand_options
Expand bracket options in value strings.