)# Remove everything else than letters from the name
# Get unique elements from tiff_stack_only_letters
unique_names=list(set(dicom_stack_only_letters))
iflen(unique_names)>1:
raiseValueError(
f"The provided part of the filename for the DICOM stack matches multiple DICOM stacks: {unique_names}.\nPlease provide a string that is unique for the DICOM stack that is intended to be loaded"
)
# dicom_list contains the dicom objects with metadata
# dicom_list contains the dicom objects with metadata