Commit f7994a2c authored by actb's avatar actb

segReduce - use square in 2-d, cube in 3-d

parent 832c7472
......@@ -8,7 +8,13 @@ qL=origL;
% nDimension is 2 for 2-D, 3 for 3-D used for concat'ing
nDimension=length(size(bw));
minKernelArea=10; %floor(min_area_pixels/4)+1;
se=strel('disk',3);
if is3D(bw)
se=strel('cube',3);
else
se=strel('square',3);
end
for nDilate=1:2*min_radius_pixels
kernels=bwfill(bwDilate,'holes')&~bwDilate;
kernels=kernels&bw;
......@@ -65,11 +71,3 @@ function nc=numComponents(L,idx)
labels=unique(L(idx));
labels(0==labels)=[];
nc=length(labels);
function b3D=is3D(im)
if length(size(im))==3
b3D=true;
else
b3D=false;
end
\ No newline at end of file
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