Extract 3D model of interest from multiple 3D mesh models

3 次查看(过去 30 天)
Hi,
I am currently trying to extract my desired 3D model from multiple reconstucted 3D mesh models (see attached image).
The code that I currently have is:
m = isosurface(Phi1,0.5); % reconstructed mesh 3D models from binary 3D images
VER=m.vertices; % obtained vertices from all reconstructed mesh 3D models
FAC=m.faces; % obtained faces from all reconstructed mesh 3D models
SMesh=splitFV(FAC,VER); %implemented code shown in the link below
colours = lines(length(SMesh));
for i=1:length(SMesh)
QQ=patch(SMesh(i),'facecolor',colours(i,:),'EdgeColor','none');
end
[xi,yi] = getpts() % obtained xi and yi coordinates from a mouse click
As you can see, I labelled all defined independent mesh models (shown in separate colors) by using code implemented in this link.
Now i have a variable SMesh containing all these labelled mesh 3D models, and each model has its defined faces and vertices.
Now I am trying to interactively, by using a mouse click, define a desired 3D model for extraction and extract it from those labelled 3D models.
I searched and found getpts(), but I am not sure if and how to implement it's extracted X,Y coordinates to do what I need, and if this approach is possible.
How can I do this? Any help would be greatly appreciated.
Thanks in advance!
  2 个评论
KSSV
KSSV 2018-9-1
The major part of the mesh you need is in green color..I think you have it already??
Mario
Mario 2018-9-1
Hi KSSV,
In a way I do, if you consider that the green colored part is the largest, so I can extract it based on that feature.
But, this is somewhat a good case. There will be cases where multiple mesh 3D models are similar in size, so that is the reason why I want to be able to interactively select the desired mesh 3D model and extract it.

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by