9e39a52b88add802a20772cd0b1969df4565ffdf
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

1) function ui_main(varargin)
2) 
3) %  Initialize and hide the GUI as it is being constructed.
4)     frameWidth=450;
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

6)     
7)     frame = figure('Visible','off','Position',[0,0,frameWidth,frameHeight]);
8)     movegui(frame,'west'); % get this thing visible on smaller displays.
9)     set(frame,'Name','SVMCrossVal Decode Performance 4 SPM');
10)     set(frame,'NumberTitle','off');
11)     set(frame,'MenuBar','none');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

16)     task = struct;
17)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

18) %     studyID = getPreviousStudyID();
Christoph Budziszewski spm2 compatibility, start c...

Christoph Budziszewski authored 14 years ago

19)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

20) %     StudyArgs = load_study(studyID);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

21) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

22)     model = struct;
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

23)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

24)     model.txtBaseDir = createLabel(frame,[0 0.97 0.8 0.03],'');
25)     set(model.txtBaseDir,'BackgroundColor','w');
26)     set(model.txtBaseDir,'ForegroundColor','b');
27)     
28)     model.txtStudyID = createLabel(frame,[0.8 0.97 0.2 0.03],'');
29)     set(model.txtStudyID,'BackgroundColor','w');
30)     set(model.txtStudyID,'ForegroundColor','r');    
31) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

32)     TASK_HEIGHT = 1-0.13;
33)     
34)     % PREPROCESSING
35)     task.preprocessing   = uipanel(frame,'Title','Preprocessing','Position',[0 0.0 1 TASK_HEIGHT]);
36)     set(task.preprocessing,'BackgroundColor','w');
37)     set(task.preprocessing,'Units','normalized');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

38)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

40)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

41)     % fill with data
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

42) %     model = scanDirs(model);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

44)     % CLASSIFICATION
45)     task.classification = uipanel(frame,'Title','Classification','Position',[0 0.0 1 TASK_HEIGHT]);
46)     set(task.classification,'BackgroundColor','w');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

47)     model = createSecondStepPanel(model,task.classification);
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

49)     % PLOT
50)     task.plot = uipanel(frame,'Title','Plot','Position',[0 0.0 1 TASK_HEIGHT]);
51)     set(task.plot,'BackgroundColor','w');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

52)     model = createVisualStepPanel(model,task.plot);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

54)     % TASK
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

55)     task.taskSwitch = uibuttongroup(frame,'Position',[0 1-0.13 1 0.10]);
56)     % controlls togglebuttons
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

57)         set(task.taskSwitch,'BackgroundColor','w');
58)         set(task.taskSwitch,'Units','normalized');
59)     
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

60)         btnSwitchPreprocessing = uicontrol(task.taskSwitch,'Style','pushbutton',...
61)             'String','ImageProcessing',...
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

62)             'Units','normalized','Position',[0.0 0.0 0.33 1]);
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

63)         set(btnSwitchPreprocessing,'Callback',{@cbSwitchTask,'PRE',task}); 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

64)         set(btnSwitchPreprocessing,'Enable','on');
65) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

66)         btnSwitchClassify = uicontrol(task.taskSwitch,'Style','pushbutton',...
67)             'String','Decode',...
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

68)             'Units','normalized','Position',[0.33 0.0 0.33 1]);
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

69)         set(btnSwitchClassify,'Callback',{@cbSwitchTask,'CLASSIFY',task}); 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

70)         set(btnSwitchClassify,'Enable','on');
71) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

72)         btnSwitchPlot = uicontrol(task.taskSwitch,'Style','pushbutton',...
73)             'String','Plot',...
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

74)             'Units','normalized','Position',[0.66 0.0 0.33 1]);
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

75)         set(btnSwitchPlot,'Callback',{@cbSwitchTask,'PLOT',task}); 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

76)         set(btnSwitchPlot,'Enable','on');
77) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

78) 
79)     % menus
80) 
81)     savemenu = uimenu(frame,'Label','Save ...','Enable','on');
82)         uimenu(savemenu,'Label','Save All','Callback',{@mcb_save,model},'Enable','on');
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

83)         
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

84)     studySelectMenu = uimenu(frame,'Label','Study ...','Enable','on');
85)         uimenu(studySelectMenu,'Label','*new Study*','Callback',{@mcb_new_study,studySelectMenu,model});
86)         fillStudyMenu(studySelectMenu,model);
87)         
88)     updateMenu = uimenu(frame,'Label','update ...','Enable','off');
89)         uimenu(updateMenu,'Label','scan dirs','Callback',{@ssss,studySelectMenu});
90)         
91) %     newStudyMenu = uimenu(frame,'Label','new Study','Enable','on');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

92) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

93)     load_study([getPreviousStudyID '.mat'],model);
94)     cbSwitchTask(0,0,'PRE',task);
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

95)     set(frame,'Visible','on');
96) 
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

98) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

99) %%%%% ui elements
100) function model = createFirstStepPanel(model,parent)
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

111)     
112)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

113)     pSubject = uipanel(parent,'Units','normalized','Position',cell2mat(main_grid(1,1)));
114)     set(pSubject,'Title','Subjects');
115)     set(pSubject,'BackgroundColor','w');
116)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

117) %     subjectNames = listDirNames(getBaseDir(model));
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

118)     model.subjectSelector = uicontrol(pSubject,'Style','listbox',...
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

119)                     'Min',1, 'Max',3,...
120)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

123)     set(model.subjectSelector,'BackgroundColor','w');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

124) 
125)   
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

126)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

128)     set(pClasses,'Title','Class Definitions');
129)     set(pClasses,'BackgroundColor','w');
130)         lClassDef = uicontrol(pClasses,...
131)             'Style','text',...
132)             'String',sprintf('<Label>,\t <[Event, Event, ..]>;'),...
133)             'Units','normalized',...
134)             'Position',[0 0.8 1 0.2]);
135)         set(lClassDef,'BackgroundColor','w');
136)         set(lClassDef,'HorizontalAlignment','left');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

138)         
139)         model.txtClassDef = uicontrol(pClasses,'Style','edit',...
140)             'Units','normalized',...
141)             'Position',[0 0 1 0.8]);
142)         set(model.txtClassDef,'HorizontalAlignment','left');
143)         set(model.txtClassDef,'Max',20);
144)         set(model.txtClassDef,'Min',0);
145)         set(model.txtClassDef, 'FontName', 'FixedWidth');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

147) 
148) 
149)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

151)     set(pPSTH,'BackgroundColor','w');
152)         
153)         grid_h = 0.16;
154)         grid_w = 0.3;
155)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

156)         tl_grid = cell([3 6]);
157)         tl_grid{2,1} = [0.0 0.83 grid_w grid_h];
158)         tl_grid{2,1} = [0.4 0.83 grid_w grid_h];
159)         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

160)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

164) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

168)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

172) 
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

176)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

177)         tl_grid{1,6} = [0.0 0.0 0.5 grid_h];
178)         tl_grid{2,6} = [0.5 0.0 grid_w grid_h];
179)         tl_grid{3,6} = [0.75 0.0 grid_w grid_h];
180) 
181)         lStart      = createLabel(pPSTH, cell2mat(tl_grid(2,1)) ,'Start [sec]');
182)         lEnd        = createLabel(pPSTH, cell2mat(tl_grid(3,1)) ,'End [sec]');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

183)         lPSTH       = createLabel(pPSTH, cell2mat(tl_grid(1,2)) ,'PSTH Range');
184)         lBaseline   = createLabel(pPSTH, cell2mat(tl_grid(1,3)) ,'Baseline');
185)         lTRF        = createLabel(pPSTH, cell2mat(tl_grid(1,5)) ,'TR Factor');
186) 
187)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),'');
188)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),'');
189)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),'');
190)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),'');
191)         model.txtTrFactor          = createTextField(pPSTH,cell2mat(tl_grid(2,5)),'');
192)         model.labelTR              = createTextField(pPSTH,cell2mat(tl_grid(3,5)),'');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

193)         
194)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

196)         set(pImage,'BackgroundColor','w');
197) 
198)         createLabel(pImage,[0.0 0.5 1 0.5],'Select Image Base');
199)         
200)         model.imageTypeSelection = uicontrol(pImage,'Style','popupmenu',...
201)         'Units','normalized',...
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

202)         'Position',[0.0 0.0 1 0.5]);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

203)         set(model.imageTypeSelection,'BackgroundColor','w');
204)         
205)         % coordinate Table
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

207)         set(pVoxel,'BackgroundColor','w');
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

208)         lVoxelDef = createLabel(pVoxel, [0 0.9 1 0.1],'<ROI Name> [+ radius (mm)];');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

209)         model.txtVoxelDef = createTextField(pVoxel,[0 0 1 0.9],'');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

210)         set(model.txtVoxelDef,'HorizontalAlignment','left');
211)         set(model.txtVoxelDef,'Max',20);
212)         set(model.txtVoxelDef,'Min',0);
213)         set(model.txtVoxelDef, 'FontName', 'FixedWidth');
214)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

215)         %normalizations
216)         pNorm = uipanel(parent,'Title','Normalization','Position',cell2mat(main_grid(2,3)));
217)         set(pNorm,'BackgroundColor','w');
218)         
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

219)         createLabel(pNorm,[0 0.75 1 0.25],'psth norm4SVM');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

220)         
221)         
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

222)         norm1Model = {'none','mean','minmax'};
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

223) 
224)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

225)         model.selNormPST = uicontrol(pNorm,'Style','popupmenu',...
226)             'Units','normalized',...
227)             'Position',[0.0 0.5 1 0.25],...
228)             'String',norm1Model,...
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

229)             'UserData',norm1Model);
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

230)          set(model.selNormPST,'BackgroundColor','w');   
231)         
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

232)         model.chkColBias = uicontrol(pNorm,'Style','checkbox',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

233)             'Units','normalized',...
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

234)             'Position',[0.0 0.1 1 0.25],...
235)             'String','column Bias removal',...
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

236)             'Enable','on');
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

237)          set(model.chkColBias,'BackgroundColor','w');   
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

238)         
239)         %buttons
240)         pButtons = uipanel(parent,'Position',cell2mat(main_grid(1,4)));
241)         set(pButtons,'BackgroundColor','w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

247)         
Christoph Budziszewski error tracking: added psth-...

Christoph Budziszewski authored 14 years ago

248)         btnRunButton2 = uicontrol(pButtons,'String',sprintf('load ROI for FBS'),...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

249)             'Units','normalized','Position',[0.33 0 0.33 1]);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

250)         set(btnRunButton2,'Callback',{@cbRunPreprocessing,model,'FBS'}); % set here, because of model.  
Christoph Budziszewski snapshot, working on fbs

Christoph Budziszewski authored 15 years ago

251)         set(btnRunButton2,'Enable','on');
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)         btnRunButton3 = uicontrol(pButtons,'String','run ROI-Image processing',...
254)             'Units','normalized','Position',[0.66 0 0.33 1]);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

255)         set(btnRunButton3,'Callback',{@cbRunPreprocessing,model,'ROI'}); % set here, because of model.    
256)         set(btnRunButton3,'Enable','on');
257) end
258) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

259) function model = createSecondStepPanel(model,parent)
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

260) basecolor = 'w';
261) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

265)     grid_h = 0.3;
266)     grid_w = 0.3;
267)     time_grid = cell([3 3]);
268)     time_grid{1,1} = [0.0 0.63 grid_w grid_h];
269)     time_grid{2,1} = [0.4 0.63 grid_w grid_h];
270)     time_grid{3,1} = [0.7 0.63 grid_w grid_h];
271)     time_grid{1,2} = [0.0 0.33 grid_w grid_h];
272)     time_grid{2,2} = [0.4 0.33 grid_w grid_h];
273)     time_grid{3,2} = [0.7 0.33 grid_w grid_h];
274)     time_grid{1,3} = [0.0 0.03 grid_w grid_h];
275)     time_grid{2,3} = [0.4 0.03 grid_w grid_h];
276)     time_grid{3,3} = [0.7 0.03 grid_w grid_h];
277) 
278)     lStart      = createLabel(pTime, cell2mat(time_grid(2,1)) ,'Start [sec]');
279)     lEnd        = createLabel(pTime, cell2mat(time_grid(3,1)) ,'End [sec]');
280)     lFrameShift = createLabel(pTime, cell2mat(time_grid(1,2)),'Frame Shift');
281)     lFramsSize  = createLabel(pTime, cell2mat(time_grid(1,3)),'Frame Size');
282)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

283)     model.txtFrameShiftStart   = createTextField(pTime,cell2mat(time_grid(2,2)),'');
284)     model.txtFrameShiftEnd     = createTextField(pTime,cell2mat(time_grid(3,2)),'');
285)     model.txtFrameShiftDur     = createTextField(pTime,cell2mat(time_grid(2,3)),'');
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

286) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

289)     set(pSVM,'Title','SVM Classification');
290)     set(pSVM,'BackgroundColor',basecolor);
291) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

293)     set(model.txtSVMopts,'HorizontalAlignment','left');
294)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

296)     createLabel(pSVM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
297)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

298)     model.chkSVMrnd = uicontrol(pSVM,'Style','checkbox','Units','normalized','Position',[0.1 0.50 0.9 0.16]);
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

299)     set(model.chkSVMrnd,'String','Randomize Datapoints');
300)     set(model.chkSVMrnd,'BackgroundColor','w');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

301) %     set(model.chkSVMrnd,'Value',StudyArgs.svmrnd);
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

302)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

303)     btnRunSVM = uicontrol(pSVM,'String','run batchmode SVM Crossvalidation',...
304)         'Units','normalized',...
305)         'Position',[0 0.25 1 0.25]);
306)     set(btnRunSVM,'Enable','on');
307)     
308)     btnRunXSVM = uicontrol(pSVM,'String','run SVM X-Subject validation',...
309)         'Units','normalized',...
310)         'Position',[0 0.0 1 0.25]);
311)     set(btnRunXSVM,'Enable','on');
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

314)     set(pSOM,'Title','SOM Classification');
315)     set(pSOM,'BackgroundColor',basecolor);
316) 
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

317)     createLabel(pSOM,[0 0.75 0.3 0.20],'Size:');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

318)     model.txtSomM = createTextField(pSOM,[0.3 0.75 0.25 0.2],'');
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

319)     somsizemal = createLabel(pSOM,[0.55 0.75 0.2 0.20],'x');
320)     set(somsizemal,'HorizontalAlignment','center');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

321)     model.txtSomN = createTextField(pSOM,[0.75 0.75 0.25 0.20],'');
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

322)     latticeModel = {'rect','hexa'};
323)     model.selSomLattice = uicontrol(pSOM,'Style','popupmenu',...
324)         'Units','normalized',...
325)         'Position',[0.0 0.5 0.3 0.20],...
326)         'String',latticeModel,...
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

327)         'UserData',latticeModel);
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

328)     set(model.selSomLattice,'BackgroundColor','w');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

329) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

330)     model.txtSOMnfold = createTextField(pSOM,[0.5 0.50 0.25 0.20],'');
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

331) %     set(model.txtSOMnfold,'Enable','off');
332)     createLabel(pSOM,[0.75 0.5 0.25 0.20 ],'-Fold CrossVal');
333)        
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

334) 
335)     btnRunSOM = uicontrol(pSOM,'String','run SOM Crossvalidation',...
336)         'Units','normalized',...
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

337)         'Position',[0.0 0.25 1 0.25]);
Christoph Budziszewski SOM Single run

Christoph Budziszewski authored 15 years ago

338)     set(btnRunSOM,'Enable','on');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

339) 
340)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
341)         'Units','normalized',...
342)         'Position',[0.0 0.0 1 0.25]);
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

343)     set(btnRunXSOM,'Enable','on');
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

344)     
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

345) pSearchlight = uipanel(parent,'Units','normalized','Position',[0.0 0.1 0.5 0.3]);
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

346)     set(pSearchlight,'Title','Spatiotemporal FB classification');
347)     set(pSearchlight,'BackgroundColor',basecolor);
348)     
349)     lSearchligh = createLabel(pSearchlight, [0 0.6 0.5 0.3],'Searchlight Radius');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

350)     model.txtSearchlightRadius = createTextField(pSearchlight,[0.5 0.6 0.5 0.3],'');
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

351)     
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

352)     lFBSTiming = createLabel(pSearchlight, [0 0.3 0.5 0.3],'Optional Timeline ( e.g. ''-5 0 5 10 15'')');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

353)     model.txtSearchlightTimeline = createTextField(pSearchlight,[0.5 0.3 0.5 0.3],'');
Christoph Budziszewski fbs timeline mod

Christoph Budziszewski authored 14 years ago

354) 
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

355)     btnRunFBS = uicontrol(pSearchlight,'String','run Spatiotemporal FB classification',...
356)         'Units','normalized',...
357)         'Position',[0.0 0.0 1 0.3]);
Christoph Budziszewski snapshot, working on fbs

Christoph Budziszewski authored 15 years ago

358)     set(btnRunFBS,'Enable','on');
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

359)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

360) 
361) % button callbacks set here, because of model.
362)     set(btnRunSVM, 'Callback',{@cbRunDecode,model,'SVM'}); 
363)     set(btnRunXSVM,'Callback',{@cbRunDecode,model,'XSVM'}); 
364)     set(btnRunSOM, 'Callback',{@cbRunDecode,model,'SOM'});
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

365)     set(btnRunXSOM,'Callback',{@cbRunDecode,model,'XSOM'});
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 14 years ago

366)     set(btnRunFBS, 'Callback',{@cbRunDecode,model,'FBS'});
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

367) end
368) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

369) function model = createVisualStepPanel(model,parent)
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 14 years ago

370) 
371)     grid_h = 0.25;
372)     grid_w = 0.5;
373)     plot_grid = cell([3 3]);
374)     plot_grid{1,1} = [0.0 0.63 grid_w grid_h];
375)     plot_grid{1,2} = [0.0 0.33 grid_w grid_h];
376)     plot_grid{1,3} = [0.0 0.03 grid_w grid_h];
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

377)     plot_grid{2,1} = [0.25 0.63 grid_w grid_h];
378)     plot_grid{2,2} = [0.25 0.33 grid_w grid_h];
379)     plot_grid{2,3} = [0.25 0.03 grid_w grid_h];
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 14 years ago

380) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

382) %     set(pButtonPane,'Title','Plot');
383)     set(pButtonPane,'BackgroundColor','w');
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

384)     
385)     btnPlot03 = uicontrol(pButtonPane,'String','plot PSTH',...
386)         'Units','normalized',...
387)         'Position',cell2mat(plot_grid(2,1)));
388)     set(btnPlot03,'Callback',{@cbPlot,model,'psth'}); 
389)     set(btnPlot03,'Enable','on');
390)   
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

392)         'Units','normalized',...
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

393)         'Position',cell2mat(plot_grid(2,2)));
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

394)     set(btnPlot01,'Callback',{@cbPlot,model,'simple'});
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

396)     
397)     btnPlot02 = uicontrol(pButtonPane,'String','plot subject performance and mean with SE',...
398)         'Units','normalized',...
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 14 years ago

399)         'Position',cell2mat(plot_grid(2,3)));
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

400)     set(btnPlot02,'Callback',{@cbPlot,model,'x-subject-val'});
401)     set(btnPlot02,'Enable','on');
402) 
403)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

404) end
405) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

406) %%%%% ui callbacks
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

407) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

408) function cbSwitchTask(src,evnt,task,taskpanel)
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

409) set(taskpanel.preprocessing,'Visible','off');
410) set(taskpanel.classification,'Visible','off');
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

412) switch task
413)     case 'PRE'
414)         set(taskpanel.preprocessing,'Visible','on');
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

416)     case 'CLASSIFY'
417)         set(taskpanel.classification,'Visible','on');
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

419)     case 'PLOT'
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

421) end
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

422) % assignin('base','model',model);
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

423) end
424) 
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

426) main(model,'pre',task);
427) end
428) 
429) function cbRunDecode(src,evnt,model,task)
430) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

431) end
432) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

433) function cbPlot(src,evnt,model,type)
434) main(model,'plot',type);
435) end
436) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

437) %%%%%%%%%% menu callbacks
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

438) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

439) function mcb_save(src,evnt,model)
440) studyID = get(model.txtStudyID,'String');
441) saveStudy(studyID,model);
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

442) end
443) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

444) function mcb_new_study(src,evnt,studymenu,uimodel)
445) display('CREATE STUDY');
446)     ui_createStudy(studymenu,uimodel);
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

447) end
448) 
449) 
450) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

451) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

452) 
453) 
454) 
455)