07e45407e41f2662eb069523aa485b64a4e1bb84
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

1) function ui_main(varargin)
2) 
Christoph Budziszewski added some batch files, wor...

Christoph Budziszewski authored 15 years ago

3) DEFAULT.selectedSubject = [2];
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

4) 
Christoph Budziszewski added some batch files, wor...

Christoph Budziszewski authored 15 years ago

5) DEFAULT.pststart        = -5;
6) DEFAULT.pstend          = 15;
7) DEFAULT.baselinestart   = 0;
8) DEFAULT.baselineend     = 0;
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;
Christoph Budziszewski added some batch files, wor...

Christoph Budziszewski authored 15 years ago

11) DEFAULT.frameshiftend   = 15;
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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 fbs timeline mod

Christoph Budziszewski authored 15 years ago

19) DEFAULT.searchlightTimeline = '';
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

20) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

21) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

42) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

53)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

56)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

60)     % CLASSIFICATION
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

67)     % PLOT
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

73)     % TASK
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

111) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

179)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

183) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

187)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

191) 
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

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

195)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

205) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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 added TR

Christoph Budziszewski authored 15 years ago

210)         model.txtTrFactor          = createTextField(pPSTH,cell2mat(tl_grid(2,5)),DEFAULT.trfactor);
211)         model.labelTR              = createTextField(pPSTH, cell2mat(tl_grid(3,5)),'');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

272)         
Christoph Budziszewski snapshot, working on fbs

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

339)     set(pSOM,'Title','SOM Classification');
340)     set(pSOM,'BackgroundColor',basecolor);
341) 
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

343)     set(model.txtSOMopts,'HorizontalAlignment','left');
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

354) 
355)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
356)         'Units','normalized',...
357)         'Position',[0.0 0.0 1 0.25]);
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

367)     lFBSTiming = createLabel(pSearchlight, [0 0.3 0.5 0.3],'Optional Timeline');
368)     model.txtSearchlightTimeline = createTextField(pSearchlight,[0.5 0.3 0.5 0.3],DEFAULT.searchlightTimeline);
369) 
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

374)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

382) end
383) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

385) 
386)     grid_h = 0.25;
387)     grid_w = 0.5;
388)     plot_grid = cell([3 3]);
389)     plot_grid{1,1} = [0.0 0.63 grid_w grid_h];
390)     plot_grid{1,2} = [0.0 0.33 grid_w grid_h];
391)     plot_grid{1,3} = [0.0 0.03 grid_w grid_h];
392)     plot_grid{2,1} = [0.5 0.63 grid_w grid_h];
393)     plot_grid{2,2} = [0.5 0.33 grid_w grid_h];
394)     plot_grid{2,3} = [0.5 0.03 grid_w grid_h];
395) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

397) %     set(pButtonPane,'Title','Plot');
398)     set(pButtonPane,'BackgroundColor','w');
399) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

401)         'Units','normalized',...
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

409)     set(btnPlot02,'Callback',{@cbPlot,model,'x-subject-val'});
410)     set(btnPlot02,'Enable','on');
411) 
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

412)     btnPlot03 = uicontrol(pButtonPane,'String','plot PSTH',...
413)         'Units','normalized',...
414)         'Position',cell2mat(plot_grid(1,2)));
415)     set(btnPlot03,'Callback',{@cbPlot,model,'psth'}); 
416)     set(btnPlot03,'Enable','on');
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

425) 
426) switch task
427)     case 'PRE'
428)         set(taskpanel.preprocessing,'Visible','on');
429)     case 'CLASSIFY'
430)         set(taskpanel.classification,'Visible','on');
431)     case 'PLOT'
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

433) end
434) end
435) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

438) main(model,'pre',task);
439) end
440) 
441) function cbRunDecode(src,evnt,model,task)
442) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

443) end
444) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

445) function cbPlot(src,evnt,model,type)
446) main(model,'plot',type);
447) end
448) 
449) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

450) function model = mcb_cd(src,evnt,model)
451) disp('CD');
452) directory_name = uigetdir(model.baseDir,'Select Study Base Directory ...');
453) model.baseDir = directory_name;
454) model = scanDirs(model);
455) end
456) 
457) function mcb_save(src,evnt,model)
458) disp('SAVE');
459) baseDir  = model.baseDir;
460) timeLine = getTimeLineParams(model);
461) classDefString = getClassDefString(model);
462) coordDefString = getCoordDefString(model);
463) 
464) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
465) save( fullfile(path,file),'baseDir','timeLine','classDefString','coordDefString') ;
466) end
467) 
468) function model = mcb_load(src,evnt,model)
469) disp('LOAD');
470) [file path] = uigetfile('*.mat','Load Params ...',model.baseDir);
471) l = load(fullfile(path,file));
472) % assignin('base','l',l);
473) model = setTimeLineParams(model,l.timeLine);
474) model = setClassDefString(model,l.classDefString);
475) model = setCoordDefString(model,l.coordDefString);
476) model.baseDir = l.baseDir;
477) model = scanDirs(model);
478) 
479) end
480) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

481) function label = createLabel(parent,  pos, labelText)
482)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
483)     set(label,'HorizontalAlignment','left');
484)     set(label,'BackgroundColor','w');
485) end
486) 
487) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

488) %     textfieldcolor = [0.9 0.9 0.0];
489)     textfieldcolor = 'w';