Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MPBA Radiomics
RADLER
Commits
2d97a800
Commit
2d97a800
authored
Mar 16, 2020
by
Alessia Marcolini
Browse files
Add AUCCSH and fix features numeration
parent
638743ae
Changes
1
Show whitespace changes
Inline
Side-by-side
pyradiomics_radler/myfirstorder.py
View file @
2d97a800
...
...
@@ -62,7 +62,7 @@ class MyRadiomicsFirstOrder(MyRadiomicsFeaturesBase):
def
getTLGFeatureValue
(
self
):
r
"""
**2
1
. TLG**
**2
2
. TLG**
Total lesion glycolysis.
Defined as
...
...
@@ -83,3 +83,46 @@ class MyRadiomicsFirstOrder(MyRadiomicsFeaturesBase):
return
numpy
.
mean
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)])
*
volume
def
getAUCCSHFeatureValue
(
self
):
r
"""
**23. Inactive volume **
Area under the curve of the cumulative SUV-volume histogram describing the percentage
of total tumour volume above a percentage threshold of maximum SUV, as defined by van Velden et al.
.. note::
Extracted from PET scans and not used in the CT feature set.
"""
nBins
=
1000
# By default
ROIPet
=
self
.
imageArray
mask
=
self
.
maskArray
ROIPet
[
~
mask
]
=
numpy
.
nan
outliers
=
numpy
.
where
(
ROIPet
>
(
numpy
.
mean
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)])
+
3
*
numpy
.
std
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)])
)
)[
0
]
good_voxels
=
numpy
.
where
(
ROIPet
<=
(
numpy
.
mean
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)])
+
3
*
numpy
.
std
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)])
)
)[
0
]
ROIPet
[
outliers
]
=
numpy
.
mean
(
ROIPet
[
good_voxels
])
ROIPet
=
ROIPet
-
numpy
.
min
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)])
ROIPet
=
ROIPet
/
numpy
.
max
(
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)])
volume
=
ROIPet
[
~
numpy
.
isnan
(
ROIPet
)]
nVoxel
=
len
(
volume
)
bins
,
_
=
numpy
.
histogram
(
volume
,
nBins
)
csh
=
numpy
.
flipud
(
numpy
.
cumsum
(
numpy
.
flipud
(
bins
))
/
nVoxel
)
return
numpy
.
sum
(
csh
/
nBins
)
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