Commit 2d97a800 authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Add AUCCSH and fix features numeration

parent 638743ae
......@@ -62,7 +62,7 @@ class MyRadiomicsFirstOrder(MyRadiomicsFeaturesBase):
def getTLGFeatureValue(self):
r"""
**21. TLG**
**22. 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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment