Iso2Mesh is a MATLAB/Octave-based mesh generation toolbox, designed for easy creation of high quality surface and tetrahedral meshes from 3D volumetric images. It contains a rich set of mesh processing scripts/programs, working either independently or interacting with external free meshing utilities. Iso2Mesh toolbox can directly convert a 3D image stack, including binary, segmented or gray-scale images such as MRI or CT scans, into quality volumetric meshes. This makes it particularly suitable for multi-modality medical imaging data analysis and multi-physics modeling. Above all, Iso2Mesh is open-source. You can download it for free. You are also allowed to extend the toolbox for your own research and share with other users. Iso2Mesh is cross-platform and is compatible with both MATLAB and GNU Octave.
Qianqian Fang (2020). Iso2Mesh (https://github.com/fangq/iso2mesh), GitHub. Retrieved .
There is a problem with several isosurfaces, maybe due to the change in fgets and fgetl in MATLAB starting with R2019b. See below:
Error using fgets
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in fgetl (line 32)
[tline,lt] = fgets(fid);
Error in readoff (line 23)
Error in vol2restrictedtri (line 54)
Error in vol2surf (line 172)
Error in vol2mesh (line 63)
Really good code and super helpful! If there would be a manual document for some demos that will be better!
Hi, I got an error in meshresample.m:
The pre_remesh.off was found (136MB), but after the command, post_remesh.off was not generated. Is this because the mesh is too complicated?
"F:\mCatch\mcrCache9.0.1\RMD_re1\src\bin\cgalsimp2.exe" "C:\Users\Jiang\AppData\Local\Temp\iso2mesh-Jiang\pre_remesh.off" 0.5 "C:\Users\Jiang\AppData\Local\Temp\iso2mesh-Jiang\post_remesh.off"
Umar, if you call v2m/vol2mesh with the cgalmesh method option, the regions are automatically labeled based on the voxel label. If you call s2m/surf2mesh using tetgen, you will need to provide seed points for each region, given as the "regions" parameter. Then, tetgen will label the regions according to the index in the seed array.
if these does not solve the problem, please send your sample script and a small data to our mailing list https://groups.google.com/forum/#!forum/iso2mesh-users
I'm having issues meshing a volume that as far as I can tell, has been labelled correctly with multiple regions. The brain meshing demo works fine, but my volume doesn't, the 5th elem column always returns everything belonging to the same region.
To label the regions, I'm numbering their voxel value in the 3D double array from 1 --> however many regions I want. Is this correct?
Nice Toolbox, but why do i get the following error running demo_surf2mesh_ex1.m: Error using meshresample>domeshsimplify (line 48)
cgalsimp2 command failed
I added all paths to the Matlab search path as well as the bin path.
I'm running the toolbox under MacOS 10.14; Maltab R2018a
Can somebody help me?
Thanks a lot!
This is a useful toolbox but I too found the same quirk mentioned by Brandon. For example, to export volume mesh as STL
causes 'error: horizontal dimensions mismatch (4x2 vs 3x1)'. But
produces STL output which can be viewed, e.g. online STL viewer such as https://www.viewstl.com/
Iso2mesh is fairly powerful and simple to use. I have used it successfully to build FE meshes from 3D images generated from histological slide scans, so that I can put their geometries into comsol. Overall, I like and recommend this package, but it definitely has some bugs that need fixing (examples below).
Unfortunately, this program's most powerful 3D meshing tool 'cgalmesh' has some weird errors that aren't easily diagnosable. A common example of this is that when running vol2mesh on a large or complex mesh, cgalmesh.exe will sometimes fail to create out an output file 'post_cgalmesh.mesh', crashing the whole meshing process.
Another quirk of this program is that the node outputs of vol2mesh are of the wrong dimensions to use the built-in savemsh.m savestl.m, etc... functions. It's a fairly easy fix to remove the last column of the node, but this is just an example of the kind of bugs that exist with the current version.
I would like to invite you to test a new GUI based meshing interface (i2m), integrating all iso2mesh functionalities. A preview version of i2m (or img2mesh) was committed to the github repository, which you can download directly by using the "Download" button on the top-right of this page.
Two screenshots of the meshing GUI can be found in this mailing list announcement
The GUI is designed to be very flexible, and currently supports loading various volumetric image (.nii, .img, .inr, .mat) and mesh (.medit, .off, .json ...) formats. You can also export data in JSON format (*.jmesh). Use main and context menus to create data, and build a meshing work-flow. A standalone executable of i2m containing most iso2mesh features is also coming along.
To use i2m, simply unzip the downloaded package, open matlab, and type "i2m". Currently, i2m only supports matlab 2015a or newer.
I'd love to hear what you think. Please file bugs at the github issues page at
Iso2Mesh 1.9.0-1 is released, fixing an executable path bug reported in Issue #21.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!