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.18k stars 497 forks source link

[FEAT EXTRACTION] Quick question about 1. GLRLM and GLCM 2D/3D 2. 0+unknown #608

Closed Haoxin22 closed 4 years ago

Haoxin22 commented 4 years ago

Version (please complete the following information):

Hi,

I have 2 questions:

  1. after I checked the version, the versions is 0+unknown. However, I checked the feature extraction function, it name is "RadiomicsFeatureExtractor " but not "RadiomicsFeaturesExtractor", which supposed to be changed after 2.2.0. Therefore, I'm not sure what's my current version now. Would you mind answer how should I find the version?

image

I used" python -m pip install pyradiomics" to install the pyradiomics

  1. When I look into the document of GLCM and GLRLM, GLCM would have 3D/2D version by setting force2D=False/True. My question is that: when setting force2D=True, would GLRLM performs in 2D and when force2D=False, GLRLM performs in 3D?

Thanks

Haoxin22 commented 4 years ago

ALso, when I use conda to install it, it shows:

image

It seems like telling me that Pyradiomics is only compatible with python 3.8.*? Is that corrrect?

sqzhang-jeremy commented 4 years ago

I have met the version and conda problem with u. I am gonna to try again with lower pyradiomics version. image

JoostJM commented 4 years ago

Conda deployment of PyRadiomics is currently throwing an error and is under investigation. In any case, it is not distributed for python 3.8 (yet). My advise is to install using pip, using python 3.5, 3.6 or 3.7. Any other version requires you to compile the C extensions of PyRadiomics yourself (i.e. building from source), but this can be non-trivial, as your C compilers must be set up correctly for python to use.

As to question 1) No idea, the version 0+unknown means that during installation, no version information was available. This is the case when the repository is downloaded as zip file and then installed using setup.py. This is due to the fact that PyRadiomics gets its version information from the git part of the repository, which is not included in the zip file (when installing form the repository, ensure it's a cloned version and not a zip snapshot to prevent this error). The only way to retrace the specific version would be to compare source files.

As to question 2) Yes in a way. The full 3D mask is used in both cases, but in the 2D case, offsets moving between slices are ignored, meaning that voxels on adjacent slices are not considered neigbors. This allows you to extract meaningfull features even in cases where voxels are only isotropic in-plance, with a different slice thickness (common in MRI images). The radiomics features assume isotropy of voxel spacing, so when extracting in 3D, spacing must be made uniform and isotropic by applying resampling.