In order to obtain the volume, I used surf2mesh. However, it doesn't work properly. I think that maybe the surfaces could be not closed or with some bad definition.[nbox,fbox,ebox]=meshabox([-5 -5 -5],[5 5 5],1, 1);[nsph,fsph,esph]=meshasphere([0 0 5],3,1,1);
[nbox,fbox,ebox]=meshabox([-5 -5 -5],[5 5 5],1, 1);
[nsph,fsph,esph]=meshasphere([0 0 5],3,1,1);
% rasterize the surfaces over a common grid
dx=0.1;
xi=-5.2:dx:5.2;
yi=-5.2:dx:5.2;
zi=-5.2:dx:8.2;
imbox=surf2vol(nbox,fbox,xi,yi,zi);
imsph=surf2vol(nsph,fsph,xi,yi,zi);
% make a solid from the outline
imbox=fillholes3d(imbox,1);
imsph=fillholes3d(imsph,1);
% merge the two labels into a new labeled field
imboth=imsph+(imbox*2);
% imagesc(squeeze(imboth(50,:,:)))
% extract a mesh from the combined volume
[node,elem,face]=v2m(uint8(imboth),[],3,5,'cgalmesh');
plotmesh(node(:,1:3),elem,'x>50')
--
Best regards,
Nerea
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To post to this group, send email to iso2mes...@googlegroups.com.
Visit this group at http://groups.google.com/group/iso2mesh-users.
For more options, visit https://groups.google.com/d/optout.
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Dear Qianqian,
Thank you fast reply. Unfortunately, I am not able to process my original meshes by means of converting them into image (v2m).It's extremely (computationaly) expensive when I improve the accuracy.I will keep trying it with others meshes.Thank you for you answer.