问题描述
在使用radiomics库进行抽取影像组学特征时,存在报错
报错: IndexError: arrays used as indices must be of integer (or boolean) type解决方法
这里参考了博主[pyradiomics 运行 extractor.execute 时报错 Indexerror]的方法(https://blog.csdn.net/qq_31297573/article/details/108988834)
具体报错地方如下图所示:
报错原因:
是因为numpy以emptyGrayLevels为索引从矩阵中删除灰度,但我所使用的python3.7会在计算emptyGrayLevels时(如下图所示)默认数据类型与index索引不同