Open jjjermiah opened 16 hours ago
files = ( file.absolute() for file in glob_method(pattern) if _is_valid_dicom(file, check_header) and (not search_input or all(term in str(file.as_posix()) for term in search_input)) )
in https://github.com/bhklab/med-imagetools/blob/07a41fe073f9ce6a88aaa032caf69a7fb6086314/src/imgtools/dicom/utils.py#L37-L151
rationale:
if provided search input to filter by, then it doesnt make sense to check if _is_valid_dicom first for efficiency
in https://github.com/bhklab/med-imagetools/blob/07a41fe073f9ce6a88aaa032caf69a7fb6086314/src/imgtools/dicom/utils.py#L37-L151