def real_indices(slices, resolutions):
"""
Transform the discrete (voxels based) coordinates of the boundingbox (`slices`) into their real-world size using `resolutions`.
Args:
slices: (list) - list of slices or boundingboxes found using scipy.ndimage.find_objects;
resolutions: (list) - length-2 (2D) or length-3 (3D) vector of float indicating the size of a voxel in real-world units;
"""
return [ (s.start*r, s.stop*r) for s,r in zip(slices,resolutions) ]
spatial_image_analysis.py 文件源码
python
阅读 35
收藏 0
点赞 0
评论 0
评论列表
文章目录