e70bbf4d41b9d43d0b09dbff253cb86df6b5368f
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) 
Christoph Budziszewski study change may work

Christoph Budziszewski authored 15 years ago

64)     cdmenu = uimenu(frame,'Label','change Study','Callback',{@mcb_cd,model});
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 study change may work

Christoph Budziszewski authored 15 years ago

73) function model = mcb_cd(src,evnt,model)
74) disp('CD');
75) directory_name = uigetdir(model.baseDir,'Select Study Base Directory ...');
76) model.baseDir = directory_name;
77) model = scanDirs(model);
78) end
79) 
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

80) function mcb_save(src,evnt,model)
81) disp('SAVE');
82) baseDir  = model.baseDir;
83) timeLine = getTimeLineParams(model);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

86) 
87) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

89) end
90) 
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

97) model = setClassDefString(model,l.classDefString);
98) model = setCoordDefString(model,l.coordDefString);
Christoph Budziszewski study change may work

Christoph Budziszewski authored 15 years ago

99) model.baseDir = l.baseDir;
100) model = scanDirs(model)
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

102) end
103) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

106)     
107) 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

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

216)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

220) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

224)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

228) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

232)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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