我有一个 3D 二进制掩码(来自 Dicom 图像),其中有一个对象。我想计算其中物体的总凹表面积和总凸表面积。对于total convex surface area
,我使用了这个链接,它在 Matlab 中的代码如下:
FV = isosurface(BW_Img, 0.5); % BW_Img with dimensions 28x23x18
V = FV.vertices;
F = FV.faces;
A = V(F(:, 2), :) - V(F(:, 1), :);
B = V(F(:, 3), :) - V(F(:, 1), :);
C = cross(A, B, 2);
Convex_surf_area_3D = 1/2 * sum(sqrt(sum(C.^2, 2)));
对于total concave surface area
,我已经看到了这个链接,但我不知道如何alphaShape
在 3D 二进制掩码上使用它( ):
shp = alphaShape(BW_Img);
concave_surf_area_3D = volume(shp); % or : concave_surf_area_3D = surfaceArea(shp);
% Error using alphaShape: The input points must be 2D or 3D coordinates in numpoints-by-ndim format.
如果上面的代码是我的答案,如何为我的 3D 二进制掩码设置其输入参数?
否则,如何total concave surface area
在 Matlab 中计算 3D 二进制掩码?