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
41d68d4e
Commit
41d68d4e
authored
Mar 11, 2020
by
Alessia Marcolini
Browse files
Extract all files + suppress warnings
parent
f66b733a
Changes
1
Hide whitespace changes
Inline
Side-by-side
02_radiomics_features_extraction/extract_features_radiomics.py
View file @
41d68d4e
...
...
@@ -10,7 +10,9 @@ from pathlib import Path
from
tqdm
import
tqdm
from
multiproc
import
ListMultiprocessing
import
warnings
warnings
.
filterwarnings
(
"ignore"
)
# %%
DATASET
=
Path
(
'HN_val'
)
BBOX
=
'bbox_64'
...
...
@@ -20,12 +22,10 @@ SCAN_NAMES = ['CT', 'PT'] # you are lucky that CT scans are the first in the st
N_JOBS
=
32
N_BINS
=
[
8
,
16
,
32
,
64
]
PIXEL_SPACING
=
[
1.0
,
2.0
,
3.0
,
4.0
,
5.0
]
#%%
DATADIR
=
Path
(
'data'
)
/
DATASET
/
'processed'
/
'bbox'
/
BBOX
OUTDIR
=
Path
(
'data'
)
/
DATASET
/
'processed'
OUTFILE
=
f
'radiomics_features_
{
BBOX
}
_prova.csv'
# output file name
os
.
chdir
(
'..'
)
OUTFILE
=
f
'radiomics_features_
{
BBOX
}
.csv'
# output file name
clinical
=
pd
.
read_csv
(
Path
(
'data'
)
/
DATASET
/
'processed'
/
f
'clinical_
{
DATASET
}
.csv'
)
#%%
...
...
@@ -38,7 +38,7 @@ extractor_intensity = featureextractor.RadiomicsFeaturesExtractor(params_intensi
params_texture
=
'texture.yaml'
# param file to use to create the extractor
extractor_texture
=
featureextractor
.
RadiomicsFeaturesExtractor
(
params_texture
)
filenames
=
[
f
for
f
in
os
.
listdir
(
DATADIR
)
if
f
.
endswith
(
'.npy'
)]
[:
3
]
filenames
=
[
f
for
f
in
os
.
listdir
(
DATADIR
)
if
f
.
endswith
(
'.npy'
)]
exclude_list
=
[]
# 'HN-CHUM-011',
...
...
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