c73e97a6595599e91709c85a20c3893cac69a052
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

1) function ui_main(varargin)
2) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

5) DEFAULT.pststart        = -15;
6) DEFAULT.pstend          = 40;
7) DEFAULT.baselinestart   = -3;
8) DEFAULT.baselineend     = -1;
9) DEFAULT.frameshiftstart = -5;
10) DEFAULT.frameshiftend   = 35;
11) DEFAULT.frameshiftdur   = 0;
12) DEFAULT.classdefstring  = 'left,\t[9,11,13]\nright,\t[10,12,14]';
13) DEFAULT.voxelstring     = 'SPL l + [ 0, 0, 0] \nSPL r + [ 0, 0, 0]\n';
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

14) DEFAULT.svmoptstring    = '-s 0 -t 0 -c 1';
15) DEFAULT.svmnfold        = '6';
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

16) DEFAULT.searchlightradius = 3;
17) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

20) %  Initialize and hide the GUI as it is being constructed.
21)     frameWidth=450;
22)     frameHeight=600;
23)     
24)     frame = figure('Visible','off','Position',[0,0,frameWidth,frameHeight]);
25)     movegui(frame,'west'); % get this thing visible on smaller displays.
26)     set(frame,'Name','SVMCrossVal Decode Performance 4 SPM');
27)     set(frame,'NumberTitle','off');
28)     set(frame,'MenuBar','none');
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

33) 
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

34)     model = struct;
35)     model.baseDir = DEFAULT.wd;
36) 
37)     model.txtBaseDir = createLabel(frame,[0 0.97 1 0.03],model.baseDir);
38)     set(model.txtBaseDir,'BackgroundColor','w');
Christoph Budziszewski enabled svm classification....

Christoph Budziszewski authored 15 years ago

39)     set(model.txtBaseDir,'ForegroundColor','b');
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

40)     
Christoph Budziszewski working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

41)     pFirstStep   = uipanel(frame,'Title','Preprocessing','Position',[0 0.36 1 0.610]);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

42)     set(pFirstStep,'BackgroundColor','w');
43)     set(pFirstStep,'Units','normalized');
44)     
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

45)     model.selectedSubject = DEFAULT.selectedSubject;
46)     model = createFirstStepPanel(model,pFirstStep,DEFAULT);
47)     
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

48)     %Classification Step
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

49)     secondStepBaseColor = 'w';
Christoph Budziszewski working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

50)     pSecondStep = uipanel(frame,'Title','Classification','Position',[0 0.1 1 0.25]);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

51)     set(pSecondStep,'BackgroundColor',secondStepBaseColor);
52) 
53)     
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

54)     model = createSecondStepPanel(model,pSecondStep,DEFAULT,secondStepBaseColor);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

56)     savemenu = uimenu(frame,'Label','Save/Load');
Christoph Budziszewski working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

57)     uimenu(savemenu,'Label','Save Preprocessing Parameter','Callback',{@mcb_save,model});
58)     uimenu(savemenu,'Label','Load Preprocessing Parameter','Callback',{@mcb_load,model});
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

59) 
Christoph Budziszewski zwischenspeicherung

Christoph Budziszewski authored 15 years ago

60)     uimenu(frame,'Label','change Study','Callback',{@mcb_cd,model},'Enable','off');
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

62)     set(frame,'Visible','on');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

63) 
64)     % fill with data
65)     model = scanDirs(model);
66)     assignin('base','model',model);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

71)     main_grid = cell(2,4);
72)     main_grid{1,1} = [0 0.7 0.4 0.3];
73)     main_grid{1,2} = [0 0.5 0.5 0.2];
74)     main_grid{1,3} = [0 0.1 0.5 0.4];
75)     main_grid{1,4} = [0 0.0 1.0 0.1];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

80)     
81)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

82)     pSubject = uipanel(parent,'Units','normalized','Position',cell2mat(main_grid(1,1)));
83)     set(pSubject,'Title','Subjects');
84)     set(pSubject,'BackgroundColor','w');
85)     
86)     subjectList = {'DUMMY Subj1','DUMMY Subj2','DUMMY Subj3','DUMMY Subj4'};
87)     model.subjectSelector = uicontrol(pSubject,'Style','listbox',...
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

88)                     'Min',1, 'Max',3,...
89)                     'String',subjectList,...
90)                     'UserData',subjectList,...
91)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

92)                     'Position',[0 0 1 1]);
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

94)     
95)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

97)     set(pClasses,'Title','Class Definitions');
98)     set(pClasses,'BackgroundColor','w');
99)         lClassDef = uicontrol(pClasses,...
100)             'Style','text',...
101)             'String',sprintf('<Label>,\t <[Event, Event, ..]>;'),...
102)             'Units','normalized',...
103)             'Position',[0 0.8 1 0.2]);
104)         set(lClassDef,'BackgroundColor','w');
105)         set(lClassDef,'HorizontalAlignment','left');
106)         
107)         model.txtClassDef = uicontrol(pClasses,'Style','edit',...
108)             'String',sprintf(DEFAULT.classdefstring),...
109)             'Units','normalized',...
110)             'Position',[0 0 1 0.8]);
111)         set(model.txtClassDef,'HorizontalAlignment','left');
112)         set(model.txtClassDef,'Max',20);
113)         set(model.txtClassDef,'Min',0);
114)         set(model.txtClassDef, 'FontName', 'FixedWidth');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

116) 
117) 
118)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

120)     set(pPSTH,'BackgroundColor','w');
121)         
122)         grid_h = 0.16;
123)         grid_w = 0.3;
124)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

125)         tl_grid = cell([3 6]);
126)         tl_grid{2,1} = [0.0 0.83 grid_w grid_h];
127)         tl_grid{2,1} = [0.4 0.83 grid_w grid_h];
128)         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

129)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

133) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

137)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

141) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

142)         tl_grid{1,5} = [0.0 0.16 0.5 grid_h];
143)         tl_grid{2,5} = [0.5 0.16 grid_w grid_h];
144)         tl_grid{3,5} = [0.75 0.16 grid_w grid_h];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

145)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

146)         tl_grid{1,6} = [0.0 0.0 0.5 grid_h];
147)         tl_grid{2,6} = [0.5 0.0 grid_w grid_h];
148)         tl_grid{3,6} = [0.75 0.0 grid_w grid_h];
149) 
150)         lStart      = createLabel(pPSTH, cell2mat(tl_grid(2,1)) ,'Start [sec]');
151)         lEnd        = createLabel(pPSTH, cell2mat(tl_grid(3,1)) ,'End [sec]');
152)         lPSTH       = createLabel(pPSTH, cell2mat(tl_grid(1,2)),'PSTH Range');
153)         lBaseline   = createLabel(pPSTH, cell2mat(tl_grid(1,3)),'Baseline');
154)         lFrameShift = createLabel(pPSTH, cell2mat(tl_grid(1,4)),'Frame Shift');
155)         lFramsSize  = createLabel(pPSTH, cell2mat(tl_grid(1,5)),'Frame Size');
156)         lSearchligh = createLabel(pPSTH, cell2mat(tl_grid(1,6)),'Searchlight Radius');
157) 
158) 
159)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),DEFAULT.pststart);
160)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),DEFAULT.pstend);
161)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),DEFAULT.baselinestart);
162)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),DEFAULT.baselineend);
163)         model.txtFrameShiftStart   = createTextField(pPSTH,cell2mat(tl_grid(2,4)),DEFAULT.frameshiftstart);
164)         model.txtFrameShiftEnd     = createTextField(pPSTH,cell2mat(tl_grid(3,4)),DEFAULT.frameshiftend);
165)         model.txtFrameShiftDur     = createTextField(pPSTH,cell2mat(tl_grid(2,5)),DEFAULT.frameshiftdur);
166)         model.txtSearchlightRadius = createTextField(pPSTH,cell2mat(tl_grid(2,6)),DEFAULT.searchlightradius);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

167)         
168)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

170)         set(pImage,'BackgroundColor','w');
171) 
172)         createLabel(pImage,[0.0 0.5 1 0.5],'Select Image Base');
173)         
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

175)         model.imageTypeSelection = uicontrol(pImage,'Style','popupmenu',...
176)         'Units','normalized',...
177)         'Position',[0.0 0.0 1 0.5],...
178)         'String',imageRegExList,...
179)         'UserData',imageRegExList,...
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

181)         set(model.imageTypeSelection,'BackgroundColor','w');
182)         
183)         
184)         % coordinate Table
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

186)         set(pVoxel,'BackgroundColor','w');
187)         lVoxelDef = createLabel(pVoxel, [0 0.9 1 0.1],'<ROI Name>+[offset];');
188)         model.txtVoxelDef = createTextField(pVoxel,[0 0 1 0.9],...
189)             sprintf(DEFAULT.voxelstring));
190)         set(model.txtVoxelDef,'HorizontalAlignment','left');
191)         set(model.txtVoxelDef,'Max',20);
192)         set(model.txtVoxelDef,'Min',0);
193)         set(model.txtVoxelDef, 'FontName', 'FixedWidth');
194)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

195)         %normalizations
196)         pNorm = uipanel(parent,'Title','Normalization','Position',cell2mat(main_grid(2,3)));
197)         set(pNorm,'BackgroundColor','w');
198)         
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

201)         model.selNormPST = uicontrol(pNorm,'Style','popupmenu',...
202)             'Units','normalized',...
203)             'Position',[0.0 0.5 1 0.25],...
204)             'String',norm1Model,...
205)             'UserData',norm1Model,...
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

207)          set(model.selNormPST,'BackgroundColor','w');   
208)         
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

209)         createLabel(pNorm,[0 0.25 1 0.25],'Col Bias removal');
210)         norm2Model = {'on','off'};
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

211)         model.selNormClass = uicontrol(pNorm,'Style','popupmenu',...
212)             'Units','normalized',...
213)             'Position',[0.0 0.0 1 0.25],...
214)             'String',norm2Model,...
215)             'UserData',norm2Model,...
216)             'Value',1);
217)          set(model.selNormClass,'BackgroundColor','w');   
218)         
219)         %buttons
220)         pButtons = uipanel(parent,'Position',cell2mat(main_grid(1,4)));
221)         set(pButtons,'BackgroundColor','w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

235)         set(btnRunButton3,'Callback',{@cbRunPreprocessing,model,'ROI'}); % set here, because of model.    
236)         set(btnRunButton3,'Enable','on');
237) end
238) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

239) function model = createSecondStepPanel(model,parent,DEFAULT,basecolor)
240)     
241) pSVM = uipanel(parent,'Units','normalized','Position',[0 0.0 0.5 1]);
242)     set(pSVM,'Title','SVM Classification');
243)     set(pSVM,'BackgroundColor',basecolor);
244) 
245)     model.txtSVMopts = createTextField(pSVM,[0 0.75 1 0.25],DEFAULT.svmoptstring);
246)     set(model.txtSVMopts,'HorizontalAlignment','left');
247)     
248)     model.txtSVMnfold = createTextField(pSVM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
249)     createLabel(pSVM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
250)     
251) pSOM = uipanel(parent,'Units','normalized','Position',[0.5 0.0 0.5 1]);
252)     set(pSOM,'Title','SOM Classification');
253)     set(pSOM,'BackgroundColor',basecolor);
254) 
255)     model.txtSOMopts = createTextField(pSOM,[0 0.75 1 0.25],'4x3 rect');
256)     set(model.txtSOMopts,'HorizontalAlignment','left');
257)         set(model.txtSOMopts,'Enable','off');
258) 
259)     model.txtSOMnfold = createTextField(pSOM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
260)         set(model.txtSOMnfold,'Enable','off');
261)     createLabel(pSOM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
262) 
263) % buttons
264)     btnRunSVM = uicontrol(pSVM,'String','run SVM Crossvalidation',...
265)         'Units','normalized',...
266)         'Position',[0 0.25 1 0.25]);
267)     set(btnRunSVM,'Callback',{@cbRunDecode,model,'SVM'}); % set here, because of model.
268)     set(btnRunSVM,'Enable','on');
269)     
270)     btnRunXSVM = uicontrol(pSVM,'String','run SVM X-Subject validation',...
271)         'Units','normalized',...
272)         'Position',[0 0.0 1 0.25]);
273)     set(btnRunXSVM,'Callback',{@cbRunDecode,model,'XSVM'}); % set here, because of model.
274)     set(btnRunXSVM,'Enable','on');
275)     
276)     btnRunSOM = uicontrol(pSOM,'String','run SOM Crossvalidation',...
277)         'Units','normalized',...
278)     'Position',[0.0 0.25 1 0.25]);
279)     set(btnRunSOM,'Callback',{@cbRunDecode,model,'SOM'}); % set here, because of model.
280)     set(btnRunSOM,'Enable','off');
281) 
282)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
283)         'Units','normalized',...
284)         'Position',[0.0 0.0 1 0.25]);
285)     set(btnRunXSOM,'Callback',{@cbRunDecode,model,'XSOM'}); % set here, because of model.
286)     set(btnRunXSOM,'Enable','off');
287) end
288) 
289) 
290) 
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

292) main(model,'pre',task);
293) end
294) 
295) function cbRunDecode(src,evnt,model,task)
296) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

297) end
298) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

299) function model = mcb_cd(src,evnt,model)
300) disp('CD');
301) directory_name = uigetdir(model.baseDir,'Select Study Base Directory ...');
302) model.baseDir = directory_name;
303) model = scanDirs(model);
304) end
305) 
306) function mcb_save(src,evnt,model)
307) disp('SAVE');
308) baseDir  = model.baseDir;
309) timeLine = getTimeLineParams(model);
310) classDefString = getClassDefString(model);
311) coordDefString = getCoordDefString(model);
312) 
313) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
314) save( fullfile(path,file),'baseDir','timeLine','classDefString','coordDefString') ;
315) end
316) 
317) function model = mcb_load(src,evnt,model)
318) disp('LOAD');
319) [file path] = uigetfile('*.mat','Load Params ...',model.baseDir);
320) l = load(fullfile(path,file));
321) % assignin('base','l',l);
322) model = setTimeLineParams(model,l.timeLine);
323) model = setClassDefString(model,l.classDefString);
324) model = setCoordDefString(model,l.coordDefString);
325) model.baseDir = l.baseDir;
326) model = scanDirs(model);
327) 
328) end
329) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

330) function label = createLabel(parent,  pos, labelText)
331)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
332)     set(label,'HorizontalAlignment','left');
333)     set(label,'BackgroundColor','w');
334) end
335) 
336) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

337) %     textfieldcolor = [0.9 0.9 0.0];
338)     textfieldcolor = 'w';