Extract 3D model of interest from multiple 3D mesh models
8 次查看(过去 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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!