27ebd4d9e871645fa6fea3731053a852e7b2b49a
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 task-models implementet.

Christoph Budziszewski authored 15 years ago

36)     model1 = struct;
37)     model1.baseDir = DEFAULT.wd;
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

38) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

39)     model1.txtBaseDir = createLabel(frame,[0 0.97 1 0.03],model1.baseDir);
40)     set(model1.txtBaseDir,'BackgroundColor','w');
41)     set(model1.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 task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

52)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

53)     % fill with data
54)     model1 = scanDirs(model1);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

56)     % CLASSIFICATION
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

57)     model2 = struct;
58)     
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

59)     task.classification = uipanel(frame,'Title','Classification','Position',[0 0.0 1 TASK_HEIGHT]);
60)     set(task.classification,'BackgroundColor','w');
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

61)     model2 = createSecondStepPanel(model2,task.classification,DEFAULT);
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

63)     % PLOT
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

64)     model3 = struct;
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

65)     task.plot = uipanel(frame,'Title','Plot','Position',[0 0.0 1 TASK_HEIGHT]);
66)     set(task.plot,'BackgroundColor','w');
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

67)     model3 = createVisualStepPanel(model3,task.plot,DEFAULT);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

92)     savemenu = uimenu(frame,'Label','Save/Load');
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

93)         uimenu(savemenu,'Label','Save Preprocessing Parameter','Callback',{@mcb_save,model1});
94)         uimenu(savemenu,'Label','Load Preprocessing Parameter','Callback',{@mcb_load,model1});
95)         uimenu(savemenu,'Label','Save Decode Parameter','Callback',{@mcb_save,model2},'Enable','off');
96)         uimenu(savemenu,'Label','Load Decode Parameter','Callback',{@mcb_load,model2},'Enable','off');
97)         uimenu(savemenu,'Label','Save All','Callback',{@mcb_save,model1},'Enable','off');
98)         uimenu(savemenu,'Label','Load All','Callback',{@mcb_load,model1},'Enable','off');
99)         
100)     uimenu(frame,'Label','change Study','Callback',{@mcb_cd,model1},'Enable','off');
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

103) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

112)     main_grid = cell(2,4);
113)     main_grid{1,1} = [0 0.7 0.4 0.3];
114)     main_grid{1,2} = [0 0.5 0.5 0.2];
115)     main_grid{1,3} = [0 0.1 0.5 0.4];
116)     main_grid{1,4} = [0 0.0 1.0 0.1];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

118)     main_grid{2,1} = [0.4 0.7 0.6 0.3];
119)     main_grid{2,2} = [0.5 0.5 0.5 0.2];
120)     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

121)     
122)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

123)     pSubject = uipanel(parent,'Units','normalized','Position',cell2mat(main_grid(1,1)));
124)     set(pSubject,'Title','Subjects');
125)     set(pSubject,'BackgroundColor','w');
126)     
127)     subjectList = {'DUMMY Subj1','DUMMY Subj2','DUMMY Subj3','DUMMY Subj4'};
128)     model.subjectSelector = uicontrol(pSubject,'Style','listbox',...
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

129)                     'Min',1, 'Max',3,...
130)                     'String',subjectList,...
131)                     'UserData',subjectList,...
132)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

136)     
137)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

139)     set(pClasses,'Title','Class Definitions');
140)     set(pClasses,'BackgroundColor','w');
141)         lClassDef = uicontrol(pClasses,...
142)             'Style','text',...
143)             'String',sprintf('<Label>,\t <[Event, Event, ..]>;'),...
144)             'Units','normalized',...
145)             'Position',[0 0.8 1 0.2]);
146)         set(lClassDef,'BackgroundColor','w');
147)         set(lClassDef,'HorizontalAlignment','left');
148)         
149)         model.txtClassDef = uicontrol(pClasses,'Style','edit',...
150)             'String',sprintf(DEFAULT.classdefstring),...
151)             'Units','normalized',...
152)             'Position',[0 0 1 0.8]);
153)         set(model.txtClassDef,'HorizontalAlignment','left');
154)         set(model.txtClassDef,'Max',20);
155)         set(model.txtClassDef,'Min',0);
156)         set(model.txtClassDef, 'FontName', 'FixedWidth');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

158) 
159) 
160)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

161)     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

162)     set(pPSTH,'BackgroundColor','w');
163)         
164)         grid_h = 0.16;
165)         grid_w = 0.3;
166)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

167)         tl_grid = cell([3 6]);
168)         tl_grid{2,1} = [0.0 0.83 grid_w grid_h];
169)         tl_grid{2,1} = [0.4 0.83 grid_w grid_h];
170)         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

171)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

172)         tl_grid{1,2} = [0.0 0.66 grid_w grid_h];
173)         tl_grid{2,2} = [0.4 0.66 grid_w grid_h];
174)         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

175) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

176)         tl_grid{1,3} = [0.0 0.5 grid_w grid_h];
177)         tl_grid{2,3} = [0.4 0.5 grid_w grid_h];
178)         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

179)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

180)         tl_grid{1,4} = [0.0 0.33 grid_w grid_h];
181)         tl_grid{2,4} = [0.4 0.33 grid_w grid_h];
182)         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

183) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

184)         tl_grid{1,5} = [0.0 0.16 0.5 grid_h];
185)         tl_grid{2,5} = [0.5 0.16 grid_w grid_h];
186)         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

187)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

188)         tl_grid{1,6} = [0.0 0.0 0.5 grid_h];
189)         tl_grid{2,6} = [0.5 0.0 grid_w grid_h];
190)         tl_grid{3,6} = [0.75 0.0 grid_w grid_h];
191) 
192)         lStart      = createLabel(pPSTH, cell2mat(tl_grid(2,1)) ,'Start [sec]');
193)         lEnd        = createLabel(pPSTH, cell2mat(tl_grid(3,1)) ,'End [sec]');
194)         lPSTH       = createLabel(pPSTH, cell2mat(tl_grid(1,2)),'PSTH Range');
195)         lBaseline   = createLabel(pPSTH, cell2mat(tl_grid(1,3)),'Baseline');
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

198) 
199) 
200)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),DEFAULT.pststart);
201)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),DEFAULT.pstend);
202)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),DEFAULT.baselinestart);
203)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),DEFAULT.baselineend);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

205)         
206)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

207)         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

208)         set(pImage,'BackgroundColor','w');
209) 
210)         createLabel(pImage,[0.0 0.5 1 0.5],'Select Image Base');
211)         
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

213)         model.imageTypeSelection = uicontrol(pImage,'Style','popupmenu',...
214)         'Units','normalized',...
215)         'Position',[0.0 0.0 1 0.5],...
216)         'String',imageRegExList,...
217)         'UserData',imageRegExList,...
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

219)         set(model.imageTypeSelection,'BackgroundColor','w');
220)         
221)         
222)         % coordinate Table
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

224)         set(pVoxel,'BackgroundColor','w');
225)         lVoxelDef = createLabel(pVoxel, [0 0.9 1 0.1],'<ROI Name>+[offset];');
226)         model.txtVoxelDef = createTextField(pVoxel,[0 0 1 0.9],...
227)             sprintf(DEFAULT.voxelstring));
228)         set(model.txtVoxelDef,'HorizontalAlignment','left');
229)         set(model.txtVoxelDef,'Max',20);
230)         set(model.txtVoxelDef,'Min',0);
231)         set(model.txtVoxelDef, 'FontName', 'FixedWidth');
232)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

233)         %normalizations
234)         pNorm = uipanel(parent,'Title','Normalization','Position',cell2mat(main_grid(2,3)));
235)         set(pNorm,'BackgroundColor','w');
236)         
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

239)         model.selNormPST = uicontrol(pNorm,'Style','popupmenu',...
240)             'Units','normalized',...
241)             'Position',[0.0 0.5 1 0.25],...
242)             'String',norm1Model,...
243)             'UserData',norm1Model,...
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

249)         model.selNormClass = uicontrol(pNorm,'Style','popupmenu',...
250)             'Units','normalized',...
251)             'Position',[0.0 0.0 1 0.25],...
252)             'String',norm2Model,...
253)             'UserData',norm2Model,...
254)             'Value',1);
255)          set(model.selNormClass,'BackgroundColor','w');   
256)         
257)         %buttons
258)         pButtons = uipanel(parent,'Position',cell2mat(main_grid(1,4)));
259)         set(pButtons,'BackgroundColor','w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

273)         set(btnRunButton3,'Callback',{@cbRunPreprocessing,model,'ROI'}); % set here, because of model.    
274)         set(btnRunButton3,'Enable','on');
275) end
276) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

277) function model = createSecondStepPanel(model,parent,DEFAULT)
278) basecolor = 'w';
279) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

306) 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

307)     set(pSVM,'Title','SVM Classification');
308)     set(pSVM,'BackgroundColor',basecolor);
309) 
310)     model.txtSVMopts = createTextField(pSVM,[0 0.75 1 0.25],DEFAULT.svmoptstring);
311)     set(model.txtSVMopts,'HorizontalAlignment','left');
312)     
313)     model.txtSVMnfold = createTextField(pSVM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
314)     createLabel(pSVM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
315)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

316) 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

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

Christoph Budziszewski authored 15 years ago

354) function model = createVisualStepPanel(model,parent,DEFAULT)
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

355)     pButtonPane = uipanel(parent,'Units','normalized','Position',[0 0.5 1 0.5]);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

356) %     set(pButtonPane,'Title','Plot');
357)     set(pButtonPane,'BackgroundColor','w');
358) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

359)     btnPlot01 = uicontrol(pButtonPane,'String','plot performance and SE',...
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

360)         'Units','normalized',...
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

361)         'Position',[0.0 0.0 0.5 0.25]);
362)     set(btnPlot01,'Callback',{@cbPlot,model,'simple'});
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

363)     set(btnPlot01,'Enable','on');
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

364)     
365)     btnPlot02 = uicontrol(pButtonPane,'String','plot subject performance and mean with SE',...
366)         'Units','normalized',...
367)         'Position',[0.5 0.0 0.5 0.25]);
368)     set(btnPlot02,'Callback',{@cbPlot,model,'x-subject-val'});
369)     set(btnPlot02,'Enable','on');
370) 
371) %     btnPlot03 = uicontrol(pButtonPane,'String','plot class performance and mean',...
372) %         'Units','normalized',...
373) %         'Position',[0.0 0.5 0.5 0.25]);
374) %     set(btnPlot03,'Callback',{@cbPlot,model,'class performance'}); 
375) %     set(btnPlot03,'Enable','on');
376)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

377) end
378) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

384) 
385) switch task
386)     case 'PRE'
387)         set(taskpanel.preprocessing,'Visible','on');
388)     case 'CLASSIFY'
389)         set(taskpanel.classification,'Visible','on');
390)     case 'PLOT'
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

392) end
393) end
394) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

397) main(model,'pre',task);
398) end
399) 
400) function cbRunDecode(src,evnt,model,task)
401) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

402) end
403) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

404) function cbPlot(src,evnt,model,type)
405) main(model,'plot',type);
406) end
407) 
408) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

409) function model = mcb_cd(src,evnt,model)
410) disp('CD');
411) directory_name = uigetdir(model.baseDir,'Select Study Base Directory ...');
412) model.baseDir = directory_name;
413) model = scanDirs(model);
414) end
415) 
416) function mcb_save(src,evnt,model)
417) disp('SAVE');
418) baseDir  = model.baseDir;
419) timeLine = getTimeLineParams(model);
420) classDefString = getClassDefString(model);
421) coordDefString = getCoordDefString(model);
422) 
423) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
424) save( fullfile(path,file),'baseDir','timeLine','classDefString','coordDefString') ;
425) end
426) 
427) function model = mcb_load(src,evnt,model)
428) disp('LOAD');
429) [file path] = uigetfile('*.mat','Load Params ...',model.baseDir);
430) l = load(fullfile(path,file));
431) % assignin('base','l',l);
432) model = setTimeLineParams(model,l.timeLine);
433) model = setClassDefString(model,l.classDefString);
434) model = setCoordDefString(model,l.coordDefString);
435) model.baseDir = l.baseDir;
436) model = scanDirs(model);
437) 
438) end
439) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

440) function label = createLabel(parent,  pos, labelText)
441)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
442)     set(label,'HorizontalAlignment','left');
443)     set(label,'BackgroundColor','w');
444) end
445) 
446) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

447) %     textfieldcolor = [0.9 0.9 0.0];
448)     textfieldcolor = 'w';