def geometric_L1(spia):
"""
"""
background = spia._background
L1_labels = spia.cell_first_layer()
L1_cells_bary = spia.center_of_mass(L1_labels, verbose=True)
background_neighbors = spia.neighbors(L1_labels, min_contact_area=10., real_area=True)
background_neighbors = set(background_neighbors) & set(L1_labels)
L1_cells_bboxes = spia.boundingbox(L1_labels)
print "-- Searching for the median voxel of each epidermis wall ..."
dict_wall_voxels, epidermis_wall_median, median2bary_dist = {}, {}, {}
for label_2 in background_neighbors:
dict_wall_voxels[(background,label_2)] = wall_voxels_between_two_cells(spia.image, background, label_2, bbox = L1_cells_bboxes[label_2], verbose = False)
epidermis_wall_median[label_2] = find_wall_median_voxel(dict_wall_voxels[(background,label_2)], verbose = False)
median2bary_dist[label_2] = distance(L1_cells_bary[label_2], epidermis_wall_median[label_2])
return median2bary_dist, epidermis_wall_median, L1_cells_bary
spatial_image_analysis.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录