fangq / iso2mesh

Iso2Mesh - a 3D surface and volumetric mesh generator for MATLAB/Octave
http://iso2mesh.sf.net
Other
181 stars 73 forks source link

Respect 1D features in volume #59

Closed lrineau closed 3 years ago

lrineau commented 3 years ago

I wanted to fix something after a recent discussion on the mailing list.

CGAL functions can mesh a volume that intersects the box of the image. That is the example "Domains from Segmented 3D Images, with 1D Features", from the manual.

This PR updates the code of mesh_3D_image.cpp accordingly.

lrineau commented 3 years ago

I have verified this PR with the following code:

% create a 2d binary image
[xi,yi]=ndgrid(0:60,0:40);
d2=(xi-30).*(xi-30)+(yi-20).*(yi-20);
img=zeros(size(xi));
img(d2<100)=1;
im3d=repmat(img,1,1,50);

% extract object from binary volume
[no1,el1]=v2m(uint8(im3d),[],struct('radbound',3,'distbound',0.2),8,'cgalmesh');

plotmesh(no1,el1,'y>20')

and the results is: Screenshot_20210920_164230

fangq commented 3 years ago

this is terrific! thank you for sharing. I will test it on my side.

SYP-code commented 2 years ago

I wanted to fix something after a recent discussion on the mailing list.

CGAL functions can mesh a volume that intersects the box of the image. That is the example "Domains from Segmented 3D Images, with 1D Features", from the manual.

This PR updates the code of mesh_3D_image.cpp accordingly.

Hi lrineau, for the problem that the surface mesh is not smooth, I tried to replace the "mesh_3D_image.cpp" file with the code you recommended, but the mesh doesn't seem to improve, what is the reason for this?

Thanks. image

fangq commented 2 years ago

statically linked cgalmesh executable for Linux

cgalmesh.mexa64.zip

SYP-code commented 2 years ago

Thank you for your reply, Dr. Fang. Is there an alternative to windows?

At 2022-05-12 05:41:15, "Qianqian Fang" @.***> wrote:

statically linked cgalmesh executable for Linux

cgalmesh.mexa64.zip

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>