Advanced Features in iso2mesh

Global variables

controls the temporary file output directory
The default output directory is under the system's temporary directory, i.e. the output of mwpath(''). However, if one does not have permission to write to this folder, or if this contains outputs from other users who shares the same output folder (for example, /tmp/iso2mesh-username on Linux), one can avoid the permission error by setting his own output folder. To do this, he need to define
in Matlab/Octave's "base workspace". The iso2mesh commands afterward will output the intermediate files under the specified temp directory.

controls the output file name prefix
If two users share a common output directory (for example /tmp for GNU Linux) on a single machine, some of the users may not able to write intermediate output files and encountered errors. If this happens, one can set "ISO2MESH_TEMP" to define a new output folder, alternatively, one can set ISO2MESH_SESSION to label all his output by a unique prefix. For example, if one define
this will prepend 'foo_' to all output file names, if this string is unique, users can produce all their output files without conflict with other users.

specifies the folder where to look for the external binaries
There are several external tools are essential for iso2mesh. These pre-compiled binaries are saved under iso2mesh/bin folder. In our Installation instructions, we ask the users to add this path to their PATH environment variable. If user for some reason not be able to do this, iso2mesh will do two things to look for these binaries:
  1. it will first check a global variable ISO2MESH_BIN and see if it is defined in the 'base' workspace, if it is defined and the folder exist, it will execute the binaries from that folder
  2. if no ISO2MESH_BIN defined, or it has a value which does not exist, iso2mesh will use the relative path "iso2mesh/bin" to load those binaries
  3. otherwise, it will give an error message, complaining the binary can not be found.

sets the seed for the random number generators in the CGAL modules
Iso2mesh versions later than 1.0.0 can make reproducible meshes across multiple runs. This was done by setting proper seeds for the random number generators called inside the CGAL executables. By default, iso2mesh will use 0x623F9A9E as the seed. If you prefer to set your own seed, please define a global variable named ISO2MESH_RANDSEED in the "base" workspace. The value of ISO2MESH_RANDSEED must be a positive integer. If iso2mesh detects the definition of ISO2MESH_RANDSEED, it will use it to seed the RNGs.

Intermediate outputs

For each step of the mesh generation along the work-flow, iso2mesh will save some intermediate outputs as logs. These outputs are saved under the output of mwpath('') (see the explanations for ISO2MESH_TEMP above).

if one use the default 'cgalsurf' method in vol2surf to extract an isosurface from a binary image, this file will save the raw binary image for each level set (only the last levelset stays)
the output surface mesh from 'cgalsurf' method (vol2surf)
if one use the 'simplify' option of vol2surf, this file saves the voxel-resolution surface mesh extracted using binsurface subroutine
this file records the triangular surface after mesh simplifications (meshresample)
for 'simplify' approach, this file is the surface mesh before the mesh validation (meshcheckrepair)
this is the output from 'mechcheckrepair' subroutine.

when generating the 3D tetrahedral mesh, tetgen needs an input file with PLC (piece-wise linear complexes) which is saved in this poly file.
if no bounding box needed, this file saves the same info as the poly file, except it is in off format.
tetgen output: tetrahedral element file
tetgen output: boundary surface element file
tetgen output: node file
Powered by Habitat