util.py 文件源码

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

项目:nanslice 作者: spinicist 项目源码 文件源码
def sample_point(img, point, order=1):
    scale = np.mat(img.get_affine()[0:3, 0:3]).I
    offset = np.dot(-scale, img.get_affine()[0:3, 3]).T
    s_point = np.dot(scale, point).T + offset[:]
    return ndinterp.map_coordinates(img.get_data().squeeze(), s_point, order=order)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号