-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathALTREADME_for_timelapseimageprocessing.m
More file actions
88 lines (70 loc) · 4.21 KB
/
ALTREADME_for_timelapseimageprocessing.m
File metadata and controls
88 lines (70 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
%set parent directory
mdir = mfilename('fullpath');
[~,b] = regexp(mdir,'Tracking\w*/');
if isempty(b)
[~,b] = regexp(mdir,'Tracking\w*\');
end
parentdir = mdir(1:b);
exportdir = strcat(parentdir,'Export/');
cd(parentdir)
fullT = tic;
sbAndWashList = {'2017_04_12 plate exp5 mKate Air objective';'2017_04_12 plate exp8 mKate Air objective';'2017_04_14 plate exp2 mKate Air objective';'2017_04_29 plate exp1 mKate Air objective';'2017_05_01 plate exp1 mKate Air objective';'2017_05_03 plate exp2 mKate Air objective';'2017_06_24 plate exp1 mKate Air objective';'2017_07_01 plate exp2 40x Oil objective';'2017_07_03 plate exp1 40x Oil objective';'2017_07_03 plate exp2 40x Oil objective';'2017_07_05 plate exp1 40x Oil objective';'2017_07_07 plate exp1 40x Oil objective';'2017_07_08 plate exp1 40x Oil objective';'2017_10_23 plate exp1 40x Oil objective';'2017_10_24 plate exp1 40x Oil objective';'2017_10_24 plate exp2 40x Oil objective';'2017_10_25 plate exp1 40x Oil objective';'2017_10_27 plate exp1 40x Oil objective';'2017_10_30 plate exp1 40x Oil objective';'2017_10_30 plate exp2 40x Oil objective';'2017_10_30 plate exp3 40x Oil objective';'2017_11_01 plate exp1 40x Oil objective'};
sbAndWashList = {'2017_04_17 plate exp2 40x Oil objective';'2017_04_17 plate exp3 40x Oil objective';'2017_04_17 plate exp4 40x Oil objective';'2017_05_03 plate exp1 40x Oil objective';'2017_06_22 plate exp1 20x Air objective';'2017_06_24 plate exp2 40x Oil objective';'2017_06_24 plate exp3 40x Oil objective';'2017_06_24 plate exp4 20x Air objective';'2017_07_01 plate exp1 40x Oil objective';'2017_10_25 plate exp2 40x Oil objective';'2017_11_04 plate exp1 40x Oil objective';'2017_11_04 plate exp2 40x Oil objective'};
sbAndWashList = {'2017_07_08 plate exp1'};
sbAndWashList = {'2018_01_29 plate james exp2'};
for j = 1:length(sbAndWashList)
close all
% j=7;
wstr = sbAndWashList{j};
[~,b] = regexp(wstr,'exp');
BB = wstr(1:b+1);
% disp(FileName)
%get directory name from date Array
B = char(BB);
FileName = B;
disp(FileName)
%time the whole process
supertic = tic;
%% extract images from .czi and save image stacks as .mat files
% ExtractMetadataAndImages(B);
% ExtractMetadataAndImagesTIFF(B);
%% extract data in excel file
cd(parentdir)
exName = strcat(B,'-metaData.mat');
% makeDoseStructFromXLS(exName);
%% load excel-extracted data
% datequery = strcat(FileName,'*DoseAndScene*');
% cd(exportdir)
% filelist = dir(datequery);
% if isempty(filelist)
% error(strcat('need to run ExtractMetadata for-',FileName));
% %dosestruct = makeDoseStruct; %run function to make doseStruct
% else
% dosestructstruct = load(char(filelist.name));
% dosestruct = dosestructstruct.dosestruct;
% segInstruct = dosestructstruct.segInstruct;
% end
% A=[];
% channelstoinput = dosestructstruct.channelNameSwapArray;
% bkg = dosestructstruct.BACKGROUND;
% BACKGROUND = bkg{1};
% dontsegment = BACKGROUND;
%% run Flatflield correction
% BackgroundAndFlatfieldCorrectionOfTimeLapseImages(A,B,channelstoinput,BACKGROUND);
channelstoinput = {'DIC','mKate','EGFP','Hoechst','CFP','AlexaFluor647'};
BACKGROUND = 1:5;
A=[];
FlatfieldCorrectionOfTimeLapseImagesTIFFs(A,B,channelstoinput,BACKGROUND);
%% run segmentation
% uiSegmentTimeLapseImages
% SegmentationOfTimeLapseImages(A,B,dontsegment,segInstruct);
% donemail('cfrick@caltech.edu','segmentation complete','segmentation complete')
%% run autotracking algorithms
%
% uiTrackCellz(B,'AutoTrackCells')
% uiTrackCellz(B,'AutoExportTracks')
% uiTrackCellz(B,'AutoExportNuclei')
end
fullTime = toc(fullT);
disp(['total time for all is = ', num2str(round(fullTime./60,0,'decimals')) ' minutes']);
% donemail('cfrick@caltech.edu','export complete','export complete')