Sunny_Data_Conditioner.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:LVNet 作者: fperdigon 项目源码 文件源码
def load_contour(contour, img_path):
    filename = "IM-%s-%04d.dcm" % (SAX_SERIES[contour.case], contour.img_no)
    full_path = os.path.join(img_path, contour.case, filename)
    f = dicom.read_file(full_path)
    img = f.pixel_array.astype(np.int)
    ctrs = np.loadtxt(contour.ctr_path, delimiter=" ").astype(np.int)
    label = np.zeros_like(img, dtype="uint8")
    cv2.fillPoly(label, [ctrs], 1)
    return img, label
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号