📄 alff_gui.m
字号:
uicontrol(handles.figAlffMain, 'Style','Frame','Position',[2 offsetY+515 1 50]);
uicontrol(handles.figAlffMain, 'Style','Frame','Position',[2 offsetY+565 433 1]);
uicontrol(handles.figAlffMain,'Style','Text','Position',[142 offsetY+555 180 14],...
'String','Option: Remove Linear Trend');
%20070506, Add manual operation button groups like SPM
uicontrol(handles.figAlffMain, 'Style','Frame','Position',[2 offsetY-25 433 1]);
uicontrol(handles.figAlffMain,'Style','Text','Position',[152 offsetY-30 140 14],...
'String','Manual Operations');
function InitControlProperties(hObject, handles)
%for Linux compatible 20070507 dawnsong
% --- FIGURE -------------------------------------
set(handles.figAlffMain,...
'Units', 'pixels', ...
'Position', [20 5 440 650], ...
'Name', 'alff_gui', ...
'MenuBar', 'none', ...
'NumberTitle', 'off', ...
'Color', get(0,'DefaultUicontrolBackgroundColor'));
% --- STATIC TEXTS -------------------------------------
set(handles.txtAlff, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [16 186 91 40], ...
'FontSize', 24, ...
'FontWeight', 'bold', ...
'String', 'ALFF');
theFontSize =8;
if isunix, theFontSize =10; end
set(handles.txtAlffLongName, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [10 300 65 76], ...
'FontSize', theFontSize, ...
'FontWeight', 'normal', ...
'Enable', 'off', ...
'String', sprintf('Amplitude\nof Low\nFrequency\nFluctuation\nComputation'));
set(handles.txtOutputDir, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [8 109 80 21], ...
'FontSize', theFontSize, ...
'String', 'Directory:');
set(handles.txtInputDir, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [7 386 80 21], ...
'String', 'Data Directory:');
set(handles.txtPrefix, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [9 140 80 21], ...
'String', 'Prefix:');
set(handles.txtResultFilename, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [227 148 200 16], ...
'HorizontalAlignment','left' , ...
'String', 'Result: Prefix_DirectoryName.{hdr/img}');
set(handles.txtBandSep, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [146 526 25 51], ...
'FontSize', 28, ...
'String', '~');
set(handles.txtTR, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [230 540 40 16], ...
'String', 'TR: (s)');
set(handles.txtAlffBand, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [20 245 50 16], ...
'String', 'Band( Hz)');
set(handles.txtAlffBandSep, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [144 230 25 51], ...
'FontSize', 28, ...
'String', '~');
set(handles.txtAlffTR, ...
'Style', 'text', ...
'Units', 'pixels', ...
'Position', [230 245 40 16], ...
'String', 'TR: (s)');
% --- PUSHBUTTONS -------------------------------------
set(handles.btnSelectOutputDir, ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [396 107 30 25], ...
'FontSize', 18, ...
'String', '...');
set(handles.btnSelectDataDir, ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [396 384 30 25], ...
'FontSize', 18, ...
'String', '...', ...
'CData', zeros(1,0));
set(handles.btnSelectMask, ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [396 290 30 25], ...
'FontSize', 18, ...
'String', '...', ...
'Enable', 'off', ...
'CData', zeros(1,0));
set(handles.btnComputeAlff, ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [320 186 107 33], ...
'FontSize', 12, ...
'FontWeight', 'bold', ...
'String', 'Do all');
set(handles.btnDetrend , ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [337 603 90 25], ...
'FontSize', 10, ...
'Enable', 'off', ... %Update filter and detrend button's state according to Option: detrend/Filter 20070820
'String', 'Detrend');
set(handles.btnBandPass , ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [337 540 90 25], ...
'FontSize', 10, ...
'Enable', 'off', ... %Update filter and detrend button's state according to Option: detrend/Filter 20070820
'String', 'Filter');
set(handles.btnAlffBandDetail , ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [337 244 90 25], ...
'FontSize', 10, ...
'String', 'Band Hint');
set(handles.btnHelp, ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [10 10 90 33], ...
'FontSize', 10, ...
'String', 'Help');
set(handles.btnDivideMean, ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [110 10 90 33], ...
'FontSize', 10, ...
'String', 'Divide Mean');
set(handles.btnSliceViewer, ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [210 10 90 33], ...
'FontSize', 10, ...
'String', 'Slice Viewer');
set(handles.btnWaveGraph, ...
'Style', 'pushbutton', ...
'Units', 'pixels', ...
'Position', [314 10 110 33], ...
'FontSize', 10, ...
'String', 'Power Spectrum');
% --- RADIO BUTTONS -------------------------------------
set(handles.rbtnDefaultMask, ...
'Style', 'radiobutton', ...
'Units', 'pixels', ...
'Position', [110 347 158 16], ...
'String', 'Default mask');
set(handles.rbtnUserMask, ...
'Style', 'radiobutton', ...
'Units', 'pixels', ...
'Position', [110 321 148 16], ...
'String', 'User''s defined mask');
set(handles.rbtnNullMask, ...
'Style', 'radiobutton', ...
'Units', 'pixels', ...
'Position', [277 348 82 16], ...
'String', 'No mask');
% --- CHECKBOXES -------------------------------------
set(handles.ckboxFilter, ...
'Style', 'checkbox', ...
'Units', 'pixels', ...
'Position', [14 540 80 22], ...
'String', 'Band (Hz)');
set(handles.ckboxDivideMean, ...
'Style', 'checkbox', ...
'Units', 'pixels', ...
'Position', [12 82 430 19], ...
'String', 'Divide ALFF brain by the mean within the mask (mPrefix_DirectoryName.{hdr/img})');
set(handles.ckboxRetrend, ...
'Style', 'checkbox', ...
'Units', 'pixels', ...
'Position', [366 540 60 22], ...
'Enable', 'Off', ...
'String', 'Retrend');
set(handles.ckboxRemoveTrendBefore, ...
'Style', 'checkbox', ...
'Units', 'pixels', ...
'Position', [13 605 140 21],...
'String', 'detrend'); %'String', 'detrend BEFORE Filter');
set(handles.ckboxRemoveTrendAfter, ...
'Style', 'checkbox', ...
'Units', 'pixels', ...
'Position', [171 605 140 21],...
'Visible', 'off', ...
'String', 'detrend AFTER Filter');
% --- EDIT TEXTS -------------------------------------
set(handles.edtOutputDir, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [94 109 300 23], ...
'BackgroundColor', [1 1 1], ...
'String', 'Edit Text');
set(handles.edtDataDirectory, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [94 386 300 22], ...
'BackgroundColor', [1 1 1], ...
'String', '');
set(handles.edtMaskfile, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [94 290 300 23], ...
'BackgroundColor', [1 1 1], ...
'String', 'Edit Text', ...
'Enable', 'off');
set(handles.edtPrefix, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [94 142 115 22], ...
'BackgroundColor', [1 1 1], ...
'String', 'ALFFMap');
set(handles.edtBandLow, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [94 541 50 22], ...
'BackgroundColor', [1 1 1], ...
'String', '0.01', ...
'Enable', 'off');
set(handles.edtBandHigh, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [171 541 50 22], ...
'BackgroundColor', [1 1 1], ...
'String', '0.08', ...
'Enable', 'off');
set(handles.edtSamplePeriod, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [276 541 50 22], ...
'BackgroundColor', [1 1 1], ...
'String', '2', ...
'Enable', 'off');
set(handles.edtAlffBandLow, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [94 245 50 22], ...
'BackgroundColor', [1 1 1], ...
'String', '0.01', ...
'Enable', 'on');
set(handles.edtAlffBandHigh, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [171 245 50 22], ...
'BackgroundColor', [1 1 1], ...
'String', '0.08', ...
'Enable', 'on');
set(handles.edtAlffSamplePeriod, ...
'Style', 'edit', ...
'Units', 'pixels', ...
'Position', [276 245 50 22], ...
'BackgroundColor', [1 1 1], ...
'String', '2', ...
'Enable', 'on');
% --- LISTBOXES -------------------------------------
set(handles.listDataDirs, ...
'Style', 'listbox', ...
'Units', 'pixels', ...
'Position', [14 413 413 98], ...
'BackgroundColor', [1 1 1], ...
'String', '');
%20071103, Add context menu to Input Data Directories to add、delete、export、import……
handles.hContextMenu =uicontextmenu;
set(handles.listDataDirs, 'UIContextMenu', handles.hContextMenu);
uimenu(handles.hContextMenu, 'Label', 'Add a directory', 'Callback', get(handles.btnSelectDataDir, 'Callback'));
uimenu(handles.hContextMenu, 'Label', 'Remove selected directory', 'Callback', 'alff_gui(''DeleteSelectedDataDir'',gcbo,[], guidata(gcbo))');
uimenu(handles.hContextMenu, 'Label', 'Add recursively all sub-folders of a directory', 'Callback', 'alff_gui(''RecursiveAddDataDir'',gcbo,[], guidata(gcbo))');
uimenu(handles.hContextMenu, 'Label', '=============================');
uimenu(handles.hContextMenu, 'Label', 'Clear all data directories', 'Callback', 'alff_gui(''ClearDataDirectories'',gcbo,[], guidata(gcbo))');
% Save handles structure
guidata(hObject,handles);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -