prepare_file_dir_cli#
- prepare_file_dir_cli(img_input, output_path, file_types, mode, sub_dirname)[source]#
Prepares CLI for running code on multiple files or a directory.
Checks for existing directories to run tests. Converts file path to list of file paths or creates list of file paths if input is a directory.
- Parameters:
img_input (str or pathlib.Path) – file path to images.
output_path (str or pathlib.Path) – output directory path.
file_types (str) – file types to process using cli.
mode (str) – wsi or tile mode.
sub_dirname (str) – name of subdirectory to save output.
- Returns:
list of file paths to process. pathlib.Path: updated output path.
- Return type: