在 matlab 中,找到 3D 邻域 [英] in matlab, find 3D neighbourhood

查看:21
本文介绍了在 matlab 中,找到 3D 邻域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个经过分割过程的体积(3D 矩阵).大部分体积由 NaN(或零)组成,除了通过某些标准的区域(见图).我需要知道每个剩余线段的体素数量有多大,以及它们在 2D 平面(xy、xz、yz)上的分布情况.matlab 中有什么东西可以帮助我以有效的方式而不是直接搜索来做到这一点?体积可以相当大.例如.在附图中,有 7 个体素的黄色/棕色线段,并且比 xy 更垂直地延伸.提前致谢.

I have a volume (3D matrix) that has undergone a segmentation process. Most of the volume consist of NaNs (or zeros), except regions that have passed some criteria (see picture). I need to know how large each remaining segment is in number of voxels and how is their distribution on the 2D planes (xy, xz, yz). Is there anything in matlab that can help me do this in an efficient way rather than direct search? The volume can be rather large. For ex. in the attached picture there is one segment in yellowish/brownish colour of 7 voxels and extends more vertically than in xy. Thanks in advance.

推荐答案

最方便的解决方案是使用 区域道具.在您的示例中:

The most convenient solution is to use REGIONPROPS. In your example:

stats = regionprops(image, 'area', 'centroid')

对于每个特征,结构统计中都有一个包含面积(即体素数量)和质心的条目.

For every feature, there is an entry in the structure stats with the area (i.e. # of voxels) and the centroid.

这篇关于在 matlab 中,找到 3D 邻域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆