postprocessing.py 文件源码

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

项目:diluvian 作者: aschampion 项目源码 文件源码
def get_seeded_component(self, closing_shape=None):
        mask, bounds = self._get_bounded_mask(closing_shape)

        label_im, _ = ndimage.label(mask)
        seed_label = label_im[tuple(self.seed - bounds[0])]
        if seed_label == 0:
            raise ValueError('Seed voxel (%s) is not in body.', np.array_str(self.seed))
        label_im[label_im != seed_label] = 0
        label_im[label_im == seed_label] = 1

        return label_im, bounds
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号