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.14k stars 492 forks source link

[FEAT EXTRACTION] Perform slice-by-slice (2D) extraction from 3D ROI mask #741

Closed rcuocolo closed 2 years ago

rcuocolo commented 2 years ago

Is it possible through the parameter file settings to replicate what is reported in this paper's supplementary materials? In other words, for datasets with high variability on the Z axis, does it make sense to "average" 2D features across the lesion slices to obtain a final global value better representative for the entire lesion? If so, is there a way to obtain this data from PyRadiomics settings, or should each slice be employed as a distinct mask and averaged after the extraction? I am not entirely sure of the appropriateness of the method and if it could be easily implemented. Thanks in advance for any help.

JoostJM commented 2 years ago

IBSI mentions the option of calculating features on each slice, and then averaging the calculated feature values across slices to obtain the final value. This is not supported in PyRadiomics.

This is because this means that slices with few (or just one) voxels have as much weight in the final feature value as slices with many voxels. What PyRadiomics does support is "force2Dextraction". This computes a single feature value for all slices, but does so without using offsets that move in-between slices. This only affects texture features. In this way, you can allow for a large variation in Z axis, but still compute valid feature values for the entire ROI.

If you want to force the IBSI option, the only option I see would be to indeed make different ROIs for each slice and then computing the averages outside of the PyRadiomics workflow.

rcuocolo commented 2 years ago

Thank you for the clear answer. I did not know averaging features was a viable option, I'll keep it in mind as an alternative. For now I will use the 2D extraction option first to address the Z-axis variability problem.