-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainQuench_CFTRimg.m
40 lines (31 loc) · 1.15 KB
/
MainQuench_CFTRimg.m
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
clc
clear
close all
addpath(genpath('functions'))
addpath(genpath(fullfile('example','input'))) % location of your input folder
inputFileName = 'example_quench.m'; % name of you input file as string
[inputFolder,saveWorkspaceHere] = inputFileCheckAndRun_quench(inputFileName);
%% STRUCTURING DATA
tic
plate = createPlateStruct_quench(inputFolder); % creates an empty struct for each plate
plate = populatePlate_quench(inputFolder,plate); % collects the path names for each image
plateN = length(plate); % and creates a struct for each image
disp('Completed setting up data structures')
time(1) = toc;
%% QUENCHING ANALYSIS
for j=1:plateN
quenchImageN = size(plate(j).well,1);
for i=1:quenchImageN
plate(j).well(i) = findRedMaskChange(plate(j).well(i));
plate(j).well(i) = findYelInsideOverTime(plate(j).well(i));
plate(j).well(i) = calculateConcIodine(plate(j).well(i));
end
end
disp ('Completed quenching analysis')
time(2) = toc;
%% CREATE RESULTS STRUCTS
resultsQuench = createResultsQuenchStruct(plate);
resultsQuench = populateResultsQuench(resultsQuench,plate);
time(3) = toc;
disp('Full analysis completed')
save(saveWorkspaceHere)