a | b/VoxelPlotter.m | ||
---|---|---|---|
1 | function [vol_handle,FV]=VoxelPlotter(VoxelMat,Vox_Size) |
||
2 | %detect the external voxels and faces |
||
3 | vol_handle=0; |
||
4 | if nargin==1 |
||
5 | Vox_Size=1; |
||
6 | end |
||
7 | FV=FindExternalVoxels(VoxelMat,Vox_Size); |
||
8 | %plot only external faces of external voxels |
||
9 | cla; |
||
10 | if size(FV.vertices,1)==0 |
||
11 | cla; |
||
12 | else |
||
13 | %patch voxel |
||
14 | vol_handle=patch(FV,'FaceColor','r'); |
||
15 | end |
||
16 | end |