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 ...@@ -140,7 +140,7 @@ end
CC=bwconncomp(L); CC=bwconncomp(L);
for n=1:num for n=1:num
idx=CC.PixelIdxList{n}; idx=CC.PixelIdxList{n};
if length(idx)<area_min|| max(d(idx))<dmin if length(idx)<area_min && max(d(idx))<dmin
continue continue
end end
if is3D(im) if is3D(im)
......
...@@ -25,6 +25,9 @@ for nDilate=1:nIter ...@@ -25,6 +25,9 @@ for nDilate=1:nIter
% 3 things can happen: (0) CC s (1) CC disappears (2) CC splits % 3 things can happen: (0) CC s (1) CC disappears (2) CC splits
idxWL=vertcat(CC.PixelIdxList{:}); idxWL=vertcat(CC.PixelIdxList{:});
map=unique([workingL(idxWL),L(idxWL)],'rows'); map=unique([workingL(idxWL),L(idxWL)],'rows');
if isempty(map)
break;
end
map(map(:,2)==0,:)=[]; map(map(:,2)==0,:)=[];
mapCounts=hist(map(:,1),[1:max(map(:,1))])'; mapCounts=hist(map(:,1),[1:max(map(:,1))])';
idxChange=find(mapCounts>1); idxChange=find(mapCounts>1);
......
% build matlabPollDB % build matlabPollDB
[b,m]=fileparts(pwd); function buildLever()
[b,f]=fileparts(fileparts(pwd)); startFolder=pwd();
if ~strcmp('leverjs',f) || ~strcmp('matlab',m) thisFile=mfilename('fullpath');
fprintf(1,'you need to run from the leverjs/matlab folder!\n'); [thisFolder,~,~]=fileparts(thisFile);
% return cd(thisFolder);
end if ~exist('buildOutput','dir')
mkdir('buildOutput')
if ~exist('buildOutput','dir') end
mkdir('buildOutput')
end if exist('../../leverUtilities/src/MATLAB')
if exist('../../leverUtilities/src/MATLAB') mcc -a '../../leverUtilities/src/MATLAB/+MicroscopeData/+Original/+BioFormats/bioformats_package.jar'...
-a sqlite-jdbc-3.21.0.jar -m importFolder.m -d buildOutput
mcc -a '../../leverUtilities/src/MATLAB/+MicroscopeData/+Original/+BioFormats/bioformats_package.jar'...
-a sqlite-jdbc-3.21.0.jar -m importFolder.m -d buildOutput elseif exist('../../utilities/src/MATLAB')
elseif exist('../../utilities/src/MATLAB') mcc -a '../../utilities/src/MATLAB/+MicroscopeData/+Original/+BioFormats/bioformats_package.jar'...
-a sqlite-jdbc-3.21.0.jar -m importFolder.m -d buildOutput
mcc -a '../../utilities/src/MATLAB/+MicroscopeData/+Original/+BioFormats/bioformats_package.jar'...
-a sqlite-jdbc-3.21.0.jar -m importFolder.m -d buildOutput else
else fprintf(2,'could not find leverUtilities in either ../../utilties or ../../leverUtilities\n');
fprintf(2,'not building leverImporter. please check path and try again\n');
fprintf(2,'could not find leverUtilities in either ../../utilties or ../../leverUtilities\n');
fprintf(2,'not building leverImporter. please check path and try again\n'); end
end mcc -a sqlite-jdbc-3.21.0.jar -a +Segment -a +Mitosis -a +CellFeatures ...
-m matlabPollDB.m -d buildOutput
mcc -a sqlite-jdbc-3.21.0.jar -a +Segment -a +Mitosis -a +CellFeatures ...
-m matlabPollDB.m -d buildOutput % copy over the matlabAlgorithms.json, inserting sha hashes to match git commit
% tags
% copy over the matlabAlgorithms.json, inserting sha hashes to match git commit processJSON();
% tags
processJSON(); if ispc
if ispc copyfile(fullfile('buildOutput','matlabPollDB.exe'),fullfile('..','prebuilt'))
copyfile(fullfile('buildOutput','importFolder.exe'),fullfile('..','prebuilt'))
copyfile(fullfile('buildOutput','matlabPollDB.exe'),fullfile('..','prebuilt'))
copyfile(fullfile('buildOutput','importFolder.exe'),fullfile('..','prebuilt')) elseif ismac
elseif ismac system('cp -r buildOutput/matlabPollDB.app ../prebuilt');
copyfile(fullfile('buildOutput','run_matlabPollDB.sh'),fullfile('..','prebuilt','mac_run_matlabPollDB.sh'))
system('cp -r buildOutput/matlabPollDB.app ../prebuilt'); system('chmod +x ../prebuilt/mac_run_matlabPollDB.sh');
copyfile(fullfile('buildOutput','run_matlabPollDB.sh'),fullfile('..','prebuilt','mac_run_matlabPollDB.sh'))
system('chmod +x ../prebuilt/mac_run_matlabPollDB.sh'); system('cp -r buildOutput/importFolder.app ../prebuilt');
copyfile(fullfile('buildOutput','run_importFolder.sh'),fullfile('..','prebuilt','mac_run_importFolder.sh'))
system('cp -r buildOutput/importFolder.app ../prebuilt'); system('chmod +x ../prebuilt/mac_run_importFolder.sh');
copyfile(fullfile('buildOutput','run_importFolder.sh'),fullfile('..','prebuilt','mac_run_importFolder.sh'))
system('chmod +x ../prebuilt/mac_run_importFolder.sh'); elseif isunix
elseif isunix copyfile(fullfile('buildOutput','matlabPollDB'),fullfile('..','prebuilt'),'f');
copyfile(fullfile('buildOutput','run_matlabPollDB.sh'),fullfile('..','prebuilt','run_matlabPollDB.sh'))
copyfile(fullfile('buildOutput','matlabPollDB'),fullfile('..','prebuilt'),'f'); system('chmod +x ../prebuilt/run_matlabPollDB.sh');
copyfile(fullfile('buildOutput','run_matlabPollDB.sh'),fullfile('..','prebuilt','run_matlabPollDB.sh'))
system('chmod +x ../prebuilt/run_matlabPollDB.sh');
copyfile(fullfile('buildOutput','importFolder'),fullfile('..','prebuilt'),'f');
copyfile(fullfile('buildOutput','run_importFolder.sh'),fullfile('..','prebuilt','run_importFolder.sh'))
copyfile(fullfile('buildOutput','importFolder'),fullfile('..','prebuilt'),'f'); system('chmod +x ../prebuilt/run_importFolder.sh');
copyfile(fullfile('buildOutput','run_importFolder.sh'),fullfile('..','prebuilt','run_importFolder.sh')) end
system('chmod +x ../prebuilt/run_importFolder.sh'); cd(startFolder)
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