Exception thrown in SimpleITK ImageFileReader_Execute: D:\a\1\sitk\Code\IO\src\sitkImageReaderBase.cxx:97: sitk::ERROR: The file "cyst38-0117.dcm" does not exist.
原因:
SimpleITK错误,sitk.ReadImage未设置路径
原代码:
itk_img = sitk.ReadImage(image_name)
修改后代码:
itk_img = sitk.ReadImage(os.path.join(dir_path ,image_name))
再有就是修改路径中“/”与"\"一致