File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1111% nface: nface=3 or ignored - for triangular faces,
1212% nface=4 - square faces
1313% nface=0 - return a boundary mask image via node
14+ % nface='iso' - call isosurface() function to return a
15+ % marching-cube based isosurface
1416%
1517% output:
1618% elem: integer array with dimensions of NE x nface, each row represents
2224% -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
2325%
2426
27+ if (nargin > 1 && ischar(nface ) && strcmp(nface , ' iso' ))
28+ [elem , node ] = isosurface(img );
29+ node = node(: , [2 , 1 , 3 ]) - 0.5 ;
30+ return
31+ end
32+
2533dim = size(img );
2634if (length(dim ) < 3 )
2735 dim(3 ) = 1 ;
Original file line number Diff line number Diff line change 9191 end
9292 [isoct , octver ] = isoctavemesh ;
9393 if (~isoct || sscanf(octver , ' %d ' ) > 5 )
94- [levelel , levelno ] = isosurface(levelmask , 0.5 );
95- levelno = levelno(: , [2 1 3 ]) - 0.5 ;
94+ [levelno , levelel ] = binsurface(levelmask , ' iso' );
9695 else
9796 [levelno , levelel ] = binsurface(levelmask );
9897 end
You can’t perform that action at this time.
0 commit comments