aa21d53bf8e5ab8c14cb6b5afaf8fb6800e8a6db
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]';
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

13) DEFAULT.voxelstring     = 'M1 l + 3 \nM1 r + 3\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
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

74) %         set(task.taskSwitch,'Title','TASK');
75)         set(task.taskSwitch,'BackgroundColor','w');
76)         set(task.taskSwitch,'Units','normalized');
77)     
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

80)             'Units','normalized','Position',[0.0 0.0 0.33 1]);
81)         set(btnSwitchPreprocessing,'Callback',{@cbSwitchTask,'PRE',task}); 
82)         set(btnSwitchPreprocessing,'Enable','on');
83) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

86)             'Units','normalized','Position',[0.33 0.0 0.33 1]);
87)         set(btnSwitchClassify,'Callback',{@cbSwitchTask,'CLASSIFY',task}); 
88)         set(btnSwitchClassify,'Enable','on');
89) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

92)             'Units','normalized','Position',[0.66 0.0 0.33 1]);
93)         set(btnSwitchPlot,'Callback',{@cbSwitchTask,'PLOT',task}); 
94)         set(btnSwitchPlot,'Enable','on');
95) 
96)     % menu
97)     
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

109) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

111)     set(frame,'Visible','on');
112) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

115) 
116) function model = createFirstStepPanel(model,parent,DEFAULT)
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 = cell(2,4);
119)     main_grid{1,1} = [0 0.7 0.4 0.3];
120)     main_grid{1,2} = [0 0.5 0.5 0.2];
121)     main_grid{1,3} = [0 0.1 0.5 0.4];
122)     main_grid{1,4} = [0 0.0 1.0 0.1];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

127)     
128)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

135)                     'Min',1, 'Max',3,...
136)                     'String',subjectList,...
137)                     'UserData',subjectList,...
138)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

142)     
143)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

164) 
165) 
166)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

168)     set(pPSTH,'BackgroundColor','w');
169)         
170)         grid_h = 0.16;
171)         grid_w = 0.3;
172)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

173)         tl_grid = cell([3 6]);
174)         tl_grid{2,1} = [0.0 0.83 grid_w grid_h];
175)         tl_grid{2,1} = [0.4 0.83 grid_w grid_h];
176)         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

177)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

181) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

185)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

189) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

193)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

202) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

203)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),DEFAULT.pststart);
204)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),DEFAULT.pstend);
205)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),DEFAULT.baselinestart);
206)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),DEFAULT.baselineend);
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

228)         lVoxelDef = createLabel(pVoxel, [0 0.9 1 0.1],'<ROI Name> [+ radius (mm)];');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

229)         model.txtVoxelDef = createTextField(pVoxel,[0 0 1 0.9],...
230)             sprintf(DEFAULT.voxelstring));
231)         set(model.txtVoxelDef,'HorizontalAlignment','left');
232)         set(model.txtVoxelDef,'Max',20);
233)         set(model.txtVoxelDef,'Min',0);
234)         set(model.txtVoxelDef, 'FontName', 'FixedWidth');
235)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

250) %         createLabel(pNorm,[0 0.25 1 0.25],'Col Bias removal');
251) %         norm2Model = {'on','off'};
252)         model.chkColBias = uicontrol(pNorm,'Style','checkbox',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

254)             'Position',[0.0 0.1 1 0.25],...
255)             'String','column Bias removal',...
256)             'Enable','on',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

257)             'Value',1);
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

259)         
260)         %buttons
261)         pButtons = uipanel(parent,'Position',cell2mat(main_grid(1,4)));
262)         set(pButtons,'BackgroundColor','w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

269)         btnRunButton2 = uicontrol(pButtons,'String','run full-brain Searchlight',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

320)     set(model.chkSVMrnd,'String','Randomize Datapoints');
321)     set(model.chkSVMrnd,'BackgroundColor','w');
322)     set(model.chkSVMrnd,'Value',DEFAULT.svmrnd);
323)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

324)     btnRunSVM = uicontrol(pSVM,'String','run batchmode SVM Crossvalidation',...
325)         'Units','normalized',...
326)         'Position',[0 0.25 1 0.25]);
327)     set(btnRunSVM,'Enable','on');
328)     
329)     btnRunXSVM = uicontrol(pSVM,'String','run SVM X-Subject validation',...
330)         'Units','normalized',...
331)         'Position',[0 0.0 1 0.25]);
332)     set(btnRunXSVM,'Enable','on');
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

335)     set(pSOM,'Title','SOM Classification');
336)     set(pSOM,'BackgroundColor',basecolor);
337) 
338)     model.txtSOMopts = createTextField(pSOM,[0 0.75 1 0.25],'4x3 rect');
339)     set(model.txtSOMopts,'HorizontalAlignment','left');
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

340)     set(model.txtSOMopts,'Enable','off');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

341) 
342)     model.txtSOMnfold = createTextField(pSOM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

343)     set(model.txtSOMnfold,'Enable','off');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

344)     createLabel(pSOM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
345) 
346)     btnRunSOM = uicontrol(pSOM,'String','run SOM Crossvalidation',...
347)         'Units','normalized',...
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

348)         'Position',[0.0 0.25 1 0.25]);
349)     set(btnRunSOM,'Enable','on');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

350) 
351)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
352)         'Units','normalized',...
353)         'Position',[0.0 0.0 1 0.25]);
354)     set(btnRunXSOM,'Enable','off');
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

355)     
356) pSearchlight = uipanel(parent,'Units','normalized','Position',[0.0 0.1 1 0.3]);
357)     set(pSearchlight,'Title','Spatiotemporal FB classification');
358)     set(pSearchlight,'BackgroundColor',basecolor);
359)     
360)     lSearchligh = createLabel(pSearchlight, [0 0.6 0.5 0.3],'Searchlight Radius');
361)     model.txtSearchlightRadius = createTextField(pSearchlight,[0.5 0.6 0.5 0.3],DEFAULT.searchlightradius);
362)     
363)     btnRunFBS = uicontrol(pSearchlight,'String','run Spatiotemporal FB classification',...
364)         'Units','normalized',...
365)         'Position',[0.0 0.0 1 0.3]);
366)     set(btnRunFBS,'Enable','off');
367)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

368) 
369) % button callbacks set here, because of model.
370)     set(btnRunSVM, 'Callback',{@cbRunDecode,model,'SVM'}); 
371)     set(btnRunXSVM,'Callback',{@cbRunDecode,model,'XSVM'}); 
372)     set(btnRunSOM, 'Callback',{@cbRunDecode,model,'SOM'});
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

375) end
376) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

379) %     set(pButtonPane,'Title','Plot');
380)     set(pButtonPane,'BackgroundColor','w');
381) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

387)     
388)     btnPlot02 = uicontrol(pButtonPane,'String','plot subject performance and mean with SE',...
389)         'Units','normalized',...
390)         'Position',[0.5 0.0 0.5 0.25]);
391)     set(btnPlot02,'Callback',{@cbPlot,model,'x-subject-val'});
392)     set(btnPlot02,'Enable','on');
393) 
394) %     btnPlot03 = uicontrol(pButtonPane,'String','plot class performance and mean',...
395) %         'Units','normalized',...
396) %         'Position',[0.0 0.5 0.5 0.25]);
397) %     set(btnPlot03,'Callback',{@cbPlot,model,'class performance'}); 
398) %     set(btnPlot03,'Enable','on');
399)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

407) 
408) switch task
409)     case 'PRE'
410)         set(taskpanel.preprocessing,'Visible','on');
411)     case 'CLASSIFY'
412)         set(taskpanel.classification,'Visible','on');
413)     case 'PLOT'
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

415) end
416) end
417) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

420) main(model,'pre',task);
421) end
422) 
423) function cbRunDecode(src,evnt,model,task)
424) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

425) end
426) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

427) function cbPlot(src,evnt,model,type)
428) main(model,'plot',type);
429) end
430) 
431) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

432) function model = mcb_cd(src,evnt,model)
433) disp('CD');
434) directory_name = uigetdir(model.baseDir,'Select Study Base Directory ...');
435) model.baseDir = directory_name;
436) model = scanDirs(model);
437) end
438) 
439) function mcb_save(src,evnt,model)
440) disp('SAVE');
441) baseDir  = model.baseDir;
442) timeLine = getTimeLineParams(model);
443) classDefString = getClassDefString(model);
444) coordDefString = getCoordDefString(model);
445) 
446) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
447) save( fullfile(path,file),'baseDir','timeLine','classDefString','coordDefString') ;
448) end
449) 
450) function model = mcb_load(src,evnt,model)
451) disp('LOAD');
452) [file path] = uigetfile('*.mat','Load Params ...',model.baseDir);
453) l = load(fullfile(path,file));
454) % assignin('base','l',l);
455) model = setTimeLineParams(model,l.timeLine);
456) model = setClassDefString(model,l.classDefString);
457) model = setCoordDefString(model,l.coordDefString);
458) model.baseDir = l.baseDir;
459) model = scanDirs(model);
460) 
461) end
462) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

463) function label = createLabel(parent,  pos, labelText)
464)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
465)     set(label,'HorizontalAlignment','left');
466)     set(label,'BackgroundColor','w');
467) end
468) 
469) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

470) %     textfieldcolor = [0.9 0.9 0.0];
471)     textfieldcolor = 'w';