Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MPBA Radiomics
RADLER
Commits
71bd2078
Commit
71bd2078
authored
Mar 06, 2020
by
Alessia Marcolini
Browse files
Save npy with filename given in clinical file
parent
8de02106
Changes
1
Hide whitespace changes
Inline
Side-by-side
preprocessing/extract_roi_volume.py
View file @
71bd2078
...
...
@@ -55,6 +55,7 @@ for i, row in tqdm(clinical.iterrows()):
try
:
patient
=
row
[
'patient'
]
filename_out
=
row
[
'filename'
]
roi_name
=
row
[
'ROI_name'
]
roi_modality
=
row
[
'ROI_modality'
]
...
...
@@ -105,7 +106,7 @@ for i, row in tqdm(clinical.iterrows()):
out
=
np
.
stack
([
sitk_to_numpy
(
scan_CT_box
),
sitk_to_numpy
(
scan_PT_box
)],
axis
=
0
)
# save
np
.
save
(
f
'
{
OUTDIR
}
/
{
patient
}
.npy'
,
out
)
np
.
save
(
OUTDIR
/
filename_out
,
out
)
del
scan_CT_box
,
scan_PT_box
,
segmentation
,
out
gc
.
collect
()
...
...
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