-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwriteExperimentParametersGUI.m
More file actions
32 lines (29 loc) · 1.58 KB
/
Copy pathwriteExperimentParametersGUI.m
File metadata and controls
32 lines (29 loc) · 1.58 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
function writeExperimentParametersGUI(experiment_path, out_file_name)
target_path = sprintf("%s/%s", experiment_path, out_file_name);
if isfile(target_path)
return
end
splitted_path = split(experiment_path, "/");
dialog_title = sprintf("User defined details for: %s", splitted_path{end});
defaults = {'1','1','1.28','','10','2'}; % put here DEFAULT values for the movie info
dialog_dimensions = [ 1.5 100];
prompt = {...
'Sample type [1=fragment, 2=ring, 3=strip, 4=open ring]', ...
'Environment [1=gel, 2=solution, 3=methyl cellulose]', ...
'Calibration [in um/px]', ...
'Start time in minutes (after excision)', ...
'Time interval in minutes' , ...
'Planned projection type [1=max projection, 2=layer separation]'...
};
sampleTypeOptions = {'fragment', 'ring', 'strip', 'open ring'};
environmentOptions = {'gel', 'solution', 'methyl celluluse'};
projectionTypeOptions = {'max','layer separation'};
answer = inputdlg(prompt,dialog_title,dialog_dimensions,defaults);
config.sampleType = sampleTypeOptions{str2double(answer{1})};
config.environment = environmentOptions{str2double(answer{2})};
config.calibration = str2double(answer{3}); % in um/pix
config.startTime = str2double(answer{4}); % time movie started after exxcision in minutes
config.timeInterval = str2double(answer{5}); % time interval in minutes; if ==0 time stamp file will be entered
config.projectionType = projectionTypeOptions{str2double(answer{6})};
yaml.dumpFile(target_path, config, "block");
end