需要安装OpenCV和SimpleItk。
SimpleItk比较简单,直接pip install SimpleItk即可。
代码如下:
#coding:utf-8
import SimpleITK as sitk
import cv2
#LKDS-00058,-102.655469971,108.188810974,438.759994507,12.2279986879
if __name__ == '__main__':
filename = F:/cancer_solution/data/train_subset00/LKDS-00058.mhd
ds = sitk.Rea
1