1394c628d75d3368238eac5ef65b3257986e5526
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

1) function ui_main(varargin)
2) 
Christoph Budziszewski del JZ006 greymatter test

Christoph Budziszewski authored 15 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 new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

20) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

21) 
Christoph Budziszewski del JZ006 greymatter test

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

39)     task = struct;
40)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

43) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

54)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

57)     
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

61)     % CLASSIFICATION
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

62)     model2 = struct;
63)     
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

68)     % PLOT
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

74)     % TASK
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

77) %         set(task.taskSwitch,'Title','TASK');
78)         set(task.taskSwitch,'BackgroundColor','w');
79)         set(task.taskSwitch,'Units','normalized');
80)     
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

85)         set(btnSwitchPreprocessing,'Enable','on');
86) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

91)         set(btnSwitchClassify,'Enable','on');
92) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

97)         set(btnSwitchPlot,'Enable','on');
98) 
99)     % menu
100)     
Christoph Budziszewski stable version for conference.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

112) 
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

129)     
130)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

137)                     'Min',1, 'Max',3,...
138)                     'String',subjectList,...
139)                     'UserData',subjectList,...
140)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

144)     
145)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

166) 
167) 
168)     %Timeline
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

170)     set(pPSTH,'BackgroundColor','w');
171)         
172)         grid_h = 0.16;
173)         grid_w = 0.3;
174)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

179)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

183) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

187)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

191) 
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

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

195)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

205) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

212)         
213)         % images
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

215)         set(pImage,'BackgroundColor','w');
216) 
217)         createLabel(pImage,[0.0 0.5 1 0.5],'Select Image Base');
218)         
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

226)         set(model.imageTypeSelection,'BackgroundColor','w');
227)         
228)         
229)         % coordinate Table
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

258)             'Position',[0.0 0.1 1 0.25],...
259)             'String','column Bias removal',...
260)             'Enable','on',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

272)         
Christoph Budziszewski snapshot, working on fbs

Christoph Budziszewski authored 15 years ago

273)         btnRunButton2 = uicontrol(pButtons,'String',sprintf('use this settings for FBS'),...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

284) function model = createSecondStepPanel(model,parent,DEFAULT)
285) basecolor = 'w';
286) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

314)     set(pSVM,'Title','SVM Classification');
315)     set(pSVM,'BackgroundColor',basecolor);
316) 
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

324)     set(model.chkSVMrnd,'String','Randomize Datapoints');
325)     set(model.chkSVMrnd,'BackgroundColor','w');
326)     set(model.chkSVMrnd,'Value',DEFAULT.svmrnd);
327)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

339)     set(pSOM,'Title','SOM Classification');
340)     set(pSOM,'BackgroundColor',basecolor);
341) 
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

342)     model.txtSOMopts = createTextField(pSOM,[0 0.75 1 0.25],'3x3 rect');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

343)     set(model.txtSOMopts,'HorizontalAlignment','left');
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

344)     set(model.txtSOMopts,'Enable','off');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

345) 
346)     model.txtSOMnfold = createTextField(pSOM,[0.0 0.50 0.5 0.25],DEFAULT.svmnfold);
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

347)     set(model.txtSOMnfold,'Enable','off');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

348)     createLabel(pSOM,[0.5 0.50 0.5 0.25 ],'-Fold CrossVal');
349) 
350)     btnRunSOM = uicontrol(pSOM,'String','run SOM Crossvalidation',...
351)         'Units','normalized',...
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

354) 
355)     btnRunXSOM = uicontrol(pSOM,'String','run SOM X-Subject validation',...
356)         'Units','normalized',...
357)         'Position',[0.0 0.0 1 0.25]);
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

359)     
360) pSearchlight = uipanel(parent,'Units','normalized','Position',[0.0 0.1 1 0.3]);
361)     set(pSearchlight,'Title','Spatiotemporal FB classification');
362)     set(pSearchlight,'BackgroundColor',basecolor);
363)     
364)     lSearchligh = createLabel(pSearchlight, [0 0.6 0.5 0.3],'Searchlight Radius');
365)     model.txtSearchlightRadius = createTextField(pSearchlight,[0.5 0.6 0.5 0.3],DEFAULT.searchlightradius);
366)     
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

374)     
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

375) 
376) % button callbacks set here, because of model.
377)     set(btnRunSVM, 'Callback',{@cbRunDecode,model,'SVM'}); 
378)     set(btnRunXSVM,'Callback',{@cbRunDecode,model,'XSVM'}); 
379)     set(btnRunSOM, 'Callback',{@cbRunDecode,model,'SOM'});
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

382) end
383) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

385) 
386)     grid_h = 0.25;
387)     grid_w = 0.5;
388)     plot_grid = cell([3 3]);
389)     plot_grid{1,1} = [0.0 0.63 grid_w grid_h];
390)     plot_grid{1,2} = [0.0 0.33 grid_w grid_h];
391)     plot_grid{1,3} = [0.0 0.03 grid_w grid_h];
392)     plot_grid{2,1} = [0.5 0.63 grid_w grid_h];
393)     plot_grid{2,2} = [0.5 0.33 grid_w grid_h];
394)     plot_grid{2,3} = [0.5 0.03 grid_w grid_h];
395) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

397) %     set(pButtonPane,'Title','Plot');
398)     set(pButtonPane,'BackgroundColor','w');
399) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

401)         'Units','normalized',...
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

409)     set(btnPlot02,'Callback',{@cbPlot,model,'x-subject-val'});
410)     set(btnPlot02,'Enable','on');
411) 
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

418) end
419) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

425) 
426) switch task
427)     case 'PRE'
428)         set(taskpanel.preprocessing,'Visible','on');
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 15 years ago

429) 
430) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

438) 
439) assignin('base','model',model);
440) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

441) end
442) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

445) main(model,'pre',task);
446) end
447) 
448) function cbRunDecode(src,evnt,model,task)
449) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

450) end
451) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

452) function cbPlot(src,evnt,model,type)
453) main(model,'plot',type);
454) end
455) 
456) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

457) function model = mcb_cd(src,evnt,model)
458) disp('CD');
459) directory_name = uigetdir(model.baseDir,'Select Study Base Directory ...');
460) model.baseDir = directory_name;
461) model = scanDirs(model);
462) end
463) 
464) function mcb_save(src,evnt,model)
465) disp('SAVE');
466) baseDir  = model.baseDir;
467) timeLine = getTimeLineParams(model);
468) classDefString = getClassDefString(model);
469) coordDefString = getCoordDefString(model);
470) 
471) [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
472) save( fullfile(path,file),'baseDir','timeLine','classDefString','coordDefString') ;
473) end
474) 
475) function model = mcb_load(src,evnt,model)
476) disp('LOAD');
477) [file path] = uigetfile('*.mat','Load Params ...',model.baseDir);
478) l = load(fullfile(path,file));
479) % assignin('base','l',l);
480) model = setTimeLineParams(model,l.timeLine);
481) model = setClassDefString(model,l.classDefString);
482) model = setCoordDefString(model,l.coordDefString);
483) model.baseDir = l.baseDir;
484) model = scanDirs(model);
485) 
486) end
487) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

488) function label = createLabel(parent,  pos, labelText)
489)     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
490)     set(label,'HorizontalAlignment','left');
491)     set(label,'BackgroundColor','w');
492) end
493) 
494) function txt = createTextField(parent,pos,model)
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

495) %     textfieldcolor = [0.9 0.9 0.0];
496)     textfieldcolor = 'w';