function main_UI(args) global CROSSVAL_METHOD_DEF; DEFAULT.selectedSubject = 1; DEFAULT.smoothed = 1; DEFAULT.multisubject = 'single'; DEFAULT.pststart = -15; DEFAULT.pstend = 40; DEFAULT.baselinestart = -3; DEFAULT.baselineend = -1; DEFAULT.frameshiftstart = -5; DEFAULT.frameshiftend = 35; DEFAULT.frameshiftdur = 0; DEFAULT.classdefstring = 'left,\t[9,11,13],\t -2 ;\nright,\t[10,12,14],\t -1;'; DEFAULT.voxelstring = 'SPL l,\t[ 0, 0, 0];\nSPL r,\t[ 0, 0, 0];\n'; DEFAULT.svmoptstring = '-s 0 -t 0 -v 6 -c 1'; % Initialize and hide the GUI as it is being constructed. frameWidth=450; frameHeight=600; frame = figure('Visible','off','Position',[0,0,frameWidth,frameHeight]); movegui(frame,'west'); % get this thing visible on smaller displays. set(frame,'Name','SVMCrossVal Decode Performance 4 SPM'); set(frame,'NumberTitle','off'); set(frame,'MenuBar','none'); set(frame,'Color',get(0,'defaultUicontrolBackgroundColor')); set(frame,'Resize','off'); set(frame,'Units','normalize'); savemenu = uimenu(frame,'Label','Save/Load'); % model.subjectMap = SubjectRoiMapping(project); model.subjectMap = SubjectRoiMapping; nElementRows = 24; optionLineHeight = 1.0/nElementRows; controlElementHeight=optionLineHeight*(1.0/1.5)*frameHeight; pSubject = uipanel(frame,'Title','Subject', 'Position',[0 optionLineHeight*19 frameWidth optionLineHeight*5]); pPSTH = uipanel(frame,'Title','PSTH Options', 'Position',[0 optionLineHeight*14 frameWidth optionLineHeight*5]); pCLASS = uipanel(frame,'Title','Class Definitions','Position',[0 optionLineHeight*9 frameWidth optionLineHeight*5]); pVOXEL = uipanel(frame,'Title','Voxel Selector', 'Position',[0 optionLineHeight*3 frameWidth optionLineHeight*6]); pSVM = uipanel(frame,'Title','SVM Options', 'Position',[0 optionLineHeight*1 frameWidth optionLineHeight*2]); btnRunButton1 = uicontrol(frame,'Tag','Coord-Table','String','run coord-Table','Position',[2 optionLineHeight*0 (frameWidth/2) controlElementHeight*1.6]); btnRunButton2 = uicontrol(frame,'Tag','ROI-Image','String','run ROI-Image processing','Position',[2+(frameWidth/2) optionLineHeight*0 (frameWidth/2) controlElementHeight*1.6]); % Subject firstColumn = 5.00; firstRow = 1.00 * controlElementHeight; model.subjectSelector = uicontrol(pSubject,'Style','listbox',... 'Min',1, 'Max',3,... 'String',getSubjectCellList(model.subjectMap),... 'Value',DEFAULT.selectedSubject,... % default selected item 'Position',[firstColumn firstRow 0.66*frameWidth controlElementHeight*6]); set(model.subjectSelector,'BackgroundColor','w'); model.chkSmoothed = uicontrol(pSubject,'Style','checkbox','Position',[0.68*frameWidth firstRow 0.25*frameWidth controlElementHeight],'Value',DEFAULT.smoothed); createLabel(pSubject,[0.75*frameWidth firstRow 0.25*frameWidth controlElementHeight],'Smooth Data?'); createLabel(pSubject,[0.68*frameWidth firstRow*4 0.25*frameWidth controlElementHeight],'Analysis Method'); model.analysisMethodSelector = uicontrol(pSubject,'Style','popupmenu',... 'Position',[0.68*frameWidth firstRow*3 0.25*frameWidth controlElementHeight],... 'String',{CROSSVAL_METHOD_DEF.svmcrossval, CROSSVAL_METHOD_DEF.classPerformance},... 'Value',1); set(model.analysisMethodSelector,'BackgroundColor','w'); % set(model.analysisMethodSelector,'enable','off'); % PSTH firstColumn = 5.00; secondColumn = 0.33*frameWidth; thirdColumn = 0.66*frameWidth; % fourthColumn = 0.84*frameWidth; firstRow = 5.5*controlElementHeight; secondRow = 4.5*controlElementHeight; thirdRow = 3.5*controlElementHeight; fourthRow = 2.5*controlElementHeight; fifthRow = 1.0*controlElementHeight; lStart = createLabel(pPSTH, [secondColumn firstRow 0.33*frameWidth controlElementHeight],'Start [sec]'); lEnd = createLabel(pPSTH, [thirdColumn firstRow 0.33*frameWidth controlElementHeight],'End [sec]'); lPSTH = createLabel(pPSTH, [firstColumn secondRow 0.33*frameWidth controlElementHeight],'PSTH Range'); lBaseline = createLabel(pPSTH, [firstColumn thirdRow 0.33*frameWidth controlElementHeight],'Baseline'); lFrameShift = createLabel(pPSTH, [firstColumn fourthRow 0.33*frameWidth controlElementHeight],'SVM Frame Shift'); lFramsSize = createLabel(pPSTH, [firstColumn fifthRow 0.33*frameWidth controlElementHeight],'SVM Frame Size'); model.txtPSTHStart = createTextField(pPSTH,[secondColumn secondRow 0.25*frameWidth controlElementHeight],DEFAULT.pststart); model.txtPSTHEnd = createTextField(pPSTH,[thirdColumn secondRow 0.25*frameWidth controlElementHeight],DEFAULT.pstend); model.txtBaselineStart = createTextField(pPSTH,[secondColumn thirdRow 0.25*frameWidth controlElementHeight],DEFAULT.baselinestart); model.txtBaselineEnd = createTextField(pPSTH,[thirdColumn thirdRow 0.25*frameWidth controlElementHeight],DEFAULT.baselineend); model.txtFrameShiftStart = createTextField(pPSTH,[secondColumn fourthRow 0.25*frameWidth controlElementHeight],DEFAULT.frameshiftstart); model.txtFrameShiftEnd = createTextField(pPSTH,[thirdColumn fourthRow 0.25*frameWidth controlElementHeight],DEFAULT.frameshiftend); model.txtFrameShiftDur = createTextField(pPSTH,[secondColumn fifthRow 0.25*frameWidth controlElementHeight],DEFAULT.frameshiftdur); %Classes nClassRows = 6; firstColumn = 5.00; firstRow = (nClassRows-0.5)*controlElementHeight; secondRow = (nClassRows-4.5)*controlElementHeight; lClassDef = createLabel(pCLASS, [firstColumn firstRow 0.66*frameWidth controlElementHeight],'