Skip to content
Snippets Groups Projects
Commit 6eaaa77c authored by ac_fx's avatar ac_fx
Browse files

gen_ssf_kymo outfolder

parent 81d28400
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
% targetChannelNames = {'Erk SSF'; 'Akt SSF' ; 'DHB SSF'; 'H2B SSF'; 'velocity SSF'}; % channel names in the kymo % targetChannelNames = {'Erk SSF'; 'Akt SSF' ; 'DHB SSF'; 'H2B SSF'; 'velocity SSF'}; % channel names in the kymo
% targetChannelNames = {'Erk SSF'; 'Oct4 SSF' ; 'H2B SSF'; 'velocity SSF'}; % channel names in the kymo % targetChannelNames = {'Erk SSF'; 'Oct4 SSF' ; 'H2B SSF'; 'velocity SSF'}; % channel names in the kymo
% targetChannelNumbers = [2, 3, -1]; % maps image channel names to kymo channel names % targetChannelNumbers = [2, 3, -1]; % maps image channel names to kymo channel names
function gen_SSF_kymo(strDB,targetChannelNames,targetChannelNumbers,bDownscale, startFrame) function gen_SSF_kymo(strDB,targetChannelNames,targetChannelNumbers,outfolder,bDownscale, startFrame)
if ~exist('bDownscale','var') if ~exist('bDownscale','var')
bDownscale = false; bDownscale = false;
...@@ -22,9 +22,9 @@ else ...@@ -22,9 +22,9 @@ else
end end
L = length(flist); L = length(flist);
cacheFolder = fullfile(ROOT,'kymoV2');
if ~exist(cacheFolder,'dir') if ~exist(outfolder,'dir')
mkdir(cacheFolder); mkdir(outfolder);
end end
imd={}; imd={};
...@@ -33,7 +33,7 @@ p = ljsStartParallel(16); ...@@ -33,7 +33,7 @@ p = ljsStartParallel(16);
parfor ff=1:L parfor ff=1:L
% for ff=1:L % for ff=1:L
str_ff = fullfile(flist(ff).folder,flist(ff).name); str_ff = fullfile(flist(ff).folder,flist(ff).name);
if exist(fullfile(cacheFolder,[flist(ff).name '_ssf_cache.json']),'file') if exist(fullfile(outfolder,[flist(ff).name '_ssf_cache.json']),'file')
fprintf(1,'genKymo skipping %s kymo exists\n',str_ff); fprintf(1,'genKymo skipping %s kymo exists\n',str_ff);
continue continue
end end
...@@ -46,11 +46,11 @@ parfor ff=1:L ...@@ -46,11 +46,11 @@ parfor ff=1:L
imVolume = imVolume(:,:,startFrame:end,:); % trim off first 30 frames imVolume = imVolume(:,:,startFrame:end,:); % trim off first 30 frames
imd{ff}=MicroscopeData.MakeMetadataFromImage(imVolume); imd{ff}=MicroscopeData.MakeMetadataFromImage(imVolume);
imd{ff}.DatasetName=[flist(ff).name '_ssf_cache']; imd{ff}.DatasetName=[flist(ff).name '_ssf_cache'];
imd{ff}.imageDir = cacheFolder; imd{ff}.imageDir = outfolder;
imd{ff}.ChannelNames = targetChannelNames; imd{ff}.ChannelNames = targetChannelNames;
MicroscopeData.WriterH5(imVolume,'imageData',imd{ff},'path',cacheFolder); MicroscopeData.WriterH5(imVolume,'imageData',imd{ff},'path',outfolder);
tElapsed = toc(t0); tElapsed = toc(t0);
fprintf(1,'ssf_volume %d tElapsed=%0.2f\n',ff,tElapsed); fprintf(1,'ssf_volume %d tElapsed=%0.2f\n',ff,tElapsed);
end end
Import.leverImport('',cacheFolder); Import.leverImport('',outfolder);
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment