【影像组学pyradiomics教程】 (二) pyradiomics 使用示例
import radiomics
import as FEE
# 文件名
main_path = '.'
ori_name = r'\brain1_image.nrrd'
lab_name = r'\brain1_label.nrrd'
para_name = r'\'
# 文件全部路径
ori_path = main_path + ori_name
lab_path = main_path + lab_name
para_path = main_path + para_name
print("originl path: " + ori_path)
print("label path: " + lab_path)
print("parameter path: " + para_path)
# 使用配置文件初始化特征抽取器
extractor = (para_path)
print ("Extraction parameters:\n\t", )
print ("Enabled filters:\n\t", extractor._enabledImagetypes)
print ("Enabled features:\n\t", extractor._enabledFeatures)
# 运行
result = (ori_path,lab_path) #抽取特征
print ("Result type:", type(result)) # result is returned in a Python ordered dictionary
print ("")
print ("Calculated features")
for key, value in (): #输出特征
print ("\t", key, ":", value)