7984c76d06b6a9ac6174e73a6528bee841ab95f3
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 added randomize datapoints...

Christoph Budziszewski authored 15 years ago

16) DEFAULT.svmrnd          = 1;
Christoph Budziszewski enabled radius. but does no...

Christoph Budziszewski authored 15 years ago

17) DEFAULT.searchlightradius = 0;
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

18) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

19) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

36)     task = struct;
37)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

40) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

41)     model1.txtBaseDir = createLabel(frame,[0 0.97 1 0.03],model1.baseDir);
42)     set(model1.txtBaseDir,'BackgroundColor','w');
43)     set(model1.txtBaseDir,'ForegroundColor','b');
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

51)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

54)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

58)     % CLASSIFICATION
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

59)     model2 = struct;
60)     
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

65)     % PLOT
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

105) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

123)     
124)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

138)     
139)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

160) 
161) 
162)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

173)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

177) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

181)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

185) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

189)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

207)         
208)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

251)         model.selNormClass = uicontrol(pNorm,'Style','popupmenu',...
252)             'Units','normalized',...
253)             'Position',[0.0 0.0 1 0.25],...
254)             'String',norm2Model,...
255)             'UserData',norm2Model,...
256)             'Value',1);
257)          set(model.selNormClass,'BackgroundColor','w');   
258)         
259)         %buttons
260)         pButtons = uipanel(parent,'Position',cell2mat(main_grid(1,4)));
261)         set(pButtons,'BackgroundColor','w');
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)         btnRunButton1 = uicontrol(pButtons,'String','run coord-Table',...
264)             'Units','normalized','Position',[0 0 0.33 1]);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

309)     set(pSVM,'Title','SVM Classification');
310)     set(pSVM,'BackgroundColor',basecolor);
311) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

312)     model.txtSVMopts = createTextField(pSVM,[0 0.83 1 0.16],DEFAULT.svmoptstring);
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

313)     set(model.txtSVMopts,'HorizontalAlignment','left');
314)     
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

315)     model.txtSVMnfold = createTextField(pSVM,[0.0 0.66 0.5 0.16],DEFAULT.svmnfold);
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

316)     createLabel(pSVM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
317)     
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

318)     model.chkSVMrnd = uicontrol(pSVM,'Style','checkbox','Units','normalized','Position',[0.1 0.50 1 0.16]);
319)     set(model.chkSVMrnd,'String','Randomize Datapoints');
320)     set(model.chkSVMrnd,'BackgroundColor','w');
321)     set(model.chkSVMrnd,'Value',DEFAULT.svmrnd);
322)     
323)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

364) %     set(pButtonPane,'Title','Plot');
365)     set(pButtonPane,'BackgroundColor','w');
366) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

372)     
373)     btnPlot02 = uicontrol(pButtonPane,'String','plot subject performance and mean with SE',...
374)         'Units','normalized',...
375)         'Position',[0.5 0.0 0.5 0.25]);
376)     set(btnPlot02,'Callback',{@cbPlot,model,'x-subject-val'});
377)     set(btnPlot02,'Enable','on');
378) 
379) %     btnPlot03 = uicontrol(pButtonPane,'String','plot class performance and mean',...
380) %         'Units','normalized',...
381) %         'Position',[0.0 0.5 0.5 0.25]);
382) %     set(btnPlot03,'Callback',{@cbPlot,model,'class performance'}); 
383) %     set(btnPlot03,'Enable','on');
384)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

385) end
386) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

392) 
393) switch task
394)     case 'PRE'
395)         set(taskpanel.preprocessing,'Visible','on');
396)     case 'CLASSIFY'
397)         set(taskpanel.classification,'Visible','on');
398)     case 'PLOT'
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

400) end
401) end
402) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

405) main(model,'pre',task);
406) end
407) 
408) function cbRunDecode(src,evnt,model,task)
409) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

410) end
411) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

412) function cbPlot(src,evnt,model,type)
413) main(model,'plot',type);
414) end
415) 
416) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

448) function label = createLabel(parent,  pos, labelText)
449)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
450)     set(label,'HorizontalAlignment','left');
451)     set(label,'BackgroundColor','w');
452) end
453) 
454) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

455) %     textfieldcolor = [0.9 0.9 0.0];
456)     textfieldcolor = 'w';