55ebec12922b6ea88610d8ba29b813598bc143c9
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

1) function ui_main(varargin)
2) 
Christoph Budziszewski SPM2 compatibilität begonnen

Christoph Budziszewski authored 14 years ago

3) DEFAULT.selectedSubject = [1];
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 SPM2 compatibilität begonnen

Christoph Budziszewski authored 14 years ago

25) DEFAULT.wd  = fullfile('d:','Analyze','Stimolos');
26) % DEFAULT.wd  = fullfile('d:','Analyze','Choice','24pilot');
Christoph Budziszewski error tracking: added psth-...

Christoph Budziszewski authored 15 years ago

27) % DEFAULT.wd  = fullfile('/','media','fMRI');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

47) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

58)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

61)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

65)     % CLASSIFICATION
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

72)     % PLOT
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

78)     % TASK
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

116) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

183)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

187) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

191)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

195) 
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

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

199)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

209) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

224)         model.imageTypeSelection = uicontrol(pImage,'Style','popupmenu',...
225)         'Units','normalized',...
226)         'Position',[0.0 0.0 1 0.5],...
227)         'String',imageRegExList,...
228)         'UserData',imageRegExList,...
Christoph Budziszewski SPM2 compatibilität begonnen

Christoph Budziszewski authored 14 years ago

229)         'Value',1);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

360) 
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

375)     
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

390)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

408)     plot_grid{2,1} = [0.25 0.63 grid_w grid_h];
409)     plot_grid{2,2} = [0.25 0.33 grid_w grid_h];
410)     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

411) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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