AIM-Harvard / pyradiomics

Open-source python package for the extraction of Radiomics features from 2D and 3D images and binary masks. Support: https://discourse.slicer.org/c/community/radiomics
http://pyradiomics.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.15k stars 495 forks source link

[FEAT EXTRACTION] Error when calculating GLSZM matrix #801

Closed akac0297 closed 1 year ago

akac0297 commented 1 year ago

I am attempting to run radiomics on some images and for some (z-score normalised) images for two patients, bin counts of 64, 128, and 256 do not run (bin counts of 32 and no binning seemed to work fine, and the images which are not normalised also work fine). My code gets killed after the message "Calculating GLSZM matrix in C" in the debugging logger. This could possibly be a memory error but I'm not sure if this is the case as I'm cropping the images and masks prior to creating the extractor and also casting the cropped image to an 8-bit integer data type. Is there a way to get more detail on the error occurring? If this is a memory error is there anything I can do to get the code to run with these binCounts? Thanks for any advice.

Version

akac0297 commented 1 year ago

This issue appears to have been solved by scaling the image (multiplying by 100 when calculating the z-score normalised image). Edit: The error was actually likely due to the Cast step which converted the image to an integer data type before normalising it.