Extract 3D model of interest from multiple 3D mesh models
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I am currently trying to extract my desired 3D model from multiple reconstucted 3D mesh models (see attached image).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194919/image.jpeg)
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
2018년 9월 1일
The major part of the mesh you need is in green color..I think you have it already??
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!