Commit d47a6817 authored by ac32's avatar ac32

boundary efficiency 3d vertex clamp size fix

parent cf18acf8
......@@ -25,9 +25,10 @@ T=imdilate(T,se);
for i=1:length(Cells)
if is3D(im)
verts=round(Cells(i).verts);
verts=[verts(:,2),verts(:,1),verts(:,3)];
verts=max(verts,1);
verts=min(verts,size(im));
idx=sub2ind(size(im),verts(:,2),verts(:,1),verts(:,3));
idx=sub2ind(size(im),verts(:,1),verts(:,2),verts(:,3));
else
idx=sub2ind(size(im),Cells(i).surface(:,2),Cells(i).surface(:,1));
end
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment