daadf09bb8b68328d5df1e730878307ae52c49d7
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
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) 
203)         lSearchligh = createLabel(pPSTH, cell2mat(tl_grid(1,5)),'Searchlight Radius');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

204) 
205) 
206)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),DEFAULT.pststart);
207)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),DEFAULT.pstend);
208)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),DEFAULT.baselinestart);
209)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),DEFAULT.baselineend);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

211)         
212)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

214)         set(pImage,'BackgroundColor','w');
215) 
216)         createLabel(pImage,[0.0 0.5 1 0.5],'Select Image Base');
217)         
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

225)         set(model.imageTypeSelection,'BackgroundColor','w');
226)         
227)         
228)         % coordinate Table
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

257)             'Position',[0.0 0.1 1 0.25],...
258)             'String','column Bias removal',...
259)             'Enable','on',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

283) function model = createSecondStepPanel(model,parent,DEFAULT)
284) basecolor = 'w';
285) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

313)     set(pSVM,'Title','SVM Classification');
314)     set(pSVM,'BackgroundColor',basecolor);
315) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

323)     set(model.chkSVMrnd,'String','Randomize Datapoints');
324)     set(model.chkSVMrnd,'BackgroundColor','w');
325)     set(model.chkSVMrnd,'Value',DEFAULT.svmrnd);
326)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

344) 
345)     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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

353) 
354)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
355)         'Units','normalized',...
356)         'Position',[0.0 0.0 1 0.25]);
357)     set(btnRunXSOM,'Enable','off');
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

358) 
359) % button callbacks set here, because of model.
360)     set(btnRunSVM, 'Callback',{@cbRunDecode,model,'SVM'}); 
361)     set(btnRunXSVM,'Callback',{@cbRunDecode,model,'XSVM'}); 
362)     set(btnRunSOM, 'Callback',{@cbRunDecode,model,'SOM'});
363)     set(btnRunXSOM,'Callback',{@cbRunDecode,model,'XSOM'}); 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

364) end
365) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

368) %     set(pButtonPane,'Title','Plot');
369)     set(pButtonPane,'BackgroundColor','w');
370) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

389) end
390) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

396) 
397) switch task
398)     case 'PRE'
399)         set(taskpanel.preprocessing,'Visible','on');
400)     case 'CLASSIFY'
401)         set(taskpanel.classification,'Visible','on');
402)     case 'PLOT'
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

404) end
405) end
406) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

409) main(model,'pre',task);
410) end
411) 
412) function cbRunDecode(src,evnt,model,task)
413) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

414) end
415) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

416) function cbPlot(src,evnt,model,type)
417) main(model,'plot',type);
418) end
419) 
420) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

459) %     textfieldcolor = [0.9 0.9 0.0];
460)     textfieldcolor = 'w';