Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yaoyuping
nnDetection
Commits
73c0a226
Commit
73c0a226
authored
Jun 13, 2022
by
Baumgartner, Michael
Browse files
dot fix
parent
abb61378
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
nndet/io/paths.py
nndet/io/paths.py
+5
-1
No files found.
nndet/io/paths.py
View file @
73c0a226
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment