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
评论列表
文章目录