报错详情:
ValueError: Image/Mask geometry mismatch. Potential fix: increase tolerance using geometryTolerance, see Documentation:Usage:Customizing the Extraction:Settings:geometryTolerance for more information
Traceback (most recent call last):
File "D:\project\mri_svm\4_feature_extraction.py", line 29, in <module>
result = extractor.execute(mri_path, label_path) # 提取特征
File "D:\Anaconda\envs\jspt\lib\site-packages\pyradiomics-3.0.1.post15+g2791e23-py3.9-win-amd64.egg\radiomics\featureextractor.py", line 276, in execute
boundingBox, correctedMask = imageoperations.checkMask(image, mask, **_settings)
File "D:\Anaconda\envs\jspt\lib\site-packages\pyradiomics-3.0.1.post15+g2791e23-py3.9-win-amd64.egg\radiomics\imageoperations.py", line 243, in checkMask
raise ValueError('Image/Mask geometry mismatch. Potential fix: increase tolerance using geometryTolerance, '
ValueError: Image/Mask geometry mismatch. Potential fix: increase tolerance using geometryTolerance, see Documentation:Usage:Customizing the Extraction:Settings:geometryTolerance for more information
解决方法:
参考官方文档中关于setting的介绍:Customizing the Extraction
在参数文件 Params.yaml 中的 setting: 部分添加 geometryTolerance 参数,见代码段最后一行。
setting:
binWidth: 25
label: 1
interpolator: 'sitkBSpline'
resampledPixelSpacing:
weightingNorm:
geometryTolerance: 1e-5
geometryTolerance参数默认为1e-16, 根据需要改大一些。
更多推荐
pyradiomics特征提取报错‘Image/Mask geometry mismatch. ‘
发布评论