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.16k stars 499 forks source link

[BUG]ImportError: cannot import name 'getFeatureClasses' from 'radiomics' (unknown location) #647

Closed markvvw closed 4 years ago

markvvw commented 4 years ago

Describe the bug A clear and concise description of what the bug is. Please check FAQ section, PyRadiomics issues and PyRadiomics Slicer Discourse to check if your bug has been encountered before. If so, but you still require additional help, please reference related issues.

PyRadiomics configuration Add any customization you applied here (i.e. the content of the parameter file used)

PyRadiomics log file If available, add section of the PyRadiomics log showing your error. For help on setting up logging, see the online documentation

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Version (please complete the following information):

Additional context Add any other context about the problem here.

JoostJM commented 4 years ago

Can you add some additional information (preferably the stack trace that ended with this error)

Can you import featureextractor from radiomics? It is possible you have a second package radiomics installed, which does not have these attributes. If that is so, please uninstall that package to allow Python to discover the correct pyradiomics package via import radiomics

markvvw commented 4 years ago

Can you add some additional information (preferably the stack trace that ended with this error)

Can you import featureextractor from radiomics? It is possible you have a second package radiomics installed, which does not have these attributes. If that is so, please uninstall that package to allow Python to discover the correct pyradiomics package via import radiomics

That problem had been solved.

What do the following warnings mean? Are there some influences to results? How to solved it? Calculating Local Binary Pattern in 2D, but extracting features in 3D. Use with caution! GLCM is symmetrical, therefore Sum Average = 2 * Joint Average, only 1 needs to be calculated

JoostJM commented 4 years ago

Both are warnings and not errors.

Calculating Local Binary Pattern in 2D, but extracting features in 3D. Use with caution!

This reflects your settings. PyRadiomics contains both the 'regular' local binary pattern, which is only defined in 2D, and local binary pattern 3D, which uses spherical harmonics. This warning is shown when using LBP in 2D, but extracting features in 3D.

GLCM is symmetrical, therefore Sum Average = 2 * Joint Average, only 1 needs to be calculated

When using a symmetrical GLCM, the value of GLCM_SumAverage is mathmatically equal to 2 * GLCM_JointAverage. Therefore only one of those features is needed as the other does not add any information (and will even have identical values after normalization of feature values)

markvvw commented 4 years ago

Both are warnings and not errors.

Calculating Local Binary Pattern in 2D, but extracting features in 3D. Use with caution!

This reflects your settings. PyRadiomics contains both the 'regular' local binary pattern, which is only defined in 2D, and local binary pattern 3D, which uses spherical harmonics. This warning is shown when using LBP in 2D, but extracting features in 3D.

GLCM is symmetrical, therefore Sum Average = 2 * Joint Average, only 1 needs to be calculated

When using a symmetrical GLCM, the value of GLCM_SumAverage is mathmatically equal to 2 * GLCM_JointAverage. Therefore only one of those features is needed as the other does not add any information (and will even have identical values after normalization of feature values)

Can first problem influence the results? How to avoid the warning?

JoostJM commented 4 years ago

The warnings don't affect the results. Currently it is not possible to disable these warning, but I'll see if I can update the code to emit the warning only once and add an option to disable entirely.

gechenyang2 commented 1 year ago

I also encountered this problem and couldn't solve it.

monteir03 commented 1 year ago

Can you add some additional information (preferably the stack trace that ended with this error) Can you import featureextractor from radiomics? It is possible you have a second package radiomics installed, which does not have these attributes. If that is so, please uninstall that package to allow Python to discover the correct pyradiomics package via import radiomics

That problem had been solved.

What do the following warnings mean? Are there some influences to results? How to solved it? Calculating Local Binary Pattern in 2D, but extracting features in 3D. Use with caution! GLCM is symmetrical, therefore Sum Average = 2 * Joint Average, only 1 needs to be calculated

how did you solve it?