accd38ffe6903f1568f0c4e2e166c1e9ab38698c
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 new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

4) DEFAULT.smoothed        = 1;
5) DEFAULT.multisubject    = 'single';
6) DEFAULT.pststart        = -15;
7) DEFAULT.pstend          = 40;
8) DEFAULT.baselinestart   = -3;
9) DEFAULT.baselineend     = -1;
10) DEFAULT.frameshiftstart = -5;
11) DEFAULT.frameshiftend   = 35;
12) DEFAULT.frameshiftdur   = 0;
13) DEFAULT.classdefstring  = 'left,\t[9,11,13]\nright,\t[10,12,14]';
14) 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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

32)     set(frame,'Units','normalized');
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

35)     model = struct;
36)     model.baseDir = DEFAULT.wd;
37) 
38)     model.txtBaseDir = createLabel(frame,[0 0.97 1 0.03],model.baseDir);
39)     set(model.txtBaseDir,'BackgroundColor','w');
40)     
41)     pFirstStep   = uipanel(frame,'Title','Preprocessing','Position',[0 0.25 1 0.720]);
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 save load working for most...

Christoph Budziszewski authored 15 years ago

45)     
46) 
47)     
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

48)     model.selectedSubject = DEFAULT.selectedSubject;
49)     model = createFirstStepPanel(model,pFirstStep,DEFAULT);
50)     
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

51)     
52)     %Classification Step
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

53)     secondStepBaseColor = 'w';
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

55)     set(pSecondStep,'BackgroundColor',secondStepBaseColor);
56) 
57)     
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

60)     savemenu = uimenu(frame,'Label','Save/Load');
61)     uimenu(savemenu,'Label','Save','Callback',{@mcb_save,model});
62)     uimenu(savemenu,'Label','Load','Callback',{@mcb_load,model});
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

63) 
64)     cdmenu = uimenu(frame,'Label','change Study');
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

67) 
68)     % fill with data
69)     model = scanDirs(model);
70)     assignin('base','model',model);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

73) function mcb_save(src,evnt,model)
74) disp('SAVE');
75) baseDir  = model.baseDir;
76) timeLine = getTimeLineParams(model);
77) subjects = getSubjectCellList(model);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

78) classDefString = getClassDefString(model);
79) coordDefString = getCoordDefString(model);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

80) % images
81) % normalization
82) 
83) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

84) save( fullfile(path,file),'baseDir','timeLine','subjects','classDefString','coordDefString') ;
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

85) end
86) 
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

87) function model = mcb_load(src,evnt,model)
88) disp('LOAD');
89) [file path] = uigetfile('*.mat','Save current Params ...',model.baseDir);
90) l = load(fullfile(path,file));
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

91) assignin('base','l',l);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

92) model = setTimeLineParams(model,l.timeLine);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

93) model = setClassDefString(model,l.classDefString);
94) model = setCoordDefString(model,l.coordDefString);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

95) end
96) 
97) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

98) function model = cbSetBaseDir(model,newDir)
99) model.baseDir = newDir;
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

100) end
101) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

102) 
103) 
104) function model = createSecondStepPanel(model,parent,DEFAULT,basecolor)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

105)     
106) pSVM = uipanel(parent,'Units','normalized','Position',[0 0.0 0.5 1]);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

107)     set(pSVM,'Title','SVM Classification');
108)     set(pSVM,'BackgroundColor',basecolor);
109) 
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

110)     model.txtSVMopts = createTextField(pSVM,[0 0.75 1 0.25],DEFAULT.svmoptstring);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

111)     set(model.txtSVMopts,'HorizontalAlignment','left');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

112)     
113)     model.txtSVMnfold = createTextField(pSVM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
114)     createLabel(pSVM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
115) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

116) 
117)     
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

118) pSOM = uipanel(parent,'Units','normalized','Position',[0.5 0.0 0.5 1]);
119)     set(pSOM,'Title','SOM Classification');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

120)     set(pSOM,'BackgroundColor',basecolor);
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

121) 
122)     model.txtSOMopts = createTextField(pSOM,[0 0.75 1 0.25],'4x3 rect');
123)     set(model.txtSOMopts,'HorizontalAlignment','left');
124)         set(model.txtSOMopts,'Enable','off');
125) 
126)     model.txtSOMnfold = createTextField(pSOM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
127)         set(model.txtSOMnfold,'Enable','off');
128)     createLabel(pSOM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
129) 
130)     btnRunSVM = uicontrol(pSVM,'String','run SVM Crossvalidation',...
131)         'Units','normalized',...
132)         'Position',[0 0.25 1 0.25]);
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

133)     set(btnRunSVM,'Callback',{@cbRunSVM,model}); % set here, because of model.
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

134)     set(btnRunSVM,'Enable','off');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

135)     
136)     btnRunXSVM = uicontrol(pSVM,'String','run SVM X-Subject validation',...
137)         'Units','normalized',...
138)         'Position',[0 0.0 1 0.25]);
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

139)     set(btnRunXSVM,'Callback',{@cbRunXSVM,model}); % set here, because of model.
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

140)     set(btnRunXSVM,'Enable','off');
141)     
142)     btnRunSOM = uicontrol(pSOM,'String','run SOM Crossvalidation',...
143)         'Units','normalized',...
144)     'Position',[0.0 0.25 1 0.25]);
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

145)     set(btnRunSOM,'Callback',{@cbRunSOM,model}); % set here, because of model.
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

146)     set(btnRunSOM,'Enable','off');
147) 
148)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
149)         'Units','normalized',...
150)         'Position',[0.0 0.0 1 0.25]);
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

151)     set(btnRunXSOM,'Callback',{@cbRunXSOM,model}); % set here, because of model.
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

153) end
154) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

157)     main_grid = cell(2,4);
158)     main_grid{1,1} = [0 0.7 0.4 0.3];
159)     main_grid{1,2} = [0 0.5 0.5 0.2];
160)     main_grid{1,3} = [0 0.1 0.5 0.4];
161)     main_grid{1,4} = [0 0.0 1.0 0.1];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

166)     
167)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

168)     pSubject = uipanel(parent,'Units','normalized','Position',cell2mat(main_grid(1,1)));
169)     set(pSubject,'Title','Subjects');
170)     set(pSubject,'BackgroundColor','w');
171)     
172)     subjectList = {'DUMMY Subj1','DUMMY Subj2','DUMMY Subj3','DUMMY Subj4'};
173)     model.subjectSelector = uicontrol(pSubject,'Style','listbox',...
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

174)                     'Min',1, 'Max',3,...
175)                     'String',subjectList,...
176)                     'UserData',subjectList,...
177)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

180)     
181)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

183)     set(pClasses,'Title','Class Definitions');
184)     set(pClasses,'BackgroundColor','w');
185)         lClassDef = uicontrol(pClasses,...
186)             'Style','text',...
187)             'String',sprintf('<Label>,\t <[Event, Event, ..]>;'),...
188)             'Units','normalized',...
189)             'Position',[0 0.8 1 0.2]);
190)         set(lClassDef,'BackgroundColor','w');
191)         set(lClassDef,'HorizontalAlignment','left');
192)         
193)         model.txtClassDef = uicontrol(pClasses,'Style','edit',...
194)             'String',sprintf(DEFAULT.classdefstring),...
195)             'Units','normalized',...
196)             'Position',[0 0 1 0.8]);
197)         set(model.txtClassDef,'HorizontalAlignment','left');
198)         set(model.txtClassDef,'Max',20);
199)         set(model.txtClassDef,'Min',0);
200)         set(model.txtClassDef, 'FontName', 'FixedWidth');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

202) 
203) 
204)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

206)     set(pPSTH,'BackgroundColor','w');
207)         
208)         grid_h = 0.16;
209)         grid_w = 0.3;
210)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

211)         tl_grid = cell([3 6]);
212)         tl_grid{2,1} = [0.0 0.83 grid_w grid_h];
213)         tl_grid{2,1} = [0.4 0.83 grid_w grid_h];
214)         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

215)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

219) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

223)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

227) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

228)         tl_grid{1,5} = [0.0 0.16 0.5 grid_h];
229)         tl_grid{2,5} = [0.5 0.16 grid_w grid_h];
230)         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

231)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

232)         tl_grid{1,6} = [0.0 0.0 0.5 grid_h];
233)         tl_grid{2,6} = [0.5 0.0 grid_w grid_h];
234)         tl_grid{3,6} = [0.75 0.0 grid_w grid_h];
235) 
236)         lStart      = createLabel(pPSTH, cell2mat(tl_grid(2,1)) ,'Start [sec]');
237)         lEnd        = createLabel(pPSTH, cell2mat(tl_grid(3,1)) ,'End [sec]');
238)         lPSTH       = createLabel(pPSTH, cell2mat(tl_grid(1,2)),'PSTH Range');
239)         lBaseline   = createLabel(pPSTH, cell2mat(tl_grid(1,3)),'Baseline');
240)         lFrameShift = createLabel(pPSTH, cell2mat(tl_grid(1,4)),'Frame Shift');
241)         lFramsSize  = createLabel(pPSTH, cell2mat(tl_grid(1,5)),'Frame Size');
242)         lSearchligh = createLabel(pPSTH, cell2mat(tl_grid(1,6)),'Searchlight Radius');
243) 
244) 
245)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),DEFAULT.pststart);
246)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),DEFAULT.pstend);
247)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),DEFAULT.baselinestart);
248)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),DEFAULT.baselineend);
249)         model.txtFrameShiftStart   = createTextField(pPSTH,cell2mat(tl_grid(2,4)),DEFAULT.frameshiftstart);
250)         model.txtFrameShiftEnd     = createTextField(pPSTH,cell2mat(tl_grid(3,4)),DEFAULT.frameshiftend);
251)         model.txtFrameShiftDur     = createTextField(pPSTH,cell2mat(tl_grid(2,5)),DEFAULT.frameshiftdur);
252)         model.txtSearchlightRadius = createTextField(pPSTH,cell2mat(tl_grid(2,6)),DEFAULT.searchlightradius);
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

253)         
254)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

256)         set(pImage,'BackgroundColor','w');
257) 
258)         createLabel(pImage,[0.0 0.5 1 0.5],'Select Image Base');
259)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

261)         model.imageTypeSelection = uicontrol(pImage,'Style','popupmenu',...
262)         'Units','normalized',...
263)         'Position',[0.0 0.0 1 0.5],...
264)         'String',imageRegExList,...
265)         'UserData',imageRegExList,...
266)         'Value',1);
267)         set(model.imageTypeSelection,'BackgroundColor','w');
268)         
269)         
270)         % coordinate Table
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

272)         set(pVoxel,'BackgroundColor','w');
273)         lVoxelDef = createLabel(pVoxel, [0 0.9 1 0.1],'<ROI Name>+[offset];');
274)         model.txtVoxelDef = createTextField(pVoxel,[0 0 1 0.9],...
275)             sprintf(DEFAULT.voxelstring));
276)         set(model.txtVoxelDef,'HorizontalAlignment','left');
277)         set(model.txtVoxelDef,'Max',20);
278)         set(model.txtVoxelDef,'Min',0);
279)         set(model.txtVoxelDef, 'FontName', 'FixedWidth');
280)         
Christoph Budziszewski new parseVoxelTxtField getI...

Christoph Budziszewski authored 15 years ago

281)         assignin('base','txtVoxelDef',model.txtVoxelDef);
282)         
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

283)         %normalizations
284)         pNorm = uipanel(parent,'Title','Normalization','Position',cell2mat(main_grid(2,3)));
285)         set(pNorm,'BackgroundColor','w');
286)         
287)         createLabel(pNorm,[0 0.75 1 0.25],'PST Normalization');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

288)         norm1Model = {'DUMMY norm A','DUMMY norm B'};
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

289)         model.selNormPST = uicontrol(pNorm,'Style','popupmenu',...
290)             'Units','normalized',...
291)             'Position',[0.0 0.5 1 0.25],...
292)             'String',norm1Model,...
293)             'UserData',norm1Model,...
294)             'Value',1);
295)          set(model.selNormPST,'BackgroundColor','w');   
296)         
297)         createLabel(pNorm,[0 0.25 1 0.25],'Class-Grouping Normalization');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

298)         norm2Model = {'DUMMY norm X','DUMMY norm Y'};
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

299)         model.selNormClass = uicontrol(pNorm,'Style','popupmenu',...
300)             'Units','normalized',...
301)             'Position',[0.0 0.0 1 0.25],...
302)             'String',norm2Model,...
303)             'UserData',norm2Model,...
304)             'Value',1);
305)          set(model.selNormClass,'BackgroundColor','w');   
306)         
307)         %buttons
308)         pButtons = uipanel(parent,'Position',cell2mat(main_grid(1,4)));
309)         set(pButtons,'BackgroundColor','w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

318)         set(btnRunButton2,'Callback',{@cbRunPreprocessing,model,'FBS'}); % set here, because of model.  
319)         set(btnRunButton2,'Enable','on');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

323)         set(btnRunButton3,'Callback',{@cbRunPreprocessing,model,'ROI'}); % set here, because of model.    
324)         set(btnRunButton3,'Enable','on');
325)         
326)         assignin('base','model',model);
327) end
328) 
329) function cbRunPreprocessing(src,evnt,model,task)
330) 
331) % parse the GUI and pass parameters as structure
332) disp('RUN');
333) timeLine = getTimeLineParams(model);
334) subjects = getSubjectCellList(model);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

335) classDef = parseClassDef(model);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

336) % images
337) % normalization
338) 
339) switch task
340)     case 'COORD'
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

341)         disp('COORD');
342)         coordinates= 'parse me'
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

343)     case 'ROI'
344)         disp('ROI');
345)         runROIImageMaskMode(subjects,timeLine)
346)     case 'FBS'
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

347)         disp('FBS')
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

348) end
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

349) end
350) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

352) % function cbRunCoordTable(src,evnt,model)
353) %     display('RUN Coord-Table Mode');
354) %     main('COORD-LOOKUP-TABLE',model);
355) % end
356) % function cbRunROIImage(src,evnt,model)
357) %     display('RUN Image-Mask Mode');
358) %     main('ROI-IMAGE-MASK', model);
359) % end
360) % function cbRunFBS(src,evnt,model)
361) %     display('RUN Full Brain Searchlight Mode');
362) %     display('not implemented.');
363) % end
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

364) 
365) 
366) function label = createLabel(parent,  pos, labelText)
367)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
368)     set(label,'HorizontalAlignment','left');
369)     set(label,'BackgroundColor','w');
370) end
371) 
372) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

373) %     textfieldcolor = [0.9 0.9 0.0];
374)     textfieldcolor = 'w';