visedconfig2propgrid.m 13.1 KB
Newer Older
1
function properties = visedconfig2propgrid(vised_config)
Allan Campopiano's avatar
Allan Campopiano committed
2
3
4
5
6
7

if nargin==0;
    
    try parameters = evalin('base', 'vised_config');
        vised_config=parameters;
    catch %if nonexistent in workspace
8
        vised_config=init_vised_config;
Allan Campopiano's avatar
Allan Campopiano committed
9
    end
10

Allan Campopiano's avatar
Allan Campopiano committed
11
12
end

13
14
15
16
if iscell(vised_config.color);
    for i=1:length(vised_config.color);
        if isnumeric(vised_config.color{i})
            vised_config.color{i}=num2str(vised_config.color{i});
Allan Campopiano's avatar
Allan Campopiano committed
17
18
19
        end
    end
else
20
    vised_config.color={vised_config.color};
Allan Campopiano's avatar
Allan Campopiano committed
21
22
23
end

properties = [ ...
24
    PropertyGridField('quick_evtmk', vised_config.quick_evtmk, ...
Allan Campopiano's avatar
Allan Campopiano committed
25
26
27
28
29
30
31
32
    'Type', PropertyType('char','row',''), ...
    'Category', 'visual editing options', ...
    'DisplayName', 'quick event create', ...
    'Description', ...
        ['String event type to immediately add (without pop up window) when ',...
        'alternate press ([ctrl + left-click] or [right-click]) is executed ', ...
        'on the eegplot data axis. This option overwrites any other specification ', ...
        'for altselectcommand at run time [Default = '' = no quick event].']) ...
33
    PropertyGridField('quick_evtrm', vised_config.quick_evtrm, ...
Allan Campopiano's avatar
Allan Campopiano committed
34
35
36
37
38
39
40
41
    'Type', PropertyType('char','row',{'off','ext_press','alt_press'}), ...
    'Category', 'visual editing options', ...
    'DisplayName', 'quick event remove', ...
    'Description', ['Enable single click event removal (no pop up GUI). ' ...
    '"ext_press" = remove event when [Shift + left-click] is executed on events in the eegplot figure axis, '...
    '"alt_press" = remove event when [Ctrl + left-click] or [righ-click] is executed on events in the eegplot figure axis. ' ...
    'When set to "alt_press" this option will overwrite any other specification for altselectcommand at run time.' ...
    'When set to "ext_select" this option will overwrite any other specification for extselectcommand (including quick_evtmk) at run time.']) ...
42
    PropertyGridField('quick_chanflag', vised_config.quick_chanflag, ...
Allan Campopiano's avatar
Allan Campopiano committed
43
44
45
46
47
48
    'Type', PropertyType('char','row',{'off','ext_press','alt_press'}), ...
    'Category', 'visual editing options', ...
    'DisplayName', 'quick channel flagging', ...
    'Description', ['Enable single click channel flag toggle (no pop up GUI). ' ...
    '"alt press" = toggle channel flag when Shift-left-click is executed on event in eegplot figure axis, '...
    '"ext press" = toggle channel flag when Ctrl-left-click [or simple righ-click] is executed on event in eegplot figure axis']) ...
49
    PropertyGridField('selectcommand', vised_config.selectcommand, ...
50
    'Type', PropertyType('cellstr','column'), ...
Allan Campopiano's avatar
Allan Campopiano committed
51
52
53
54
    'Category', 'visual editing options', ...
    'DisplayName', 'select command [selectcommand]', ...
    'Description', ['[cell array] list of 3 commands (strings) to run when the mouse ' ...
                      'button is down, when it is moving and when the mouse button is up.']) ...
55
    PropertyGridField('extselectcommand', vised_config.extselectcommand, ...
56
    'Type', PropertyType('cellstr','column'), ...
Allan Campopiano's avatar
Allan Campopiano committed
57
58
59
60
61
    'Category', 'visual editing options', ...
    'DisplayName', 'extended select command [extselectcommand]', ...
    'Description', ['[cell array] list of 3 commands (strings) to run when the mouse ' ...
                      'button + SHIFT is down, when it is ' ...
                      'moving and when the mouse button is up.']) ...
62
    PropertyGridField('altselectcommand', vised_config.altselectcommand, ...
63
    'Type', PropertyType('cellstr','column'), ...
Allan Campopiano's avatar
Allan Campopiano committed
64
65
66
67
68
    'Category', 'visual editing options', ...
    'DisplayName', 'alternate select command [altselectcommand]', ...
    'Description', ['[cell array] list of 3 commands (strings) to run when the mouse ' ...
                      'button + CTRL (or simple right press) is down, when it is ' ...
                      'moving and when the mouse button is up.']) ...
69
    PropertyGridField('keyselectcommand', vised_config.keyselectcommand, ...
Allan Campopiano's avatar
Allan Campopiano committed
70
71
72
73
74
75
    'Type', PropertyType('cellstr','column'), ...
    'Category', 'visual editing options', ...
    'DisplayName', 'key select command [keyselectcommand]', ...
    'Description', ['[cell array] each row is string containing a key character ' ...
                    'followed by "," then a command to execute when the key character ' ...
                    'is pressed while the pointer is over the data axis.']) ...
76
    PropertyGridField('mouse_data_front', vised_config.mouse_data_front, ...
Allan Campopiano's avatar
Allan Campopiano committed
77
78
79
80
81
82
83
    'Type', PropertyType('char','row',{'on','off'}), ...
    'DisplayName', 'Keep figure at front [mouse_data_front]', ...
    'Category', 'eegplot options', ...
    'Description', ['[''on''|''off''] When mouse moves over the data axis bring/keep', ...
                    ' the eegplot figure window at the front {default: ''on''}']) ...
...
...
84
    PropertyGridField('marks_y_loc', vised_config.marks_y_loc, ...
Allan Campopiano's avatar
Allan Campopiano committed
85
86
87
88
89
90
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'marks property options', ...
    'DisplayName', 'marks y axis location [marks_y_loc]', ...
    'Description', ['Location along the y axis [percent from bottom to top] ' ...
                    'to diplay the marks structure flags {default .8}. May also ' ...
                    'be an array of values to plot ']) ...
91
    PropertyGridField('inter_mark_int', vised_config.inter_mark_int, ...
Allan Campopiano's avatar
Allan Campopiano committed
92
93
94
95
96
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'marks property options', ...
    'DisplayName', 'inter-mark interval [inter_mark_int]', ...
    'Description', ['Distance along the y axis [percent from bottom to top] ' ...
                    'to separate each marks type {default .04}.']) ...
97
    PropertyGridField('inter_tag_int', vised_config.inter_tag_int, ...
Allan Campopiano's avatar
Allan Campopiano committed
98
99
100
101
102
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'marks property options', ...
    'DisplayName', 'inter-tag interval [inter_tag_int]', ...
    'Description', ['Distance along the x axis [percent from left to right] ' ...
                    'to separate each channel tag pointing at flagged channel labels {default .002}.']) ...
103
    PropertyGridField('marks_col_int', vised_config.marks_col_int, ...
Allan Campopiano's avatar
Allan Campopiano committed
104
105
106
107
108
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'marks property options', ...
    'DisplayName', 'color interval for marks display [marks_col_int]', ...
    'Description', ['Marks surface plots depict values between 0 to 1. ' ...
                    'The marks_col_int sets the interval of color change in the plot {default .1}.']) ...
109
    PropertyGridField('marks_col_alpha', vised_config.marks_col_alpha, ...
Allan Campopiano's avatar
Allan Campopiano committed
110
111
112
113
114
115
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'marks property options', ...
    'DisplayName', 'marks surface plot transparency [marks_col_alpha]', ...
    'Description', ['Alpha is a value between 0 and 1 where 0 = transparent and 1 = opaque {default .7}.']) ...
...
...
116
    PropertyGridField('spacing', vised_config.spacing, ...
Allan Campopiano's avatar
Allan Campopiano committed
117
118
119
120
121
122
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'Y axis spacing [spacing]', ...
    'Description', ['Display range per channel (default|0: max(whole_data)-min(whole_data))' ...
                    'Y axis distance in uV between the zero value of', ...
                    'each waveform in the eegplot scroll window.']) ...
123
    PropertyGridField('limits', vised_config.limits, ...
Allan Campopiano's avatar
Allan Campopiano committed
124
125
126
127
128
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'time limits [limits]', ...
    'Description', ['[start end] Time limits for data epochs in ms (for labeling' ... 
                    'purposes only).']) ...
129
    PropertyGridField('winlength', vised_config.winlength, ...
Allan Campopiano's avatar
Allan Campopiano committed
130
131
132
133
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'window time length [winlength]', ...
    'Description', ['[value] Seconds (or epochs) of data to display in window {default: 5}']) ...
134
    PropertyGridField('dispchans', vised_config.dispchans, ...
Allan Campopiano's avatar
Allan Campopiano committed
135
136
137
138
139
140
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'n channels to display [dispchans]', ...
    'Description', ['[integer] Number of channels to display in the activity window ' ...
                   '{default: from data}.  If < total number of channels, a vertical ' ... 
                   'slider on the left side of the figure allows vertical data scrolling.']) ...
141
    PropertyGridField('title', vised_config.title, ...
Allan Campopiano's avatar
Allan Campopiano committed
142
143
144
145
    'Type', PropertyType('char','row'), ...
    'DisplayName', 'title', ...
    'Category', 'eegplot options', ...
    'Description', ['Figure title {default: none}']) ...
146
    PropertyGridField('xgrid', vised_config.xgrid, ...
Allan Campopiano's avatar
Allan Campopiano committed
147
148
149
150
    'Type', PropertyType('char','row',{'on','off'}), ...
    'DisplayName', 'X axis grid lines [xgrid]', ...
    'Category', 'eegplot options', ...
    'Description', ['[''on''|''off''] Toggle display of the x-axis grid {default: ''off''}']) ...
151
    PropertyGridField('ygrid', vised_config.ygrid, ...
Allan Campopiano's avatar
Allan Campopiano committed
152
153
154
155
    'Type', PropertyType('char','row',{'on','off'}), ...
    'DisplayName', 'Y axis grid lines [ygrid]', ...
    'Category', 'eegplot options', ...
    'Description', ['[''on''|''off''] Toggle display of the y-axis grid {default: ''off''}']) ...
156
    PropertyGridField('ploteventdur', vised_config.ploteventdur, ...
Allan Campopiano's avatar
Allan Campopiano committed
157
158
159
160
    'Type', PropertyType('char','row',{'on','off'}), ...
    'DisplayName', 'plot event duration [ploteventdur]', ...
    'Category', 'eegplot options', ...
    'Description', ['[''on''|''off''] Toggle display of event duration { default: ''off'' }']) ...
161
    PropertyGridField('data2', vised_config.data2, ...
Allan Campopiano's avatar
Allan Campopiano committed
162
163
164
165
166
167
    'Type', PropertyType('char','row'), ...
    'DisplayName', 'ovelay data', ...
    'Category', 'eegplot options', ...
    'Description', ['[float array] identical size to the original data and ' ...
                   'plotted on top of it.']) ...
...
168
    PropertyGridField('command', vised_config.command, ...
Allan Campopiano's avatar
Allan Campopiano committed
169
170
171
172
173
174
175
176
    'Type', PropertyType('char','row'), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'button command [command]', ...
    'Description', ['[''string''] Matlab command to evaluate when the ''REJECT'' button is ' ...
                   'clicked. The ''REJECT'' button is visible only if this parameter is ' ...
                   'not empty. As explained in the "Output" section below, the variable ' ...
                   '''TMPREJ'' contains the rejected windows (see the functions ' ...
                   'eegplot2event() and eegplot2trial()).']) ...
177
    PropertyGridField('butlabel', vised_config.butlabel, ...
Allan Campopiano's avatar
Allan Campopiano committed
178
179
180
181
    'Type', PropertyType('char','row'), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'button label [butlabel]', ...
    'Description', ['Reject button label. {default: ''REJECT''}']) ...
182
PropertyGridField('color', vised_config.color, ...
Allan Campopiano's avatar
Allan Campopiano committed
183
184
185
186
187
188
189
'Type', PropertyType('cellstr','column'), ...
'Category', 'eegplot options', ...
'DisplayName', 'channel color [color]', ...
'Description', ['[''on''|''off''|cell array] Plot channels with different colors. ' ...
'If an RGB cell array {''r'' ''b'' ''g''}, channels will be plotted ' ...
'using the cell-array color elements in cyclic order {default:''off''}.']) ...
...
190
PropertyGridField('wincolor', vised_config.wincolor, ...
Allan Campopiano's avatar
Allan Campopiano committed
191
192
193
194
195
'Type', PropertyType('denserealdouble','matrix'), ...
'Category', 'eegplot options', ...
'DisplayName', 'axis marking color [wincolor]', ...
'Description', ['[color] Color to use to mark data stretches or epochs {default: ' ...
'[ 0.7 1 0.9]}']) ...
196
    PropertyGridField('submean', vised_config.submean, ...
Allan Campopiano's avatar
Allan Campopiano committed
197
198
199
200
    'Type', PropertyType('char','row',{'on','off'}), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'subtract signal mean [submean]', ...
    'Description', ['[''on''|''off''] Remove channel means in each window {default: ''on''}']) ...
201
    PropertyGridField('position', vised_config.position, ...
Allan Campopiano's avatar
Allan Campopiano committed
202
203
204
205
    'Type', PropertyType('denserealdouble','matrix'), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'figure window [position]', ...
    'Description', ['[lowleft_x lowleft_y width height] Position of the figure in pixels.']) ...
206
    PropertyGridField('tag', vised_config.tag, ...
Allan Campopiano's avatar
Allan Campopiano committed
207
208
209
210
211
    'Type', PropertyType('char','row'), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'figure window [tag]', ...
    'Description', ['[string] Matlab object tag to identify this eegplot() window (allows ' ...
                    'keeping track of several simultaneous eegplot() windows).']) ...
212
    PropertyGridField('children', vised_config.children, ...
213
    'Type', PropertyType('char','row'), ...
Allan Campopiano's avatar
Allan Campopiano committed
214
215
216
217
218
219
    'Category', 'eegplot options', ...
    'DisplayName', 'figure [children] handle', ...
    'Description', ['[integer] Figure handle of a *dependent* eegplot() window. Scrolling ' ...
                    'horizontally in the master window will produce the same scroll in ' ...
                    'the dependent window. Allows comparison of two concurrent datasets, ' ...
                    'or of channel and component data from the same dataset.']) ...
220
    PropertyGridField('scale', vised_config.scale, ...
Allan Campopiano's avatar
Allan Campopiano committed
221
222
223
224
    'Type', PropertyType('char','row',{'on','off'}), ...
    'Category', 'eegplot options', ...
    'DisplayName', 'amplitude [scale]', ...
    'Description', ['[''on''|''off''] Display the amplitude scale {default: ''on''}.']) ...
225
];