def cells_walls_coords(self):
"""Return coordinates of the voxels defining a cell wall.
This function thus returns any voxel in contact with one of different label.
Args:
image (SpatialImage) - Segmented image (tissu)
Returns:
x,y,z (list) - coordinates of the voxels defining the cell boundaries (walls).
"""
if self.is3D():
image = hollow_out_cells(self.image, self.background, verbose=True)
else:
image = copy.copy(self.image)
image[np.where(image==self.background)] = 0
if self.is3D():
x,y,z = np.where(image!=0)
return list(x), list(y), list(z)
else:
x,y = np.where(image!=0)
return list(x), list(y)
spatial_image_analysis.py 文件源码
python
阅读 38
收藏 0
点赞 0
评论 0
评论列表
文章目录