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 @@
% 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
% 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')
bDownscale = false;
......@@ -22,9 +22,9 @@ else
end
L = length(flist);
cacheFolder = fullfile(ROOT,'kymoV2');
if ~exist(cacheFolder,'dir')
mkdir(cacheFolder);
if ~exist(outfolder,'dir')
mkdir(outfolder);
end
imd={};
......@@ -33,7 +33,7 @@ p = ljsStartParallel(16);
parfor ff=1:L
% for ff=1:L
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);
continue
end
......@@ -46,11 +46,11 @@ parfor ff=1:L
imVolume = imVolume(:,:,startFrame:end,:); % trim off first 30 frames
imd{ff}=MicroscopeData.MakeMetadataFromImage(imVolume);
imd{ff}.DatasetName=[flist(ff).name '_ssf_cache'];
imd{ff}.imageDir = cacheFolder;
imd{ff}.imageDir = outfolder;
imd{ff}.ChannelNames = targetChannelNames;
MicroscopeData.WriterH5(imVolume,'imageData',imd{ff},'path',cacheFolder);
MicroscopeData.WriterH5(imVolume,'imageData',imd{ff},'path',outfolder);
tElapsed = toc(t0);
fprintf(1,'ssf_volume %d tElapsed=%0.2f\n',ff,tElapsed);
end
Import.leverImport('',cacheFolder);
\ No newline at end of file
Import.leverImport('',outfolder);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment