Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Francesco Sforazzini
XnatUtils
Commits
2bd00cf2
Commit
2bd00cf2
authored
Apr 27, 2017
by
Francesco Sforazzini
Browse files
debugging strip_name option in xnat-get
parent
4bb0b6dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
xnatutils.py
View file @
2bd00cf2
...
...
@@ -224,10 +224,10 @@ def get(session, download_dir, scans=None, data_format=None,
target_dir
,
scan_label
+
target_ext
)
os
.
mkdir
(
tmp_path
)
for
i
,
f
in
enumerate
(
dcmfiles
):
tmp_src_path
=
os
.
path
.
join
(
src_path
,
f
)
dcm_num
=
int
(
f
.
split
(
'-'
)[
-
2
])
tmp_src_path
=
os
.
path
.
join
(
src_path
,
f
)
tmp_target_path
=
os
.
path
.
join
(
tmp_path
,
str
(
i
+
1
).
zfill
(
4
)
+
'.dcm'
)
tmp_path
,
str
(
dcm_num
).
zfill
(
4
)
+
'.dcm'
)
shutil
.
move
(
tmp_src_path
,
tmp_target_path
)
else
:
shutil
.
move
(
src_path
,
target_path
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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