function [node,elem,face]=v2m(img,isovalues,opt,maxvol,method)
inputs and outputs are similar to those defined in vol2mesh
function [node,elem,face,regions]=vol2mesh(img,ix,iy,iz,opt,maxvol,dofix,method,isovalues)
convert a binary (or multi-valued) volume to tetrahedral mesh
input:
img: a volumetric binary image
ix,iy,iz: subvolume selection indices in x,y,z directions
opt: as defined in vol2surf.m
maxvol: target maximum tetrahedral elem volume
when method='cgalmesh', maxvol can specify the target
for each label (subregion index) by the following syntax
'label1=size1:label2=size2:...'
dofix: 1: perform mesh validation&repair, 0: skip repairing
method: 'cgalsurf' or omit: use CGAL surface mesher
'simplify': use binsurface and then simplify
'cgalmesh': use CGAL 3.5 3D mesher for direct mesh generation [new]
generally speaking, 'cgalmesh' is the most robust path
if you want to product meshes from binary or multi-region
volumes, however, its limitations include 1) only accept
uint8 volume, and 2) can not extract meshes from gray-scale
volumes. If ones goal is to process a gray-scale volume,
he/she should use the 'cgalsurf' option. 'simplify' approach
is not recommended unless other options has failed.
isovalues: a list of isovalues where the levelset is defined