643a193249fa07d22633128cf73ea0a29bdcb1bf
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

1) function ui_main(varargin)
2) 
3) %  Initialize and hide the GUI as it is being constructed.
4)     frameWidth=450;
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

6)     
7)     frame = figure('Visible','off','Position',[0,0,frameWidth,frameHeight]);
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

8)     movegui(frame,'center'); % get this thing visible on smaller displays.
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

9)     set(frame,'Name','NODalyze');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

10)     set(frame,'NumberTitle','off');
11)     set(frame,'MenuBar','none');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

16)     task = struct;
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

17) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

18)     model = struct;
Christoph Budziszewski save load working for most...

Christoph Budziszewski authored 15 years ago

19)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

20)     model.txtBaseDir = createLabel(frame,[0 0.97 0.8 0.03],'');
21)     set(model.txtBaseDir,'BackgroundColor','w');
22)     set(model.txtBaseDir,'ForegroundColor','b');
23)     
24)     model.txtStudyID = createLabel(frame,[0.8 0.97 0.2 0.03],'');
25)     set(model.txtStudyID,'BackgroundColor','w');
26)     set(model.txtStudyID,'ForegroundColor','r');    
27) 
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

28)     TASK_HEIGHT = 1-0.13;
29)     
30)     % PREPROCESSING
31)     task.preprocessing   = uipanel(frame,'Title','Preprocessing','Position',[0 0.0 1 TASK_HEIGHT]);
32)     set(task.preprocessing,'BackgroundColor','w');
33)     set(task.preprocessing,'Units','normalized');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

34)     model = createFirstStepPanel(model,task.preprocessing);
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

36)     % CLASSIFICATION
37)     task.classification = uipanel(frame,'Title','Classification','Position',[0 0.0 1 TASK_HEIGHT]);
38)     set(task.classification,'BackgroundColor','w');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

39)     model = createSecondStepPanel(model,task.classification);
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

41)     % PLOT
42)     task.plot = uipanel(frame,'Title','Plot','Position',[0 0.0 1 TASK_HEIGHT]);
43)     set(task.plot,'BackgroundColor','w');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

44)     model = createVisualStepPanel(model,task.plot);
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

45)     
Christoph Budziszewski almost all "change study" f...

Christoph Budziszewski authored 14 years ago

46)     % TASK SWITCH BUTTONS
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

49)         set(task.taskSwitch,'BackgroundColor','w');
50)         set(task.taskSwitch,'Units','normalized');
51)     
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

52)         btnSwitchPreprocessing = uicontrol(task.taskSwitch,'Style','pushbutton',...
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

53)             'String','Image Processing',...
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

54)             'Units','normalized','Position',[0.0 0.0 0.33 1]);
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

56)         set(btnSwitchPreprocessing,'Enable','on');
57) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

60)             'Units','normalized','Position',[0.33 0.0 0.33 1]);
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

62)         set(btnSwitchClassify,'Enable','on');
63) 
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

66)             'Units','normalized','Position',[0.66 0.0 0.33 1]);
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

68)         set(btnSwitchPlot,'Enable','on');
69) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

70) 
Christoph Budziszewski almost all "change study" f...

Christoph Budziszewski authored 14 years ago

71)     % MENUS
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

72) 
73)     savemenu = uimenu(frame,'Label','Save ...','Enable','on');
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

74)         uimenu(savemenu,'Label','Save Parameter','Callback',{@mcb_save,'PARAMS',model},'Enable','on');
75)         uimenu(savemenu,'Label','Save ImageProcesseding Data','Callback',{@mcb_save,'IMAGEPROCESSING',model},'Enable','on');
76)         uimenu(savemenu,'Label','Load ImageProcesseding Data','Callback',{@mcb_load,'IMAGEPROCESSING',model},'Enable','on');
77)         uimenu(savemenu,'Label','Save Decode Data','Callback',{@mcb_save,'DECODE',model},'Enable','on');
78)         uimenu(savemenu,'Label','Load Decode Data','Callback',{@mcb_load,'DECODE',model},'Enable','on');
Christoph Budziszewski task-models implementet.

Christoph Budziszewski authored 15 years ago

79)         
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

80)     studySelectMenu = uimenu(frame,'Label','Study ...','Enable','on');
81)         uimenu(studySelectMenu,'Label','*new Study*','Callback',{@mcb_new_study,studySelectMenu,model});
82)         fillStudyMenu(studySelectMenu,model);
83)         
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

84)     updateMenu = uimenu(frame,'Label','Update ...','Enable','on');
Christoph Budziszewski almost all "change study" f...

Christoph Budziszewski authored 14 years ago

85)         uimenu(updateMenu,'Label','rescan subject dir','Callback',{@mcb_update_subjects,model});
86)         uimenu(updateMenu,'Label','rescan images','Callback',{@mcb_update_imagebase,model});
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

87)         
88) %     newStudyMenu = uimenu(frame,'Label','new Study','Enable','on');
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

89) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

90)     load_study([getPreviousStudyID '.mat'],model);
91)     cbSwitchTask(0,0,'PRE',task);
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

95) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

96) %%%%% ui elements
97) function model = createFirstStepPanel(model,parent)
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

98)     norm1Model = {'none','mean','minmax'};
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

99)     roiGroupMethodNames = {'none','mean','max','median'};
100)     roiGroupMethodFunctions = {@(in)in, @(in)nanmean(in),@(in)nanmax(in),@(in)nanmedian(in)};
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

102)     main_grid = cell(2,4);
103)     main_grid{1,1} = [0 0.7 0.4 0.3];
104)     main_grid{1,2} = [0 0.5 0.5 0.2];
105)     main_grid{1,3} = [0 0.1 0.5 0.4];
106)     main_grid{1,4} = [0 0.0 1.0 0.1];
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

108)     main_grid{2,1} = [0.4 0.7 0.6 0.3];
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

109)     main_grid{2,2} = [0.5 0.1 0.5 0.6];
110) %     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

111)     
112)     %Subjects
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

113)     pSubject = uipanel(parent,'Units','normalized','Position',cell2mat(main_grid(1,1)));
114)     set(pSubject,'Title','Subjects');
115)     set(pSubject,'BackgroundColor','w');
116)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

117) %     subjectNames = listDirNames(getBaseDir(model));
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

118)     model.subjectSelector = uicontrol(pSubject,'Style','listbox',...
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

119)                     'Min',1, 'Max',3,...
120)                     'Units','normalized',...
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

123)     set(model.subjectSelector,'BackgroundColor','w');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

124) 
125)   
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

126)     %Classes
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

128)     set(pClasses,'Title','Class Definitions');
129)     set(pClasses,'BackgroundColor','w');
130)         lClassDef = uicontrol(pClasses,...
131)             'Style','text',...
132)             'String',sprintf('<Label>,\t <[Event, Event, ..]>;'),...
133)             'Units','normalized',...
134)             'Position',[0 0.8 1 0.2]);
135)         set(lClassDef,'BackgroundColor','w');
136)         set(lClassDef,'HorizontalAlignment','left');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

138)         
139)         model.txtClassDef = uicontrol(pClasses,'Style','edit',...
140)             'Units','normalized',...
141)             'Position',[0 0 1 0.8]);
142)         set(model.txtClassDef,'HorizontalAlignment','left');
143)         set(model.txtClassDef,'Max',20);
144)         set(model.txtClassDef,'Min',0);
145)         set(model.txtClassDef, 'FontName', 'FixedWidth');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

147) 
148) 
149)     %Timeline
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

150)     pPSTH        = uipanel(parent,'Title','PST Options','Position',cell2mat(main_grid(2,1)));
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

151)     set(pPSTH,'BackgroundColor','w');
152)         
153)         grid_h = 0.16;
154)         grid_w = 0.3;
155)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

156)         tl_grid = cell([3 6]);
157)         tl_grid{2,1} = [0.0 0.83 grid_w grid_h];
158)         tl_grid{2,1} = [0.4 0.83 grid_w grid_h];
159)         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

160)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

164) 
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

168)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

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

172) 
Christoph Budziszewski added TR

Christoph Budziszewski authored 15 years ago

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

176)         
Christoph Budziszewski subject list from filesyste...

Christoph Budziszewski authored 15 years ago

177)         tl_grid{1,6} = [0.0 0.0 0.5 grid_h];
178)         tl_grid{2,6} = [0.5 0.0 grid_w grid_h];
179)         tl_grid{3,6} = [0.75 0.0 grid_w grid_h];
180) 
181)         lStart      = createLabel(pPSTH, cell2mat(tl_grid(2,1)) ,'Start [sec]');
182)         lEnd        = createLabel(pPSTH, cell2mat(tl_grid(3,1)) ,'End [sec]');
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

183)         lPSTH       = createLabel(pPSTH, cell2mat(tl_grid(1,2)) ,'PST Range');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

184)         lBaseline   = createLabel(pPSTH, cell2mat(tl_grid(1,3)) ,'Baseline');
185)         lTRF        = createLabel(pPSTH, cell2mat(tl_grid(1,5)) ,'TR Factor');
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

186)         lTRSec      = createLabel(pPSTH, cell2mat(tl_grid(3,4)) ,'TR [sec]');
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

187) 
188)         model.txtPSTHStart         = createTextField(pPSTH,cell2mat(tl_grid(2,2)),'');
189)         model.txtPSTHEnd           = createTextField(pPSTH,cell2mat(tl_grid(3,2)),'');
190)         model.txtBaselineStart     = createTextField(pPSTH,cell2mat(tl_grid(2,3)),'');
191)         model.txtBaselineEnd       = createTextField(pPSTH,cell2mat(tl_grid(3,3)),'');
192)         model.txtTrFactor          = createTextField(pPSTH,cell2mat(tl_grid(2,5)),'');
193)         model.labelTR              = createTextField(pPSTH,cell2mat(tl_grid(3,5)),'');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

194)         
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

195)         % OPTIONS
196)         grid_h = 0.16;
197)         grid_wl = 0.4;
198)         grid_wo = 0.6;
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

199)         
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

200)         optGrid = cell([3 6]);
201)         optGrid{1,1} = [0.0 0.83 grid_wl grid_h];
202)         optGrid{2,1} = [0.4 0.83 grid_wo grid_h];
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

203)         
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

204)         optGrid{1,2} = [0.0 0.66 grid_wl grid_h];
205)         optGrid{2,2} = [0.4 0.66 grid_wo grid_h];
206) 
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

207)         optGrid{1,3} = [0.0 0.5 1.0 grid_h];
208) %         optGrid{2,3} = [0.4 0.5 grid_wo grid_h];
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

209)         
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

210)         optGrid{1,4} = [0.0 0.33 grid_wl grid_h];
211)         optGrid{2,4} = [0.4 0.33 grid_wo grid_h];
212) 
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

213)         optGrid{1,5} = [0.0 0.16 1.0 grid_h];
214) %         optGrid{2,5} = [0.4 0.16 grid_wo grid_h];
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

215)         
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

216)         optGrid{1,6} = [0.0 0.0 grid_wl grid_h];
217)         optGrid{2,6} = [0.4 0.0 grid_wo grid_h];
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

218) 
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

219)         % Options:Imagebase
220)         pOptions = uipanel(parent,'Title','Options','Position',cell2mat(main_grid(2,2)));
221)         set(pOptions,'BackgroundColor','w');
222) 
223)         createLabel(pOptions,cell2mat(optGrid(1,1)),'Image Base');
224)         model.imageTypeSelection = uicontrol(pOptions,'Style','popupmenu',...
225)         'Units','normalized',...
226)         'Position',cell2mat(optGrid(2,1)));
227)         set(model.imageTypeSelection,'BackgroundColor','w');
228)         
229)         %Options:normalizations
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

230)         
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

231)         createLabel(pOptions,cell2mat(optGrid(1,2)),'PST normalization');
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

232)         model.selNormPST = uicontrol(pOptions,'Style','popupmenu',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

233)             'Units','normalized',...
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

234)             'Position',cell2mat(optGrid(2,2)),...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

235)             'String',norm1Model,...
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

236)             'UserData',norm1Model);
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

237)          set(model.selNormPST,'BackgroundColor','w');   
238)         
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

239)         model.chkColBias = uicontrol(pOptions,'Style','checkbox',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

240)             'Units','normalized',...
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

241)             'Position',cell2mat(optGrid(1,3)),...
242)             'String','Remove Column Bias within class',...
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

243)             'Enable','on');
Christoph Budziszewski normalization features enabled

Christoph Budziszewski authored 15 years ago

244)          set(model.chkColBias,'BackgroundColor','w');   
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

245)          
246)          %Options:spatialGrouping
247) 
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

248)          createLabel(pOptions,cell2mat(optGrid(1,4)),'Spatial Grouping');
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

249)          model.selRoiGrouping = uicontrol(pOptions,'Style','popupmenu',...
250)                 'Units','normalized',...
251)                 'Position',cell2mat(optGrid(2,4)),...
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

252)                 'String',roiGroupMethodNames,...
253)                 'UserData',roiGroupMethodFunctions);
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

254)          set(model.selRoiGrouping,'BackgroundColor','w');
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

255)          
256)          %Options:VOI selection for FBS
257)          btnRunButton2 = uicontrol(pOptions,'String',sprintf('load VOI for Searchlight'),...
258)              'Units','normalized','Position',cell2mat(optGrid(1,5)));
259)          set(btnRunButton2,'Enable','on');
260)  
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

261)         
262)         % COORD TABLE
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

263)         pVoxel = uipanel(parent,'Title','Select ROIs','Position',cell2mat(main_grid(1,3)));
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

264)         set(pVoxel,'BackgroundColor','w');
265)         lVoxelDef = createLabel(pVoxel, [0 0.9 1 0.1],'<ROI Name> [+ radius (mm)];');
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

266)         model.txtVoxelDef = createTextField(pVoxel,[0 0.15 1 0.75],'');
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

267)         set(model.txtVoxelDef,'HorizontalAlignment','left');
268)         set(model.txtVoxelDef,'Max',20);
269)         set(model.txtVoxelDef,'Min',0);
270)         set(model.txtVoxelDef, 'FontName', 'FixedWidth');
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

271)         
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

272)         btnROIlist = uicontrol(pVoxel,'String','show available ROIs','Units','normalized',...
273)             'Position',[0 0 1 0.15]);
Christoph Budziszewski basic available ROI display

Christoph Budziszewski authored 14 years ago

274)         set(btnROIlist,'Enable','on');
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

276)         %buttons
277)         pButtons = uipanel(parent,'Position',cell2mat(main_grid(1,4)));
278)         set(pButtons,'BackgroundColor','w');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

279)         
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

280)         btnRunButton1 = uicontrol(pButtons,'String','start ROI-List processing',...
Christoph Budziszewski gui finished. callbacks sti...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

282)         set(btnRunButton1,'Enable','on');
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

283) 
284)         btnRunButton3 = uicontrol(pButtons,'String','start ROI-Image processing',...
285)             'Units','normalized','Position',[0.66 0 0.33 1]);
286)         set(btnRunButton3,'Enable','on');
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

287)         
288)         
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

289)         set(btnRunButton1,'Callback',{@cbRunPreprocessing,model,'COORD'}); % set here, because of model.
Christoph Budziszewski basic available ROI display

Christoph Budziszewski authored 14 years ago

290)         set(btnRunButton2,'Callback',{@cbRunPreprocessing,model,'FBS'});   % set here, because of model.  
291)         set(btnRunButton3,'Callback',{@cbRunPreprocessing,model,'ROI'});   % set here, because of model.    
292)         set(btnROIlist,   'Callback',{@cbShowAvailableROIs,model});        % set here, because of model.  
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

294) end
295) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

296) function model = createSecondStepPanel(model,parent)
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

297) basecolor = 'w';
298) 
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

299) TimeframeGroupingStrings = {'none','mean'};%,'sum,'max','median'};
300) TimeframeGroupingFunctions = {@(in)in,@(in)nanmean(in,2)};%,'sum',','max','median'};
301) 
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

302) pTime = uipanel(parent,'Units','normalized','Position',[0.0 0.7 1 0.3]);
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

303)     set(pTime,'Title','Decode Timerange Options');
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

304)     set(pTime,'BackgroundColor',basecolor);
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

305)     grid_h = 0.25;
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

306)     grid_w = 0.3;
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

307)     time_grid = cell([3 4]);
308)     time_grid{1,1} = [0.0 0.75 grid_w grid_h];
309)     time_grid{2,1} = [0.4 0.75 grid_w grid_h];
310)     time_grid{3,1} = [0.7 0.75 grid_w grid_h];
311)     time_grid{1,2} = [0.0 0.50 grid_w grid_h];
312)     time_grid{2,2} = [0.4 0.50 grid_w grid_h];
313)     time_grid{3,2} = [0.7 0.50 grid_w grid_h];
314)     time_grid{1,3} = [0.0 0.25 grid_w grid_h];
315)     time_grid{2,3} = [0.4 0.25 grid_w grid_h];
316)     time_grid{3,3} = [0.7 0.0 grid_w grid_h];
317)     time_grid{1,4} = [0.0 0.0 grid_w grid_h];
318)     time_grid{2,4} = [0.4 0.0 grid_w grid_h];
319)     time_grid{3,4} = [0.7 0.0 grid_w grid_h];
320)     
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

321)     lStart      = createLabel(pTime, cell2mat(time_grid(2,1)) ,'Start [sec]');
322)     lEnd        = createLabel(pTime, cell2mat(time_grid(3,1)) ,'End [sec]');
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

323)     lFrameShift = createLabel(pTime, cell2mat(time_grid(1,2)),'Time Range');
324)     lFramsSize  = createLabel(pTime, cell2mat(time_grid(1,3)),'Shifting Time Frame [sec]');
325)     lFramegroup = createLabel(pTime, cell2mat(time_grid(1,4)),'Time Frame Grouping');
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

326)     
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

327)     model.txtFrameShiftStart   = createTextField(pTime,cell2mat(time_grid(2,2)),'');
328)     model.txtFrameShiftEnd     = createTextField(pTime,cell2mat(time_grid(3,2)),'');
329)     model.txtFrameShiftDur     = createTextField(pTime,cell2mat(time_grid(2,3)),'');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

330)     
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

331) 
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

332)     
333)     model.selTimeframeGrouping = uicontrol(pTime,'Style','popupmenu',...
334)         'Units','normalized',...
335)         'Position',cell2mat(time_grid(2,4)),...
Christoph Budziszewski spatial and temporal groupi...

Christoph Budziszewski authored 14 years ago

336)         'String',TimeframeGroupingStrings,...
337)         'UserData',TimeframeGroupingFunctions);
338)     set(model.selTimeframeGrouping,'Enable','on');
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

339)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

340) pSVM = uipanel(parent,'Units','normalized','Position',[0 0.0 0.499 0.7]);
341)     set(pSVM,'Title','SVM Classification (libSVM)');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

342)     set(pSVM,'BackgroundColor',basecolor);
343) 
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

344)     grid_h = 0.125;
345) 
346)     svmgrid = cell([2 8]);
347)     svmgrid{1,1} = [0.0 0.875 1.0 grid_h];
348)     svmgrid{1,2} = [0.0 0.750 0.5 grid_h];
349)     svmgrid{2,2} = [0.5 0.750 0.5 grid_h];
350)     svmgrid{1,3} = [0.0 0.625 1   grid_h];
351)     svmgrid{1,4} = [0.0 0.5   1   grid_h];
352)     svmgrid{1,5} = [0.0 0.375 1   grid_h];
353)     svmgrid{1,6} = [0.0 0.250 0.5 grid_h];
354)     svmgrid{2,6} = [0.5 0.250 0.5 grid_h];
355)     svmgrid{1,7} = [0.0 0.125 0.5 grid_h];
356)     svmgrid{2,7} = [0.5 0.125 0.5 grid_h];
357)     svmgrid{1,8} = [0.0 0.0   1   grid_h];
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

358)     
359)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

360)     model.txtSVMopts = createTextField(pSVM,cell2mat(svmgrid(1,1)),'');
361)     set(model.txtSVMopts,'HorizontalAlignment','left');
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

362)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

363)     model.txtSVMnfold = createTextField(pSVM,cell2mat(svmgrid(1,2)),'');
364)     createLabel(pSVM,cell2mat(svmgrid(2,2)),'-Fold CrossVal');
365)     
366)     btnRunSVM = uicontrol(pSVM,'String','run SVM within-Subject crossvalidation',...
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

367)         'Units','normalized',...
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

368)         'Position',cell2mat(svmgrid(1,3)));
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

369)     set(btnRunSVM,'Enable','on');
370)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

371)     btnRunXSVM = uicontrol(pSVM,'String','run SVM across-Subject crossvalidation',...
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

372)         'Units','normalized',...
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

373)         'Position',cell2mat(svmgrid(1,4)));
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

374)     set(btnRunXSVM,'Enable','on');
Christoph Budziszewski added randomize datapoints...

Christoph Budziszewski authored 15 years ago

375)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

376)     lSearchligh = createLabel(pSVM, cell2mat(svmgrid(1,6)),'Searchlight Radius (mm)');
377)     model.txtSearchlightRadius = createTextField(pSVM,cell2mat(svmgrid(2,6)),'');
378)     
379)     lFBSTiming = createLabel(pSVM, cell2mat(svmgrid(1,7)),'Timepoints [sec] (opt.)');
380)     set(lFBSTiming,'TooltipString','e.g. ''-5 0 5 10 15''');
381)     model.txtSearchlightTimeline = createTextField(pSVM,cell2mat(svmgrid(2,7)),'');
382) 
383)     btnRunFBS = uicontrol(pSVM,'String','run Searchlight',...
384)         'Units','normalized',...
385)         'Position',cell2mat(svmgrid(1,8)));
386)     set(btnRunFBS,'Enable','on');
387)     
388)     
389) pSOM = uipanel(parent,'Units','normalized','Position',[0.5 0.3 0.499 0.4]);
390)     set(pSOM,'Title','SOM Classification (somtoolbox2)');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

391)     set(pSOM,'BackgroundColor',basecolor);
392) 
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

393)     createLabel(pSOM,[0 0.75 0.3 0.20],'Size:');
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

394)     model.txtSomM = createTextField(pSOM,[0.3 0.75 0.25 0.16],'');
395)     somsizemal = createLabel(pSOM,[0.55 0.75 0.2 0.16],'x');
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

396)     set(somsizemal,'HorizontalAlignment','center');
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

397)     model.txtSomN = createTextField(pSOM,[0.75 0.75 0.25 0.16],'');
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

398)     latticeModel = {'rect','hexa'};
399)     model.selSomLattice = uicontrol(pSOM,'Style','popupmenu',...
400)         'Units','normalized',...
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

401)         'Position',[0.0 0.5 0.3 0.16],...
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

402)         'String',latticeModel,...
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

403)         'UserData',latticeModel);
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

404)     set(model.selSomLattice,'BackgroundColor','w');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

405) 
Christoph Budziszewski studychange works. added gu...

Christoph Budziszewski authored 14 years ago

406)     model.txtSOMnfold = createTextField(pSOM,[0.5 0.50 0.25 0.16],'');
407)     createLabel(pSOM,[0.75 0.5 0.25 0.16 ],'-Fold CrossVal');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

408) 
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

409)     btnRunSOM = uicontrol(pSOM,'String','run SOM within-Subject crossvalidation',...
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

410)         'Units','normalized',...
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

413) 
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

414)     btnRunXSOM = uicontrol(pSOM,'String','run SOM across-Subject crossvalidation',...
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

415)         'Units','normalized',...
416)         'Position',[0.0 0.0 1 0.25]);
Christoph Budziszewski manual renamings, better FB...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

418)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

419) % OPTIONS
420) pOptions = uipanel(parent,'Units','normalized','Position',[0.5 0 0.5 0.3]);
421)     set(pOptions,'Title','Other Options');
422)     set(pOptions,'BackgroundColor',basecolor);
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

423)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

424)     model.chkSVMrnd = uicontrol(pOptions,'Style','checkbox','Units','normalized','Position',[0 0.66 1 0.33]);
425)     set(model.chkSVMrnd,'String','Randomize Trial Order');
426)     set(model.chkSVMrnd,'BackgroundColor','w');
Christoph Budziszewski fbs timeline mod

Christoph Budziszewski authored 14 years ago

427) 
Christoph Budziszewski begin SOM implementation

Christoph Budziszewski authored 15 years ago

428) 
429) % button callbacks set here, because of model.
430)     set(btnRunSVM, 'Callback',{@cbRunDecode,model,'SVM'}); 
431)     set(btnRunXSVM,'Callback',{@cbRunDecode,model,'XSVM'}); 
432)     set(btnRunSOM, 'Callback',{@cbRunDecode,model,'SOM'});
Christoph Budziszewski radius frontend enabled, fi...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

435) end
436) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

438) 
Christoph Budziszewski add trajectory plot

Christoph Budziszewski authored 14 years ago

439)     grid_h = 0.125;
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

440)     grid_w = 0.5;
Christoph Budziszewski add trajectory plot

Christoph Budziszewski authored 14 years ago

441)     plot_grid = cell([3 8]);
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

442)     plot_grid{1,1} = [0.0 0.63 grid_w grid_h];
443)     plot_grid{1,2} = [0.0 0.33 grid_w grid_h];
444)     plot_grid{1,3} = [0.0 0.03 grid_w grid_h];
Christoph Budziszewski add trajectory plot

Christoph Budziszewski authored 14 years ago

445)     plot_grid{2,1} = [0.25 (1-1*grid_h) grid_w grid_h];
446)     plot_grid{2,2} = [0.25 (1-2*grid_h) grid_w grid_h];
447)     plot_grid{2,3} = [0.25 (1-3*grid_h) grid_w grid_h];
448)     plot_grid{2,4} = [0.25 (1-4*grid_h) grid_w grid_h];
449)     plot_grid{2,5} = [0.25 (1-5*grid_h) grid_w grid_h];
450)     plot_grid{2,6} = [0.25 (1-6*grid_h) grid_w grid_h];
451)     plot_grid{2,7} = [0.25 (1-7*grid_h) grid_w grid_h];
452)     plot_grid{2,8} = [0.25 (1-8*grid_h) grid_w grid_h];
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

453) 
Christoph Budziszewski add trajectory plot

Christoph Budziszewski authored 14 years ago

454)     
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

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

Christoph Budziszewski authored 14 years ago

458)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

459)     btnPlot03 = uicontrol(pButtonPane,'String','Plot PSTH',...
Christoph Budziszewski refined gui elements

Christoph Budziszewski authored 14 years ago

460)         'Units','normalized',...
461)         'Position',cell2mat(plot_grid(2,1)));
462)     set(btnPlot03,'Callback',{@cbPlot,model,'psth'}); 
463)     set(btnPlot03,'Enable','on');
464)   
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

465)     btnPlot01 = uicontrol(pButtonPane,'String','Plot Decode Performance +/- SE',...
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

470)     
Christoph Budziszewski new labels, some cleanup

Christoph Budziszewski authored 14 years ago

471)     btnPlot02 = uicontrol(pButtonPane,'String','Plot Individual Performance and Mean +/- SE',...
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

474)     set(btnPlot02,'Callback',{@cbPlot,model,'x-subject-val'});
475)     set(btnPlot02,'Enable','on');
476) 
Christoph Budziszewski add trajectory plot

Christoph Budziszewski authored 14 years ago

477)     btnPlotT1 = uicontrol(pButtonPane,'String','Plot Trajectory (t vs A vs B)',...
478)         'Units','normalized',...
479)         'Position',cell2mat(plot_grid(2,4)));
480)     set(btnPlotT1,'Callback',{@cbPlot,model,'trajectory'});
481)     set(btnPlotT1,'Enable','on');
482) 
483)     btnPlotT2 = uicontrol(pButtonPane,'String','Plot Trajectory (A vs B vs C)',...
484)         'Units','normalized',...
485)         'Position',cell2mat(plot_grid(2,5)));
486)     set(btnPlotT2,'Callback',{@cbPlot,model,'trajectory3'});
487)     set(btnPlotT2,'Enable','on');
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

488) end
489) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

490) %%%%% ui callbacks
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

491) 
Christoph Budziszewski basic available ROI display

Christoph Budziszewski authored 14 years ago

492) function cbShowAvailableROIs(src,evtl,model)
493)     ui_showAvailableROIs(model);
494) end
495) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

500) switch task
501)     case 'PRE'
502)         set(taskpanel.preprocessing,'Visible','on');
Christoph Budziszewski fbs timeline mod, model in...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

509) end
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

510) % assignin('base','model',model);
Christoph Budziszewski GUI Task Switch: selfmade T...

Christoph Budziszewski authored 15 years ago

511) end
512) 
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

514) main(model,'pre',task);
515) end
516) 
517) function cbRunDecode(src,evnt,model,task)
518) main(model,'decode',task);
Christoph Budziszewski started save/load functiona...

Christoph Budziszewski authored 15 years ago

519) end
520) 
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

521) function cbPlot(src,evnt,model,type)
522) main(model,'plot',type);
523) end
524) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

525) %%%%%%%%%% menu callbacks
Christoph Budziszewski first plot button. not work...

Christoph Budziszewski authored 15 years ago

526) 
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

527) function mcb_save(src,evnt,token,model)
528) switch token
529)     case 'PARAMS'
530)         studyID = get(model.txtStudyID,'String');
531)         saveStudy(studyID,model);
532)     case 'IMAGEPROCESSING'
533)         disp('save img data..');
534)         [FileName,PathName,FilterIndex] = uiputfile('*.mat','Save ImageProcessing Data') ;
535)         if(~strcmp(FileName,''))
536)             evalin('base', sprintf('save(''%s'',''%s'')',fullfile(PathName,FileName),'preprocessedData'));
537)             disp('saved');
538)         end
539) %         [FileName,PathName,FilterIndex] = uigetfile('*.mat','Load ImageProcessing Data') 
540) %         evalin('base', sprintf('load(%s,%s)',fullfile(PathName,FileName),'preprocessedData'));
541)     case 'DECODE'
542)         disp('save decode data..');
543)         [FileName,PathName,FilterIndex] = uiputfile('*.mat','Save Decode Data') ;
544)         if(~strcmp(FileName,''))
545)             evalin('base', sprintf('save(''%s'',''%s'')',fullfile(PathName,FileName),'decode'));
546)             disp('saved');
547)         end
548) end
549) end
550) 
551) function mcb_load(src,evnt,token,model)
552) switch token
553)     case 'IMAGEPROCESSING'
554)         disp('load img data..');
555)         [FileName,PathName,FilterIndex] = uigetfile('*.mat','Load ImageProcessing Data') ;
556)         if(~strcmp(FileName,''))
557)             evalin('base', sprintf('load(''%s'',''%s'')',fullfile(PathName,FileName),'preprocessedData'));
558)             disp('done');
559)         end
560)     case 'DECODE'
561)         disp('load decode data..');
562)         [FileName,PathName,FilterIndex] = uigetfile('*.mat','Load Decode Data') ;
563)         if(~strcmp(FileName,''))
564)             evalin('base', sprintf('load(''%s'',''%s'')',fullfile(PathName,FileName),'decode'));
565)             disp('done');
566)         end
567) end
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

568) end
569) 
Christoph Budziszewski almost all "change study" f...

Christoph Budziszewski authored 14 years ago

570) function mcb_update_subjects(src,evnt,model)
571) studyID = get(model.txtStudyID,'String');
572) baseDir = getBaseDir(model);
573) subjectNames = listDirNames(baseDir);
574) 
575) set(model.subjectSelector,'String',subjectNames);
576) set(model.subjectSelector,'UserData',subjectNames);
577) set(model.subjectSelector,'Value',1);
578) 
579) saveStudy(studyID,model);
580) end
581) 
582) function mcb_update_imagebase(src,evnt,model)
583) studyID = get(model.txtStudyID,'String');
584) 
585) subjectNames = getSubjectCellList(model);
586) imageDir = fullfile(getBaseDir(model),cell2mat(subjectNames(1)));
587) imageMask = imageMaskNames(imageDir);
588) 
589) set(model.imageTypeSelection,'String',imageMask);
590) set(model.imageTypeSelection,'UserData',imageMask);
591) set(model.imageTypeSelection,'Value',1);
592) 
593) saveStudy(studyID,model);
594) end
595) 
596) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

597) function mcb_new_study(src,evnt,studymenu,uimodel)
Christoph Budziszewski almost all "change study" f...

Christoph Budziszewski authored 14 years ago

598) studyID = get(uimodel.txtStudyID,'String');
599) saveStudy(studyID,uimodel);
600) 
Christoph Budziszewski first eventually working st...

Christoph Budziszewski authored 14 years ago

601) display('CREATE STUDY');
602)     ui_createStudy(studymenu,uimodel);
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

603) end
604) 
605) 
606) 
Christoph Budziszewski new GUI. Only Layout. Backe...

Christoph Budziszewski authored 15 years ago

607)