Commit 73c0a226 authored by Baumgartner, Michael's avatar Baumgartner, Michael
Browse files

dot fix

parent abb61378
...@@ -171,7 +171,11 @@ def get_case_id_from_file(file_name: str, remove_modality: bool = True) -> str: ...@@ -171,7 +171,11 @@ def get_case_id_from_file(file_name: str, remove_modality: bool = True) -> str:
Returns: Returns:
str: name of file without ending str: name of file without ending
""" """
file_name = file_name.split('.')[0] if file_name.endswith(".nii.gz"):
file_name = file_name.rsplit(".", 2)[0]
else:
file_name = file_name.rsplit(".", 1)[0]
if remove_modality: if remove_modality:
file_name = file_name[:-5] file_name = file_name[:-5]
return file_name return file_name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment