-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakeComposites.m
More file actions
40 lines (27 loc) · 906 Bytes
/
Copy pathMakeComposites.m
File metadata and controls
40 lines (27 loc) · 906 Bytes
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
% Reset matlab
close all
clear
clc
h = waitbar(0,'Please wait generating composite reports...');
projectDir = '\\ROOT\projects\NIH-Light-Mask\Auckland';
dataDir = fullfile(projectDir,'cropped_data');
exportDir = fullfile(projectDir,'composites');
% Load data
data = loadData(dataDir);
n = numel(data);
timestamp = upper(datestr(now,'mmmdd'));
for iObj = 1:n
thisObj = data(iObj);
if isempty(thisObj.Time)
continue
end
titleText = {'NIH Light Mask - Auckland, NZ';['ID: ',thisObj.ID,', Session: ',thisObj.Session.Name,', Device SN: ',num2str(thisObj.SerialNumber)]};
d = d12pack.composite(thisObj,titleText);
d.Title = titleText;
fileName = [thisObj.ID,'_',thisObj.Session.Name,'_',timestamp,'.pdf'];
filePath = fullfile(exportDir,fileName);
saveas(d.Figure,filePath);
close(d.Figure);
waitbar(iObj/n,h)
end
close(h)