dicom3d.data package¶
-
dicom3d.data.
walk_data
(base, pattern, search_files=True, search_dirs=False)[source]¶ Enuerates the files in data directory
-
dicom3d.data.
select_file
(base_dir, pattern, search_files, search_dirs, selection_name, truncate_abspath=True)[source]¶ Enumerates all files and folders starting from base_dir and prints to the console file options matching given pattern, waiting for the user to interactively select a file.
If the user aborted the process, the function will run exit to abort the program.
Parameters: - base_dir (str) – base directory to start search from
- pattern (str) – wildcard pattern to select files or folders (e.g. *.dcm)
- search_files (bool) – True to add files to the resulted list
- search_dirs (bool) – True to add directories to the resulted list
- truncate_abspath (bool, optional) – option to truncate base_dir from the printed paths
Returns: the path to the selected file
Return type: str