Hi @Lotte ,
When dealing with complex geometries like artery bifurcations, achieving an accurate volume calculation can be challenging due to gaps or inaccuracies in the mesh generated by methods like delaunay triangulation or convex hull. To improve the fit of the convex hull to the true dataset and calculate the volume more accurately, you can employ a technique called alpha shapes, a generalization of the convex hull that allow for concave regions to be included in the shape. By adjusting the alpha parameter, you can control the level of detail in the shape and potentially capture the intricate geometry of the artery bifurcation more accurately. Below is an example code snippet that demonstrates how to calculate the volume of an artery bifurcation using alpha shapes:
% Generate sample 3D points representing the artery bifurcation
points = randn(100,3); % Replace with your actual 3D points
% Create alpha shape with an appropriate alpha value
alpha_value = 0.5; % Adjust based on the dataset
shp = alphaShape(points, alpha_value);
% Calculate the volume enclosed by the alpha shape
volume = volume(shp);
% Visualize the alpha shape
plot(shp);
axis equal;
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Artery Bifurcation Alpha Shape');
disp(['Volume of Artery Bifurcation: ', num2str(volume)]);
Please see attached.
So, in this example code snippet, replace points with your actual 3D point data representing the artery bifurcation. Feel free to adjust the alpha_value parameter to control the level of detail in the alpha shape. Then, calculate the volume enclosed by the alpha shape using the volume function. Afterwards, visualize the alpha shape to inspect how well it fits the artery bifurcation geometry. By utilizing alpha shapes, you can potentially achieve a better fit to the true dataset and calculate the volume of the artery bifurcation more accurately, addressing the gaps or inaccuracies encountered with traditional convex hull methods. For more information on this function, please refer to alphaShape
Hope this helps. Please let me know if you have any further questions.