-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Voxel extraction GLSZM fails [FEAT EXTRACTION] #617
Comments
It appears to be failing in the C extension. There were some bugs in the code that are not yet part of the official release, but I don't think they apply here. Can you share an example image and mask to debug this issue? As to the additional time required, this is to be expected, as features and matrices are calculated for each voxel separately, and not just once for the entire ROI. |
Here is the image and mask to test. |
I was wondering if there are any updates on the issue? thanks |
Great news. Looking forward to test it soon. |
@kingaber, the fix is now merged in the master branch. However, I'm currently unable to make a new release due to a (different) issue in the Mac testing CI (using TravisCI). You can try to compile PyRadiomics from source by checking out the current master of this repository and running |
Describe the bug
(1) I can compute all voxel features, but GLSZM fails in my data set. Why is GLSZM different? Do I need to change some settings?
(2) Why extraction of features (e.g. GLSZM statistics, which are extracted from computed arrays) takes 1 second, while computing voxel feature arrays takes a long time? How to define the optimum voxelBatch for the system setting?
PyRadiomics configuration
imageType:
Original: {}
featureClass:
glcm:
glrlm:
glszm:
gldm:
ngtdm:
setting:
binWidth: 12
label: 1
voxelSetting:
kernelRadius: 2
maskedKernel: false
initValue: nan
voxelBatch: 5000
PyRadiomics log file
INFO:radiomics.featureextractor: Loading parameter file C:\Users\me\mypath\R2B12.yaml
DEBUG:radiomics.featureextractor: Parameters parsed, input is valid.
DEBUG:radiomics.featureextractor: Applying settings
DEBUG:radiomics.featureextractor: Enabled image types: {'Original': {}}
DEBUG:radiomics.featureextractor: Enabled features: {'glszm': None}
DEBUG:radiomics.featureextractor: Settings: {'binWidth': 12, 'label': 1}
INFO:radiomics.featureextractor: Starting voxel based extraction
INFO:radiomics.featureextractor: Calculating features with label: 1
DEBUG:radiomics.featureextractor: Enabled images types: {'Original': {}}
DEBUG:radiomics.featureextractor: Enabled features: {'glszm': None}
DEBUG:radiomics.featureextractor: Current settings: {'minimumROIDimensions': 2, 'minimumROISize': None, 'normalize': False, 'normalizeScale': 1, 'removeOutliers': None, 'resampledPixelSpacing': None, 'interpolator': 'sitkBSpline', 'preCrop': False, 'padDistance': 5, 'distances': [1], 'force2D': False, 'force2Ddimension': 0, 'resegmentRange': None, 'label': 1, 'additionalInfo': True, 'binWidth': 12, 'kernelRadius': 2, 'maskedKernel': False, 'initValue': 'nan', 'voxelBatch': 5000, 'voxelBased': True}
INFO:radiomics.featureextractor: Loading image and mask
DEBUG:radiomics.imageoperations: Force casting mask to UInt32 to ensure correct datatype.
DEBUG:radiomics.imageoperations: Checking mask with label 1
DEBUG:radiomics.imageoperations: Calculating bounding box
DEBUG:radiomics.imageoperations: Checking minimum number of dimensions requirements (2)
DEBUG:radiomics.featureextractor: Image and Mask loaded and valid, starting extraction
DEBUG:radiomics.featureextractor: Creating image type iterator
INFO:radiomics.featureextractor: Adding image type "Original" with custom settings: {}
DEBUG:radiomics.featureextractor: Extracting features
DEBUG:radiomics.imageoperations: Yielding original image
INFO:radiomics.featureextractor: Calculating features for original image
DEBUG:radiomics.imageoperations: Cropping to size [15 49 40]
INFO:radiomics.featureextractor: Computing glszm
DEBUG:radiomics.glszm: Initializing feature class
DEBUG:radiomics.imageoperations: Discretizing gray levels inside ROI
DEBUG:radiomics.imageoperations: Calculated 21 bins for bin width 12 with edges: [-156. -144. -132. -120. -108. -96. -84. -72. -60. -48. -36. -24.
-12. 0. 12. 24. 36. 48. 60. 72. 84. 96.])
DEBUG:radiomics.glszm: Calculating voxel batch no. 1/4
DEBUG:radiomics.glszm: Calculating GLSZM matrix in C
Version (please complete the following information):
The text was updated successfully, but these errors were encountered: