Hi everyone,
I would like extract voxel-based features from a CT volume within a labelmap.
I am able to extract segment-based feature but when when I try to compute voxel-based ones 3D Slicer crashes.
To reproduce the problem I load the CT volume and the labelmap downloadable from the following link.
https://drive.google.com/drive/folders/1y6eD2EAsd8guWLX6QJkJgClTHDGCpY-q?usp=sharing
Then I copy the following code directly in the python interactor
from radiomics.featureextractor import RadiomicsFeatureExtractor
import six
import sitkUtils
inputVolumeNode = getNode('/path/to/CT_volume.nrrd')
inputImage = sitkUtils.PullVolumeFromSlicer(inputVolumeNode)
inputLabelMaskNode = getNode('/path/to/Candidate_lesions-label.nrrd')
inputMask = sitkUtils.PullVolumeFromSlicer(inputLabelMaskNode)
parameter_file = '/path/to/param_sk_modif.yaml'
extractor = RadiomicsFeatureExtractor(parameter_file)
"""
the following works but is not what I need
"""
result = extractor.execute(inputImage, inputMask)
for key, val in six.iteritems(result):
print("\t%s: %s" %(key, val))
"""
the following crashes at the next line
"""
result = extractor.execute(inputImage, inputMask, voxelBased=True)
for key, val in six.iteritems(result):
if isinstance(val, sitk.Image): # Feature map
sitk.WriteImage(val, key + '.nrrd', True)
print("Stored feature %s in %s" % (key, key + ".nrrd"))
else: # Diagnostic information
print("\t%s: %s" %(key, val))
Any suggestion for the reason of the crash? I tried to check the log file but no errors were reported.
Thanks!