feeb21e9909e70f1f74fbbf4b68c761502b17e17
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

1) function ui_main(varargin)
2) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

3) DEFAULT.selectedSubject = 2;
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

4) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

5) DEFAULT.pststart        = -15;
6) DEFAULT.pstend          = 40;
7) DEFAULT.baselinestart   = -3;
8) DEFAULT.baselineend     = -1;
9) DEFAULT.frameshiftstart = -5;
10) DEFAULT.frameshiftend   = 35;
11) DEFAULT.frameshiftdur   = 0;
12) DEFAULT.classdefstring  = 'left,\t[9,11,13]\nright,\t[10,12,14]';
13) DEFAULT.voxelstring     = 'SPL l + [ 0, 0, 0] \nSPL r + [ 0, 0, 0]\n';
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

14) DEFAULT.svmoptstring    = '-s 0 -t 0 -c 1';
15) DEFAULT.svmnfold        = '6';
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

16) DEFAULT.searchlightradius = 3;
17) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

18) DEFAULT.wd  = fullfile('d:','Analyze','Choice','24pilot');
19) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

20) %  Initialize and hide the GUI as it is being constructed.
21)     frameWidth=450;
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

22)     frameHeight=450;
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

23)     
24)     frame = figure('Visible','off','Position',[0,0,frameWidth,frameHeight]);
25)     movegui(frame,'west'); % get this thing visible on smaller displays.
26)     set(frame,'Name','SVMCrossVal Decode Performance 4 SPM');
27)     set(frame,'NumberTitle','off');
28)     set(frame,'MenuBar','none');
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

29) %     set(frame,'Color',get(0,'defaultUicontrolBackgroundColor'));
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

30)     set(frame,'Resize','on');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

31)     set(frame,'Units','normalized');
Christoph Budziszewski working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

32)     set(frame,'Color','y');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

33) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

34)     task = struct;
35)     
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

36)     model = struct;
37)     model.baseDir = DEFAULT.wd;
38) 
39)     model.txtBaseDir = createLabel(frame,[0 0.97 1 0.03],model.baseDir);
40)     set(model.txtBaseDir,'BackgroundColor','w');
Christoph Budziszewski enabled svm classification....

Christoph Budziszewski authored 15 years ago

41)     set(model.txtBaseDir,'ForegroundColor','b');
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

42)     
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

43)     TASK_HEIGHT = 1-0.13;
44)     
45)     % PREPROCESSING
46)     task.preprocessing   = uipanel(frame,'Title','Preprocessing','Position',[0 0.0 1 TASK_HEIGHT]);
47)     set(task.preprocessing,'BackgroundColor','w');
48)     set(task.preprocessing,'Units','normalized');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

49)     
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

50)     model.selectedSubject = DEFAULT.selectedSubject;
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

51)     model = createFirstStepPanel(model,task.preprocessing,DEFAULT);
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

52)     
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

53)     
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

54)     % CLASSIFICATION
55)     task.classification = uipanel(frame,'Title','Classification','Position',[0 0.0 1 TASK_HEIGHT]);
56)     set(task.classification,'BackgroundColor','w');
57)     model = createSecondStepPanel(model,task.classification,DEFAULT);
58)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

59)     % PLOT
60)     task.plot = uipanel(frame,'Title','Plot','Position',[0 0.0 1 TASK_HEIGHT]);
61)     set(task.plot,'BackgroundColor','w');
62)     model = createVisualStepPanel(model,task.plot,DEFAULT);
63)     
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

64)     % TASK
65)     task.taskSwitch = uipanel(frame,'Position',[0 1-0.13 1 0.10]);
66) %         set(task.taskSwitch,'Title','TASK');
67)         set(task.taskSwitch,'BackgroundColor','w');
68)         set(task.taskSwitch,'Units','normalized');
69)     
70)         btnSwitchPreprocessing = uicontrol(task.taskSwitch,'String','ImageProcessing',...
71)             'Units','normalized','Position',[0.0 0.0 0.33 1]);
72)         set(btnSwitchPreprocessing,'Callback',{@cbSwitchTask,'PRE',task}); 
73)         set(btnSwitchPreprocessing,'Enable','on');
74) 
75)         btnSwitchClassify = uicontrol(task.taskSwitch,'String','Decode',...
76)             'Units','normalized','Position',[0.33 0.0 0.33 1]);
77)         set(btnSwitchClassify,'Callback',{@cbSwitchTask,'CLASSIFY',task}); 
78)         set(btnSwitchClassify,'Enable','on');
79) 
80)         btnSwitchPlot = uicontrol(task.taskSwitch,'String','Plot',...
81)             'Units','normalized','Position',[0.66 0.0 0.33 1]);
82)         set(btnSwitchPlot,'Callback',{@cbSwitchTask,'PLOT',task}); 
83)         set(btnSwitchPlot,'Enable','on');
84) 
85)     % menu
86)     
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

87)     savemenu = uimenu(frame,'Label','Save/Load');
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

88)         uimenu(savemenu,'Label','Save Preprocessing Parameter','Callback',{@mcb_save,model});
89)         uimenu(savemenu,'Label','Load Preprocessing Parameter','Callback',{@mcb_load,model});
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

90) 
Christoph Budziszewski zwischenspeicherung

Christoph Budziszewski authored 15 years ago

91)     uimenu(frame,'Label','change Study','Callback',{@mcb_cd,model},'Enable','off');
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

92)     
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

93)     cbSwitchTask(0,0,'PRE',task);
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

94) 
95)     % fill with data
96)     model = scanDirs(model);
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

97)     set(frame,'Visible','on');
98) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

99) %     assignin('base','model',model);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

100) end
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

101) 
102) function model = createFirstStepPanel(model,parent,DEFAULT)
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

103) 
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

104)     main_grid = cell(2,4);
105)     main_grid{1,1} = [0 0.7 0.4 0.3];
106)     main_grid{1,2} = [0 0.5 0.5 0.2];
107)     main_grid{1,3} = [0 0.1 0.5 0.4];
108)     main_grid{1,4} = [0 0.0 1.0 0.1];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

109)     
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

110)     main_grid{2,1} = [0.4 0.7 0.6 0.3];
111)     main_grid{2,2} = [0.5 0.5 0.5 0.2];
112)     main_grid{2,3} = [0.5 0.1 0.5 0.4];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

113)     
114)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

115)     pSubject = uipanel(parent,'Units','normalized','Position',cell2mat(main_grid(1,1)));
116)     set(pSubject,'Title','Subjects');
117)     set(pSubject,'BackgroundColor','w');
118)     
119)     subjectList = {'DUMMY Subj1','DUMMY Subj2','DUMMY Subj3','DUMMY Subj4'};
120)     model.subjectSelector = uicontrol(pSubject,'Style','listbox',...
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

121)                     'Min',1, 'Max',3,...
122)                     'String',subjectList,...
123)                     'UserData',subjectList,...
124)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

125)                     'Position',[0 0 1 1]);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

126)     set(model.subjectSelector, 'FontName', 'FixedWidth');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

127)     set(model.subjectSelector,'BackgroundColor','w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

128)     
129)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

130)     pClasses = uipanel(parent,'Units','normalized','Position',cell2mat(main_grid(1,2)));
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

131)     set(pClasses,'Title','Class Definitions');
132)     set(pClasses,'BackgroundColor','w');
133)         lClassDef = uicontrol(pClasses,...
134)             'Style','text',...
135)             'String',sprintf('<Label>,\t <[Event, Event, ..]>;'),...
136)             'Units','normalized',...
137)             'Position',[0 0.8 1 0.2]);
138)         set(lClassDef,'BackgroundColor','w');
139)         set(lClassDef,'HorizontalAlignment','left');
140)         
141)         model.txtClassDef = uicontrol(pClasses,'Style','edit',...
142)             'String',sprintf(DEFAULT.classdefstring),...
143)             'Units','normalized',...
144)             'Position',[0 0 1 0.8]);
145)         set(model.txtClassDef,'HorizontalAlignment','left');
146)         set(model.txtClassDef,'Max',20);
147)         set(model.txtClassDef,'Min',0);
148)         set(model.txtClassDef, 'FontName', 'FixedWidth');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

149)         set(model.txtClassDef, 'BackgroundColor', 'w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

150) 
151) 
152)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

153)     pPSTH        = uipanel(parent,'Title','PSTH Options','Position',cell2mat(main_grid(2,1)));
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

154)     set(pPSTH,'BackgroundColor','w');
155)         
156)         grid_h = 0.16;
157)         grid_w = 0.3;
158)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

159)         tl_grid = cell([3 6]);
160)         tl_grid{2,1} = [0.0 0.83 grid_w grid_h];
161)         tl_grid{2,1} = [0.4 0.83 grid_w grid_h];
162)         tl_grid{3,1} = [0.7 0.83 grid_w grid_h];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

163)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

164)         tl_grid{1,2} = [0.0 0.66 grid_w grid_h];
165)         tl_grid{2,2} = [0.4 0.66 grid_w grid_h];
166)         tl_grid{3,2} = [0.7 0.66 grid_w grid_h];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

167) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

168)         tl_grid{1,3} = [0.0 0.5 grid_w grid_h];
169)         tl_grid{2,3} = [0.4 0.5 grid_w grid_h];
170)         tl_grid{3,3} = [0.7 0.5 grid_w grid_h];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

171)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

172)         tl_grid{1,4} = [0.0 0.33 grid_w grid_h];
173)         tl_grid{2,4} = [0.4 0.33 grid_w grid_h];
174)         tl_grid{3,4} = [0.7 0.33 grid_w grid_h];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

175) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

176)         tl_grid{1,5} = [0.0 0.16 0.5 grid_h];
177)         tl_grid{2,5} = [0.5 0.16 grid_w grid_h];
178)         tl_grid{3,5} = [0.75 0.16 grid_w grid_h];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

179)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

180)         tl_grid{1,6} = [0.0 0.0 0.5 grid_h];
181)         tl_grid{2,6} = [0.5 0.0 grid_w grid_h];
182)         tl_grid{3,6} = [0.75 0.0 grid_w grid_h];
183) 
184)         lStart      = createLabel(pPSTH, cell2mat(tl_grid(2,1)) ,'Start [sec]');
185)         lEnd        = createLabel(pPSTH, cell2mat(tl_grid(3,1)) ,'End [sec]');
186)         lPSTH       = createLabel(pPSTH, cell2mat(tl_grid(1,2)),'PSTH Range');
187)         lBaseline   = createLabel(pPSTH, cell2mat(tl_grid(1,3)),'Baseline');
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

188) 
189)         lSearchligh = createLabel(pPSTH, cell2mat(tl_grid(1,5)),'Searchlight Radius');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

190) 
191) 
192)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),DEFAULT.pststart);
193)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),DEFAULT.pstend);
194)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),DEFAULT.baselinestart);
195)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),DEFAULT.baselineend);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

196)         model.txtSearchlightRadius = createTextField(pPSTH,cell2mat(tl_grid(2,5)),DEFAULT.searchlightradius);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

197)         
198)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

199)         pImage = uipanel(parent,'Title','Image Options','Position',cell2mat(main_grid(2,2)));
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

200)         set(pImage,'BackgroundColor','w');
201) 
202)         createLabel(pImage,[0.0 0.5 1 0.5],'Select Image Base');
203)         
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

204)         imageRegExList = {'DUMMY f*.IMG','DUMMY swrf*.IMG','DUMMY wrf*.IMG'};
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

205)         model.imageTypeSelection = uicontrol(pImage,'Style','popupmenu',...
206)         'Units','normalized',...
207)         'Position',[0.0 0.0 1 0.5],...
208)         'String',imageRegExList,...
209)         'UserData',imageRegExList,...
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

210)         'Value',3);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

211)         set(model.imageTypeSelection,'BackgroundColor','w');
212)         
213)         
214)         % coordinate Table
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

215)         pVoxel = uipanel(parent,'Title','ROI','Position',cell2mat(main_grid(1,3)));
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

216)         set(pVoxel,'BackgroundColor','w');
217)         lVoxelDef = createLabel(pVoxel, [0 0.9 1 0.1],'<ROI Name>+[offset];');
218)         model.txtVoxelDef = createTextField(pVoxel,[0 0 1 0.9],...
219)             sprintf(DEFAULT.voxelstring));
220)         set(model.txtVoxelDef,'HorizontalAlignment','left');
221)         set(model.txtVoxelDef,'Max',20);
222)         set(model.txtVoxelDef,'Min',0);
223)         set(model.txtVoxelDef, 'FontName', 'FixedWidth');
224)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

225)         %normalizations
226)         pNorm = uipanel(parent,'Title','Normalization','Position',cell2mat(main_grid(2,3)));
227)         set(pNorm,'BackgroundColor','w');
228)         
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

229)         createLabel(pNorm,[0 0.75 1 0.25],'psth norm4SVM');
230)         norm1Model = {'none','mean','minmax'};
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

231)         model.selNormPST = uicontrol(pNorm,'Style','popupmenu',...
232)             'Units','normalized',...
233)             'Position',[0.0 0.5 1 0.25],...
234)             'String',norm1Model,...
235)             'UserData',norm1Model,...
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

236)             'Value',2);
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

237)          set(model.selNormPST,'BackgroundColor','w');   
238)         
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

239)         createLabel(pNorm,[0 0.25 1 0.25],'Col Bias removal');
240)         norm2Model = {'on','off'};
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

241)         model.selNormClass = uicontrol(pNorm,'Style','popupmenu',...
242)             'Units','normalized',...
243)             'Position',[0.0 0.0 1 0.25],...
244)             'String',norm2Model,...
245)             'UserData',norm2Model,...
246)             'Value',1);
247)          set(model.selNormClass,'BackgroundColor','w');   
248)         
249)         %buttons
250)         pButtons = uipanel(parent,'Position',cell2mat(main_grid(1,4)));
251)         set(pButtons,'BackgroundColor','w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

252)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

253)         btnRunButton1 = uicontrol(pButtons,'String','run coord-Table',...
254)             'Units','normalized','Position',[0 0 0.33 1]);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

255)         set(btnRunButton1,'Callback',{@cbRunPreprocessing,model,'COORD'}); % set here, because of model.    
256)         set(btnRunButton1,'Enable','on');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

257)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

258)         btnRunButton2 = uicontrol(pButtons,'String','run full Brain Searchlight',...
259)             'Units','normalized','Position',[0.33 0 0.33 1]);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

260)         set(btnRunButton2,'Callback',{@cbRunPreprocessing,model,'FBS'}); % set here, because of model.  
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

261)         set(btnRunButton2,'Enable','off');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

262)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

263)         btnRunButton3 = uicontrol(pButtons,'String','run ROI-Image processing',...
264)             'Units','normalized','Position',[0.66 0 0.33 1]);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

265)         set(btnRunButton3,'Callback',{@cbRunPreprocessing,model,'ROI'}); % set here, because of model.    
266)         set(btnRunButton3,'Enable','on');
267) end
268) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

269) function model = createSecondStepPanel(model,parent,DEFAULT)
270) basecolor = 'w';
271) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

272) pTime = uipanel(parent,'Units','normalized','Position',[0.0 0.8 1 0.2]);
273)     set(pTime,'Title','Decode Timeframe Options');
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

274)     set(pTime,'BackgroundColor',basecolor);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

275)     grid_h = 0.3;
276)     grid_w = 0.3;
277)     time_grid = cell([3 3]);
278)     time_grid{1,1} = [0.0 0.63 grid_w grid_h];
279)     time_grid{2,1} = [0.4 0.63 grid_w grid_h];
280)     time_grid{3,1} = [0.7 0.63 grid_w grid_h];
281)     time_grid{1,2} = [0.0 0.33 grid_w grid_h];
282)     time_grid{2,2} = [0.4 0.33 grid_w grid_h];
283)     time_grid{3,2} = [0.7 0.33 grid_w grid_h];
284)     time_grid{1,3} = [0.0 0.03 grid_w grid_h];
285)     time_grid{2,3} = [0.4 0.03 grid_w grid_h];
286)     time_grid{3,3} = [0.7 0.03 grid_w grid_h];
287) 
288)     lStart      = createLabel(pTime, cell2mat(time_grid(2,1)) ,'Start [sec]');
289)     lEnd        = createLabel(pTime, cell2mat(time_grid(3,1)) ,'End [sec]');
290)     lFrameShift = createLabel(pTime, cell2mat(time_grid(1,2)),'Frame Shift');
291)     lFramsSize  = createLabel(pTime, cell2mat(time_grid(1,3)),'Frame Size');
292)     
293)     model.txtFrameShiftStart   = createTextField(pTime,cell2mat(time_grid(2,2)),DEFAULT.frameshiftstart);
294)     model.txtFrameShiftEnd     = createTextField(pTime,cell2mat(time_grid(3,2)),DEFAULT.frameshiftend);
295)     model.txtFrameShiftDur     = createTextField(pTime,cell2mat(time_grid(2,3)),DEFAULT.frameshiftdur);
296) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

297)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

298) pSVM = uipanel(parent,'Units','normalized','Position',[0 0.4 0.5 0.4]);
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

299)     set(pSVM,'Title','SVM Classification');
300)     set(pSVM,'BackgroundColor',basecolor);
301) 
302)     model.txtSVMopts = createTextField(pSVM,[0 0.75 1 0.25],DEFAULT.svmoptstring);
303)     set(model.txtSVMopts,'HorizontalAlignment','left');
304)     
305)     model.txtSVMnfold = createTextField(pSVM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
306)     createLabel(pSVM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
307)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

308) pSOM = uipanel(parent,'Units','normalized','Position',[0.5 0.4 0.5 0.4]);
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

309)     set(pSOM,'Title','SOM Classification');
310)     set(pSOM,'BackgroundColor',basecolor);
311) 
312)     model.txtSOMopts = createTextField(pSOM,[0 0.75 1 0.25],'4x3 rect');
313)     set(model.txtSOMopts,'HorizontalAlignment','left');
314)         set(model.txtSOMopts,'Enable','off');
315) 
316)     model.txtSOMnfold = createTextField(pSOM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
317)         set(model.txtSOMnfold,'Enable','off');
318)     createLabel(pSOM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
319) 
320) % buttons
321)     btnRunSVM = uicontrol(pSVM,'String','run SVM Crossvalidation',...
322)         'Units','normalized',...
323)         'Position',[0 0.25 1 0.25]);
324)     set(btnRunSVM,'Callback',{@cbRunDecode,model,'SVM'}); % set here, because of model.
325)     set(btnRunSVM,'Enable','on');
326)     
327)     btnRunXSVM = uicontrol(pSVM,'String','run SVM X-Subject validation',...
328)         'Units','normalized',...
329)         'Position',[0 0.0 1 0.25]);
330)     set(btnRunXSVM,'Callback',{@cbRunDecode,model,'XSVM'}); % set here, because of model.
331)     set(btnRunXSVM,'Enable','on');
332)     
333)     btnRunSOM = uicontrol(pSOM,'String','run SOM Crossvalidation',...
334)         'Units','normalized',...
335)     'Position',[0.0 0.25 1 0.25]);
336)     set(btnRunSOM,'Callback',{@cbRunDecode,model,'SOM'}); % set here, because of model.
337)     set(btnRunSOM,'Enable','off');
338) 
339)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
340)         'Units','normalized',...
341)         'Position',[0.0 0.0 1 0.25]);
342)     set(btnRunXSOM,'Callback',{@cbRunDecode,model,'XSOM'}); % set here, because of model.
343)     set(btnRunXSOM,'Enable','off');
344) end
345) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

346) function model = createVisualStepPanel(model,parent,DEFAULT)
347)     pButtonPane = uipanel(parent,'Units','normalized','Position',[0.0 0.5 1 0.5]);
348) %     set(pButtonPane,'Title','Plot');
349)     set(pButtonPane,'BackgroundColor','w');
350) 
351)     btnPlot01 = uicontrol(pButtonPane,'String','plot BBBB',...
352)         'Units','normalized',...
353)         'Position',[0.0 0.0 1 0.25]);
354)     set(btnPlot01,'Callback',{@cbPlot,model,'XSOM'}); % set here, because of model.
355)     set(btnPlot01,'Enable','on');
356) 
357) end
358) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

359) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

360) function cbSwitchTask(src,evnt,task,taskpanel)
361) set(taskpanel.preprocessing,'Visible','off');
362) set(taskpanel.classification,'Visible','off');
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

363) set(taskpanel.plot,'Visible','off');
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

364) 
365) switch task
366)     case 'PRE'
367)         set(taskpanel.preprocessing,'Visible','on');
368)     case 'CLASSIFY'
369)         set(taskpanel.classification,'Visible','on');
370)     case 'PLOT'
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

371)         set(taskpanel.plot,'Visible','on');
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

372) end
373) end
374) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

375) 
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

376) function cbRunPreprocessing(src,evnt,model,task)
Christoph Budziszewski enabled svm classification....

Christoph Budziszewski authored 15 years ago

377) main(model,'pre',task);
378) end
379) 
380) function cbRunDecode(src,evnt,model,task)
381) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

382) end
383) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

384) function cbPlot(src,evnt,model,type)
385) display('Not Implemented');
386) main(model,'plot',type);
387) end
388) 
389) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

390) function model = mcb_cd(src,evnt,model)
391) disp('CD');
392) directory_name = uigetdir(model.baseDir,'Select Study Base Directory ...');
393) model.baseDir = directory_name;
394) model = scanDirs(model);
395) end
396) 
397) function mcb_save(src,evnt,model)
398) disp('SAVE');
399) baseDir  = model.baseDir;
400) timeLine = getTimeLineParams(model);
401) classDefString = getClassDefString(model);
402) coordDefString = getCoordDefString(model);
403) 
404) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
405) save( fullfile(path,file),'baseDir','timeLine','classDefString','coordDefString') ;
406) end
407) 
408) function model = mcb_load(src,evnt,model)
409) disp('LOAD');
410) [file path] = uigetfile('*.mat','Load Params ...',model.baseDir);
411) l = load(fullfile(path,file));
412) % assignin('base','l',l);
413) model = setTimeLineParams(model,l.timeLine);
414) model = setClassDefString(model,l.classDefString);
415) model = setCoordDefString(model,l.coordDefString);
416) model.baseDir = l.baseDir;
417) model = scanDirs(model);
418) 
419) end
420) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

421) function label = createLabel(parent,  pos, labelText)
422)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
423)     set(label,'HorizontalAlignment','left');
424)     set(label,'BackgroundColor','w');
425) end
426) 
427) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

428) %     textfieldcolor = [0.9 0.9 0.0];
429)     textfieldcolor = 'w';