give_seg_image.py 文件源码

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

项目:Brain_Tumor_Segmentation 作者: KarthikRevanuru 项目源码 文件源码
def seg(path):
    p=np.array([get_3d_data('../../../Cut_Brats_Training_Data/Test/'+"cut"+path+"_flair.nii.gz")])

    shap=p[0].shape
    print (shap)

    leng=shap[0]*shap[1]*shap[2]

    #pix=get_pixels(path)
    pc=concat(p)

    print (p[0].shape)
    px = cv2.Sobel(p[0],cv2.CV_64F,1,0,ksize=5)
    py = cv2.Sobel(p[0],cv2.CV_64F,0,1,ksize=5)

    print(time.strftime('%a %H:%M:%S'))
    pcx=concat1(px)
    pcy=concat1(py)


    print(time.strftime('%a %H:%M:%S'))
    pa=ndimage.filters.convolve(p[0],np.full((5, 5, 5), 1.0/125),mode='constant')

    print(time.strftime('%a %H:%M:%S'))
    pg=concat1(pa)

    print(time.strftime('%a %H:%M:%S'))
    X=reshape_feat(pc,pg,pcx,pcy,leng)
    print(time.strftime('%a %H:%M:%S'))

    return X
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号