iseg_luna3_lub_222f.py 文件源码

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

项目:kaggle_dsb2017 作者: astoc 项目源码 文件源码
def create_nodule_mask_subset(luna_subset):

    LUNA_DIR = LUNA_BASE_DIR % luna_subset
    files = glob.glob(''.join([LUNA_DIR,'*.mhd']))
    annotations =    pd.read_csv(LUNA_ANNOTATIONS)
    annotations.head()

    file = "../luna/original_lungs/subset0/1.3.6.1.4.1.14519.5.2.1.6279.6001.564534197011295112247542153557.mhd"
    for file in files:
        imagePath = file
        seriesuid =  file[file.rindex('/')+1:]  # everything after the last slash
        seriesuid = seriesuid[:len(seriesuid)-len(".mhd")]  # cut out the suffix to get the uid

        cands = annotations[seriesuid == annotations.seriesuid]  # select the annotations for the current series
        #print (cands)
        create_nodule_mask (imagePath, cands)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号