f625db4f3c2140c7c4152d359423f39ddf43da4b
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;
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

9) DEFAULT.trfactor        = 0.5;
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

10) DEFAULT.frameshiftstart = -5;
11) DEFAULT.frameshiftend   = 35;
12) DEFAULT.frameshiftdur   = 0;
13) DEFAULT.classdefstring  = 'left,\t[9,11,13]\nright,\t[10,12,14]';
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

14) DEFAULT.voxelstring     = 'M1 l + 3 \nM1 r + 3\n';
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

15) DEFAULT.svmoptstring    = '-s 0 -t 0 -c 1';
16) DEFAULT.svmnfold        = '6';
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

17) DEFAULT.svmrnd          = 1;
Christoph Budziszewski fbs filename adaption, defa...

Christoph Budziszewski authored 15 years ago

18) DEFAULT.searchlightradius = 3;
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

19) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

20) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

41) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

52)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

55)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

59)     % CLASSIFICATION
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

66)     % PLOT
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

72)     % TASK
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

93)             'Units','normalized','Position',[0.66 0.0 0.33 1]);
94)         set(btnSwitchPlot,'Callback',{@cbSwitchTask,'PLOT',task}); 
95)         set(btnSwitchPlot,'Enable','on');
96) 
97)     % menu
98)     
Christoph Budziszewski stable version for conference.

Christoph Budziszewski authored 15 years ago

99)     savemenu = uimenu(frame,'Label','Save/Load','Enable','off');
Christoph Budziszewski disabled save-menu

Christoph Budziszewski authored 15 years ago

100)         uimenu(savemenu,'Label','Save Preprocessing Parameter','Callback',{@mcb_save,model1},'Enable','off');
101)         uimenu(savemenu,'Label','Load Preprocessing Parameter','Callback',{@mcb_load,model1},'Enable','off');
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

110) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

119)     main_grid = cell(2,4);
120)     main_grid{1,1} = [0 0.7 0.4 0.3];
121)     main_grid{1,2} = [0 0.5 0.5 0.2];
122)     main_grid{1,3} = [0 0.1 0.5 0.4];
123)     main_grid{1,4} = [0 0.0 1.0 0.1];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

178)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

182) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

186)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

190) 
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

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

194)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

203)         lTRF        = createLabel(pPSTH, cell2mat(tl_grid(1,5)),'TR Factor');
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

204) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

205)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),DEFAULT.pststart);
206)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),DEFAULT.pstend);
207)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),DEFAULT.baselinestart);
208)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),DEFAULT.baselineend);
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

209)         model.txtTrFactor          = createTextField(pPSTH,cell2mat(tl_grid(2,5)),DEFAULT.trfactor);
210)         model.labelTR              = createTextField(pPSTH, cell2mat(tl_grid(3,5)),'');
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');
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

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

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 snapshot, working on fbs

Christoph Budziszewski authored 15 years ago

272)         btnRunButton2 = uicontrol(pButtons,'String',sprintf('use this settings for FBS'),...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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 snapshot, working on fbs

Christoph Budziszewski authored 15 years ago

275)         set(btnRunButton2,'Enable','on');
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) 
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

341)     model.txtSOMopts = createTextField(pSOM,[0 0.75 1 0.25],'3x3 rect');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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]);
Christoph Budziszewski SOM Single run

Christoph Budziszewski authored 15 years ago

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]);
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

370)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

378) end
379) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

380) function model = createVisualStepPanel(model,parent,DEFAULT)
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');
384) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

403) end
404) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

418) end
419) end
420) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

428) end
429) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

430) function cbPlot(src,evnt,model,type)
431) main(model,'plot',type);
432) end
433) 
434) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

473) %     textfieldcolor = [0.9 0.9 0.0];
474)     textfieldcolor = 'w';