zhangjingcode / RadiomicsFeatureVisualization

Visualization for radiomics feature generated by pyradiomics
46 stars 8 forks source link

FeatureMapByClass.py运行报错 #6

Closed 188-99 closed 1 year ago

188-99 commented 1 year ago

作者您好,我运行FeatureMapByClass.py文件是总是提醒引用错误,似乎是SKMRradiomics中init中出现循环引用,按照搜索的方法瞎改一通,也总是报错,提醒no module named SKMRradiomics之类的。 打扰了,期待您的回复。

zhangjingcode commented 1 year ago

您可以试着把SKMRRadimics改成Radiomics库试试,SKMRRadimics这里我只是额外做了滤波器的保存。

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: 188-99 @.> 发送时间: 2023年3月16日 16:04 收件人: zhangjingcode/RadiomicsFeatureVisualization @.> 抄送: Subscribed @.***> 主题: Re: [zhangjingcode/RadiomicsFeatureVisualization] FeatureMapByClass.py运行报错 (Issue #6)

作者您好,我运行FeatureMapByClass.py文件是总是提醒引用错误,似乎是SKMRradiomics中init中出现循环引用,按照搜索的方法瞎改一通,也总是报错,提醒no module named SKMRradiomics之类的。 打扰了,期待您的回复。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

188-99 commented 1 year ago

万分感谢您的及时回复,我来来试试您说的方法。

Spinexiang commented 1 month ago

I think I'm having the same issue, running FeatureMapByClass.py is having a circular reference issue,

Error loading C extensions
Traceback (most recent call last):
  File "E:\Code\RadiomicsFeatureVisualization\SKMRradiomics\__init__.py", line 273, in <module>
    from . import _cmatrices as cMatrices  # noqa: F401
ImportError: cannot import name '_cmatrices' from partially initialized module 'SKMRradiomics' (most likely due to a circular import) (E:\Code\RadiomicsFeatureVisualization\SKMRradiomics\__init__.py)
Traceback (most recent call last):
  File "E:\Code\RadiomicsFeatureVisualization\FeatureMapByClass.py", line 24, in <module>
    from SKMRradiomics import featureextractor
  File "E:\Code\RadiomicsFeatureVisualization\SKMRradiomics\__init__.py", line 284, in <module>
    raise e
  File "E:\Code\RadiomicsFeatureVisualization\SKMRradiomics\__init__.py", line 273, in <module>
    from . import _cmatrices as cMatrices  # noqa: F401
ImportError: cannot import name '_cmatrices' from partially initialized module 'SKMRradiomics' (most likely due to a circular import) (E:\Code\RadiomicsFeatureVisualization\SKMRradiomics\__init__.py)

And I changed the import part as the author mentioned

Then, there show as follow:

Traceback (most recent call last):
  File "E:\Code\RadiomicsFeatureVisualization\FeatureMapByClass.py", line 292, in <module>
    main()
  File "E:\Code\RadiomicsFeatureVisualization\FeatureMapByClass.py", line 281, in main
    feature_mapper.generate_feature_map(str(img_path), str(roi_path), 1, features_name_list, str(store_path))
  File "E:\Code\RadiomicsFeatureVisualization\FeatureMapByClass.py", line 219, in generate_feature_map
    extractor = featureextractor.RadiomicsFeaturesExtractor(parameter_path, self.store_path, **setting_dict)
AttributeError: module 'radiomics.featureextractor' has no attribute 'RadiomicsFeaturesExtractor'

Look into the code of featureextractor, actually there is the class named 'RadiomicsFeatureExtractor'

So I think may be version update issue.