Skip to content
GitLab
Menu
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()):
...
@@ -55,6 +55,7 @@ for i, row in tqdm(clinical.iterrows()):
try
:
try
:
patient
=
row
[
'patient'
]
patient
=
row
[
'patient'
]
filename_out
=
row
[
'filename'
]
roi_name
=
row
[
'ROI_name'
]
roi_name
=
row
[
'ROI_name'
]
roi_modality
=
row
[
'ROI_modality'
]
roi_modality
=
row
[
'ROI_modality'
]
...
@@ -105,7 +106,7 @@ for i, row in tqdm(clinical.iterrows()):
...
@@ -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
)
out
=
np
.
stack
([
sitk_to_numpy
(
scan_CT_box
),
sitk_to_numpy
(
scan_PT_box
)],
axis
=
0
)
# save
# save
np
.
save
(
f
'
{
OUTDIR
}
/
{
patient
}
.npy'
,
out
)
np
.
save
(
OUTDIR
/
filename_out
,
out
)
del
scan_CT_box
,
scan_PT_box
,
segmentation
,
out
del
scan_CT_box
,
scan_PT_box
,
segmentation
,
out
gc
.
collect
()
gc
.
collect
()
...
...
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