Commit fa058b89 authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Fix Inactive Volume for constant volumes

parent d8815d99
import numpy
from scipy import ndimage
from oct2py import Oct2Py, Oct2PyError
from scipy import ndimage
from radiomics.firstorder import RadiomicsFirstOrder
from .mybase import MyRadiomicsFeaturesBase
......@@ -234,12 +235,12 @@ class MyRadiomicsFirstOrder(MyRadiomicsFeaturesBase):
a threshold of 0.01 × (SUVmax)^2 followed by closing and opening morphological operations were used
to differentiate active and inactive regions on FDG-PET scans
- input: 3D array representing the PET volume in SUV format, with
voxels outside the ROI set to NaNs.
- input: 3D array representing the PET volume in SUV format
.. note::
Extracted from PET scans and not used in the CT feature set.
ROIPet = self.imageArray
mask = self.maskArray
......@@ -298,6 +299,8 @@ class MyRadiomicsFirstOrder(MyRadiomicsFeaturesBase):
connObjects = oc.bwconncomp(new_mask, 26)
if int(connObjects.NumObjects) > 1:
b = numpy.zeros((1, int(connObjects.NumObjects)))
for i in range(int(connObjects.NumObjects)):
......@@ -319,6 +322,8 @@ class MyRadiomicsFirstOrder(MyRadiomicsFeaturesBase):
sumInactive = 0
sumVolume = numpy.sum(mask)
except Oct2PyError as e:
Supports Markdown
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