def _neighbors_filtering_by_contact_area(self, label, neighbors, min_contact_area, real_area):
"""
Function used to filter the returned neighbors according to a given minimal contact area between them!
Args:
label: (int) - label of the image to threshold by the min contact area.
neighbors` (list) - list of neighbors of the `label: to be filtered.
min_contact_area: (None|int|float) - value of the min contact area threshold.
real_area: (bool) - indicate wheter the min contact area is a real world value or a number of voxels.
"""
areas = self.cell_wall_area(label, neighbors, real_area)
nei = cp.copy(neighbors)
for i,j in areas.keys():
if areas[(i,j)] < min_contact_area:
nei.remove( i if j==label else j )
return nei
spatial_image_analysis.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录