fangq / brain2mesh

Brain2Mesh - a one-liner for high-quality brain mesh generation
http://mcx.space/brain2mesh
Other
34 stars 14 forks source link

The SPM_example_wholehead examle #9

Closed NikolayYavich closed 4 years ago

NikolayYavich commented 4 years ago

Hello,

I have downloaded brain2mesh and its dependencies and trying run the included examples.

The SMP_example brain worked just fine, but with SPM_example_wholehead I have the following issue.

Could you please help?

I am using Matlab R2018a on a Linux machine.

Thanks Nikolay.

SPM_example_wholehead extracting surfaces from a volume ... region 1 centroid : 87.500000 72.666667 65.333333

processing threshold level 1... Surface Mesh Extraction Utility (Based on CGAL 3.8) (modified for iso2mesh by Qianqian Fang) http://iso2mesh.sf.net

RNG seed 1648335518 set initial mesh size to 50 Refining... maximum node number is set to 100000

done. Final number of points: 28581 surface mesh generation is complete extracting surfaces from a volume ... region 1 centroid : 87.500000 71.666667 64.333333

processing threshold level 1... Surface Mesh Extraction Utility (Based on CGAL 3.8) (modified for iso2mesh by Qianqian Fang) http://iso2mesh.sf.net

RNG seed 1648335518 set initial mesh size to 50 Refining... maximum node number is set to 100000

done. Final number of points: 18560 surface mesh generation is complete extracting surfaces from a volume ... region 1 centroid : 88.000000 60.666667 63.333333

processing threshold level 1... Surface Mesh Extraction Utility (Based on CGAL 3.8) (modified for iso2mesh by Qianqian Fang) http://iso2mesh.sf.net

RNG seed 1648335518 set initial mesh size to 50 Refining... maximum node number is set to 100000

done. Final number of points: 2334 surface mesh generation is complete extracting surfaces from a volume ... region 1 centroid : 86.000000 77.666667 1.333333

processing threshold level 1... Surface Mesh Extraction Utility (Based on CGAL 3.8) (modified for iso2mesh by Qianqian Fang) http://iso2mesh.sf.net

RNG seed 1648335518 set initial mesh size to 50 Refining... maximum node number is set to 100000

done. Final number of points: 48500 surface mesh generation is complete generating tetrahedral mesh from closed surfaces ... creating volumetric mesh from a surface mesh ... volume mesh generation is complete extracting surfaces from a volume ... region 1 centroid : 46.500000 56.666667 1.333333

processing threshold level 1... Surface Mesh Extraction Utility (Based on CGAL 3.8) (modified for iso2mesh by Qianqian Fang) http://iso2mesh.sf.net

RNG seed 1648335518 set initial mesh size to 50 Refining... maximum node number is set to 100000

done. Final number of points: 1749 surface mesh generation is complete generating tetrahedral mesh from closed surfaces ... creating volumetric mesh from a surface mesh ... volume mesh generation is complete generating tetrahedral mesh from closed surfaces ... creating volumetric mesh from a surface mesh ... volume mesh generation is complete generating tetrahedral mesh from closed surfaces ... creating volumetric mesh from a surface mesh ... volume mesh generation is complete generating tetrahedral mesh from closed surfaces ... creating volumetric mesh from a surface mesh ... Error using surf2mesh (line 121) Tetgen command failed

Error in s2m (line 35) [node,elem,face]=surf2mesh(v,f,[],[],keepratio,maxvol,regions,holes,0,method,varargin{:});

Error in brain2mesh (line 330) [brain_n,brain_el,brain_f] = s2m(node,face,1.0,maxvol,'tetgen1.5',[],[],cmdopt);

Error in SPM_example_wholehead (line 27) [node,elem,face] = brain2mesh(seg,cfg);

fangq commented 4 years ago

@NikolayYavich, I am aware of this issue, see the end of this forum post

https://groups.google.com/d/msg/iso2mesh-users/W71rP4iMVr8/rWeMR7hBAAAJ

I looked into this further, and the problem seems to be related to tetgen 1.5. If you change 'tetgen1.5' on this line to 'tetgen', the meshing will go through, but the regions are not labeled.

https://github.com/fangq/brain2mesh/blob/master/brain2mesh.m#L240

I've already emailed the tetgen's author, Dr. Hang Si, and reported this issue, but haven't heard back.

NikolayYavich commented 4 years ago

Thanks for the quick answer! I really appreciate that.