Commit 6d9ba833 authored by Andrew Cohen's avatar Andrew Cohen

updated to buildLever with dir push/pop, segReduce empty map

parent 3f70d0d1
......@@ -140,7 +140,7 @@ end
CC=bwconncomp(L);
for n=1:num
idx=CC.PixelIdxList{n};
if length(idx)<area_min|| max(d(idx))<dmin
if length(idx)<area_min && max(d(idx))<dmin
continue
end
if is3D(im)
......
......@@ -25,6 +25,9 @@ for nDilate=1:nIter
% 3 things can happen: (0) CC s (1) CC disappears (2) CC splits
idxWL=vertcat(CC.PixelIdxList{:});
map=unique([workingL(idxWL),L(idxWL)],'rows');
if isempty(map)
break;
end
map(map(:,2)==0,:)=[];
mapCounts=hist(map(:,1),[1:max(map(:,1))])';
idxChange=find(mapCounts>1);
......
% build matlabPollDB
[b,m]=fileparts(pwd);
[b,f]=fileparts(fileparts(pwd));
if ~strcmp('leverjs',f) || ~strcmp('matlab',m)
fprintf(1,'you need to run from the leverjs/matlab folder!\n');
% return
end
function buildLever()
startFolder=pwd();
thisFile=mfilename('fullpath');
[thisFolder,~,~]=fileparts(thisFile);
cd(thisFolder);
if ~exist('buildOutput','dir')
mkdir('buildOutput')
end
......@@ -60,3 +58,4 @@ elseif isunix
copyfile(fullfile('buildOutput','run_importFolder.sh'),fullfile('..','prebuilt','run_importFolder.sh'))
system('chmod +x ../prebuilt/run_importFolder.sh');
end
cd(startFolder)
\ 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