Meshes a surface defined as a grey level in a 3D image
[connect,coord]=surface_mesher(image,iso_value,bounded_sphere,mesh_criteria)
The function surface_mesher builds a two dimensional mesh approximating surfaces defined as grey level of 3D images.
p = cglab_getrootpath(); image_1 = p+"/demos/skull_2.9.inr"; bounded_sphere = [122.0 102.0 117.0 200.0*200.0*2.0]; mesh_criteria = [30 5 5]; [tri,coord] = surface_mesher(image_1,2.9,bounded_sphere,mesh_criteria); xx = matrix(coord(tri,1),-1,3)'; yy = matrix(coord(tri,2),-1,3)'; zz = matrix(coord(tri,3),-1,3)'; h = plot3d(xx,yy,zz) h.color_mode=8 h.hiddencolor = -1; a=gca(); a.isoview="on"; a.rotation_angles=[75,-75]; | ![]() | ![]() |