-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_rawpreprocess.m
More file actions
54 lines (37 loc) · 1.28 KB
/
Copy pathmain_rawpreprocess.m
File metadata and controls
54 lines (37 loc) · 1.28 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
%%
directory = 'G:\tmp\00_igkl\hql088\251006_hql088_whiskerb\HQL088_whiskerb251006_003_pa04';
preprocess = raw_preprocess(directory);
%%
preprocess.raw_sleepscoringdata = preprocess.loadrawdata();
%%
util_checkstack(preprocess.raw_sleepscoringdata.eye)
%%
window = uifigure();
mainlayout = uigridlayout(window, [2,1]);
mainlayout.RowHeight = {'fit', 'fit'};
mainlayout.ColumnWidth = {'1x'};
eyepanel = uipanel(mainlayout, 'Title', sprintf('draw eye roi'));
HStack = sliceViewer(ax, preprocess.raw_sleepscoringdata.eye,'Parent',eyepanel);
ax = findobj(HStack, 'Type', 'axes');
roi = drawpolygon(ax);
controlpanel = uipanel(mainlayout, 'Title', sprintf('confirmbutton'));
controlpanel.Layout.Row = 2;
controlpanel.Layout.Column = 1;
StatePanelLayout = uigridlayout(controlpanel, [1, 2]);
StatePanelLayout.RowHeight = {'fit'};
StatePanelLayout.ColumnWidth = repmat({'1x'}, 2, 1);
%%
drawbutton = uibutton(StatePanelLayout, ...
"Text", 'adf', ...
'ButtonPushedFcn', @(~, ~) drawpolygon() ...
);
drawbutton.Layout.Row = 2;
drawbutton.Layout.Column = 2;
%%
uicontrol(controlpanel,'Style','pushbutton','String','Nextstep', 'Callback',@(~,~) uiresume(window));
uiwait(window)
close(window)
%%
function drawpolygon()
polygon = drawpolygon();
end