regions.py 文件源码

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

项目:diluvian 作者: aschampion 项目源码 文件源码
def check_move_neighborhood(self, mask):
        """Given a mask block, check if any central voxels meet move threshold.

        Checks whether a cube one move in each direction from the mask center
        contains any probabilities greater than the move threshold.

        Parameters
        ----------
        mask : ndarray
            Block of mask probabilities, usually of the shape specified by
            the configured ``output_fov_shape``.

        Returns
        -------
        bool
        """
        ctr = np.asarray(mask.shape) // 2
        neigh_min = ctr - self.MOVE_DELTA
        neigh_max = ctr + self.MOVE_DELTA + 1
        neighborhood = mask[map(slice, neigh_min, neigh_max)]
        return np.nanmax(neighborhood) >= CONFIG.model.t_move
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号