17910a1ff1641459b17be92c7154f17caee17b8e
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

1) function ui_main(varargin)
2) 
Christoph Budziszewski error tracking: added psth-...

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 refined gui elements

Christoph Budziszewski authored 15 years ago

20) DEFAULT.somM = 3;
21) DEFAULT.somN = 3;
22) DEFAULT.somLattice = 1;
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

23) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

25) DEFAULT.wd  = fullfile('d:','Analyze','Choice','24pilot');
26) % DEFAULT.wd  = fullfile('/','media','fMRI');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

42)     task = struct;
43)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

46) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

57)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

60)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

64)     % CLASSIFICATION
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

65)     model2 = struct;
66)     
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

71)     % PLOT
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

77)     % TASK
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

80) %         set(task.taskSwitch,'Title','TASK');
81)         set(task.taskSwitch,'BackgroundColor','w');
82)         set(task.taskSwitch,'Units','normalized');
83)     
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

86)             'Units','normalized','Position',[0.0 0.0 0.33 1]);
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

88)         set(btnSwitchPreprocessing,'Enable','on');
89) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

92)             'Units','normalized','Position',[0.33 0.0 0.33 1]);
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

94)         set(btnSwitchClassify,'Enable','on');
95) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

98)             'Units','normalized','Position',[0.66 0.0 0.33 1]);
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

100)         set(btnSwitchPlot,'Enable','on');
101) 
102)     % menu
103)     
Christoph Budziszewski stable version for conference.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

113)     
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

115) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

132)     
133)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

140)                     'Min',1, 'Max',3,...
141)                     'String',subjectList,...
142)                     'UserData',subjectList,...
143)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

147)     
148)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

169) 
170) 
171)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

173)     set(pPSTH,'BackgroundColor','w');
174)         
175)         grid_h = 0.16;
176)         grid_w = 0.3;
177)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

182)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

186) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

190)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

194) 
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

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

198)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

208) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

209)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),DEFAULT.pststart);
210)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),DEFAULT.pstend);
211)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),DEFAULT.baselinestart);
212)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),DEFAULT.baselineend);
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

215)         
216)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

218)         set(pImage,'BackgroundColor','w');
219) 
220)         createLabel(pImage,[0.0 0.5 1 0.5],'Select Image Base');
221)         
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

229)         set(model.imageTypeSelection,'BackgroundColor','w');
230)         
231)         
232)         % coordinate Table
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

261)             'Position',[0.0 0.1 1 0.25],...
262)             'String','column Bias removal',...
263)             'Enable','on',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

287) function model = createSecondStepPanel(model,parent,DEFAULT)
288) basecolor = 'w';
289) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

317)     set(pSVM,'Title','SVM Classification');
318)     set(pSVM,'BackgroundColor',basecolor);
319) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

327)     set(model.chkSVMrnd,'String','Randomize Datapoints');
328)     set(model.chkSVMrnd,'BackgroundColor','w');
329)     set(model.chkSVMrnd,'Value',DEFAULT.svmrnd);
330)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

342)     set(pSOM,'Title','SOM Classification');
343)     set(pSOM,'BackgroundColor',basecolor);
344) 
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 15 years ago

345)     createLabel(pSOM,[0 0.75 0.3 0.20],'Size:');
346)     model.txtSomM = createTextField(pSOM,[0.3 0.75 0.25 0.2],DEFAULT.somM);
347)     somsizemal = createLabel(pSOM,[0.55 0.75 0.2 0.20],'x');
348)     set(somsizemal,'HorizontalAlignment','center');
349)     model.txtSomN = createTextField(pSOM,[0.75 0.75 0.25 0.20],DEFAULT.somN);
350)  
351)     latticeModel = {'rect','hexa'};
352)     model.selSomLattice = uicontrol(pSOM,'Style','popupmenu',...
353)         'Units','normalized',...
354)         'Position',[0.0 0.5 0.3 0.20],...
355)         'String',latticeModel,...
356)         'UserData',latticeModel,...
357)         'Value',1);
358)     set(model.selSomLattice,'BackgroundColor','w');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

359) 
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 15 years ago

360)     model.txtSOMnfold = createTextField(pSOM,[0.5 0.50 0.25 0.20],DEFAULT.svmnfold);
361) %     set(model.txtSOMnfold,'Enable','off');
362)     createLabel(pSOM,[0.75 0.5 0.25 0.20 ],'-Fold CrossVal');
363)        
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

364) 
365)     btnRunSOM = uicontrol(pSOM,'String','run SOM Crossvalidation',...
366)         'Units','normalized',...
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

369) 
370)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
371)         'Units','normalized',...
372)         'Position',[0.0 0.0 1 0.25]);
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

374)     
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

376)     set(pSearchlight,'Title','Spatiotemporal FB classification');
377)     set(pSearchlight,'BackgroundColor',basecolor);
378)     
379)     lSearchligh = createLabel(pSearchlight, [0 0.6 0.5 0.3],'Searchlight Radius');
380)     model.txtSearchlightRadius = createTextField(pSearchlight,[0.5 0.6 0.5 0.3],DEFAULT.searchlightradius);
381)     
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 15 years ago

382)     lFBSTiming = createLabel(pSearchlight, [0 0.3 0.5 0.3],'Optional Timeline ( e.g. ''-5 0 5 10 15'')');
Christoph Budziszewski fbs timeline mod

Christoph Budziszewski authored 15 years ago

383)     model.txtSearchlightTimeline = createTextField(pSearchlight,[0.5 0.3 0.5 0.3],DEFAULT.searchlightTimeline);
384) 
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

389)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

390) 
391) % button callbacks set here, because of model.
392)     set(btnRunSVM, 'Callback',{@cbRunDecode,model,'SVM'}); 
393)     set(btnRunXSVM,'Callback',{@cbRunDecode,model,'XSVM'}); 
394)     set(btnRunSOM, 'Callback',{@cbRunDecode,model,'SOM'});
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

397) end
398) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

400) 
401)     grid_h = 0.25;
402)     grid_w = 0.5;
403)     plot_grid = cell([3 3]);
404)     plot_grid{1,1} = [0.0 0.63 grid_w grid_h];
405)     plot_grid{1,2} = [0.0 0.33 grid_w grid_h];
406)     plot_grid{1,3} = [0.0 0.03 grid_w grid_h];
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

410) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

430)     set(btnPlot02,'Callback',{@cbPlot,model,'x-subject-val'});
431)     set(btnPlot02,'Enable','on');
432) 
433)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

436) 
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

441) 
442) switch task
443)     case 'PRE'
444)         set(taskpanel.preprocessing,'Visible','on');
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

445) 
446) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

451)         set(taskpanel.plot,'Visible','on');
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

453) end
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

454) 
455) assignin('base','model',model);
456) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

457) end
458) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

461) main(model,'pre',task);
462) end
463) 
464) function cbRunDecode(src,evnt,model,task)
465) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

466) end
467) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

468) function cbPlot(src,evnt,model,type)
469) main(model,'plot',type);
470) end
471) 
472) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

473) function model = mcb_cd(src,evnt,model)
474) disp('CD');
475) directory_name = uigetdir(model.baseDir,'Select Study Base Directory ...');
476) model.baseDir = directory_name;
477) model = scanDirs(model);
478) end
479) 
480) function mcb_save(src,evnt,model)
481) disp('SAVE');
482) baseDir  = model.baseDir;
483) timeLine = getTimeLineParams(model);
484) classDefString = getClassDefString(model);
485) coordDefString = getCoordDefString(model);
486) 
487) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
488) save( fullfile(path,file),'baseDir','timeLine','classDefString','coordDefString') ;
489) end
490) 
491) function model = mcb_load(src,evnt,model)
492) disp('LOAD');
493) [file path] = uigetfile('*.mat','Load Params ...',model.baseDir);
494) l = load(fullfile(path,file));
495) % assignin('base','l',l);
496) model = setTimeLineParams(model,l.timeLine);
497) model = setClassDefString(model,l.classDefString);
498) model = setCoordDefString(model,l.coordDefString);
499) model.baseDir = l.baseDir;
500) model = scanDirs(model);
501) 
502) end
503) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

504) function label = createLabel(parent,  pos, labelText)
505)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
506)     set(label,'HorizontalAlignment','left');
507)     set(label,'BackgroundColor','w');
508) end
509) 
510) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

511) %     textfieldcolor = [0.9 0.9 0.0];
512)     textfieldcolor = 'w';