📄 fmri_create_datamat_ui.m
字号:
c = uicontrol('Parent',h0, ... % Number of scans to be skipped
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'Position',pos, ...
'String','Number of scans to be skipped:', ...
'TooltipString','The number of first few scans that have unstable magnetic signals.', ...
'Tag','NumScansSkippedLabel');
x = x+w;
y = y+.01;
w = 0.1;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Number of skipped scans edit
'Style','edit', ...
'Units','normal', ...
'BackgroundColor',[1 1 1], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'Position',pos, ...
'String','0', ...
'TooltipString','Enter a positive integer.', ...
'Callback','fmri_create_datamat_ui(''EDIT_SKIPPED_SCANS'');', ...
'Tag','NumScansSkippedEdit');
x = 0.1;
% y = y-.05-.01;
y = y-.06-.01;
w = 0.25;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % ST Datamat Run Included Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'Position',pos, ...
'String','Run to be included:', ...
'TooltipString','The indices of the runs to be used to generate the ST Datamat.', ...
'Tag','STDatamatRunIncludedLabel');
x = x+w;
y = y+.01;
w = 0.4;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % ST Datamat Run Included Edit
'Style','edit', ...
'Units','normal', ...
'BackgroundColor',[1 1 1], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'Position',pos, ...
'String',num2str([1:num_runs]), ...
'TooltipString','Enter a series of run indices.', ...
'Callback','fmri_create_datamat_ui(''EDIT_RUN_INCLUDED'');', ...
'Tag','STDatamatRunIncludedEdit');
x = 0.1;
% y = y-.05-.01;
y = y-.06-.01;
w = 0.25;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Ignore Slices
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'Position',pos, ...
'String','Slices to be ignored:', ...
'Tag','STDatamatIgnoreSlicesLabel');
x = x+w;
y = y+.01;
w = 0.4;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Ignore Slices Edit
'Style','edit', ...
'Units','normal', ...
'BackgroundColor',[1 1 1], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'Position',pos, ...
'String','', ...
'TooltipString','Enter the slice numbers.', ...
'Callback','fmri_create_datamat_ui(''EDIT_IGNORE_SLICES'');', ...
'Tag','STDatamatIgnoreSlicesEdit');
x = 0.1;
% y = y-.05-.01;
y = y-.06-.01;
w = 0.4;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Window Size Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'Position',pos, ...
'String','Temporal window size (in scans):', ...
'TooltipString','The temporal window size for each condition.', ...
'Tag','STDatamatWindowSizeLabel');
x = x+w;
y = y+.01;
w = 0.1;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Window Size Edit
'Style','edit', ...
'Units','normal', ...
'BackgroundColor',[1 1 1], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'Position',pos, ...
'String','8', ...
'TooltipString','Enter a positive integer.', ...
'Callback','fmri_create_datamat_ui(''EDIT_TEMPORAL_WINDOW_SIZE'');', ...
'Tag','STDatamatWindowSizeEdit');
x = 0.1;
% y = y-.05;
y = y-.06;
w = 0.4;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Mean Ratio Button
'Style','check', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'Value', 0, ...
'Position',pos, ...
'String','Normalize data with volume mean', ...
'Callback','fmri_create_datamat_ui(''EDIT_NORMAL_VOLUME'');', ...
'Tag','MeanRatioChkButton');
x = x+w+0.05;
w = 0.35;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Mean Signal Button
'Style','check', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'Value', 1, ...
'Position',pos, ...
'String','Normalize data with ref. scans', ...
'Callback','fmri_create_datamat_ui(''EDIT_NORMAL_SIGNAL'');', ...
'Tag','MeanSignalChkButton');
x = 0.1;
% y = y-.05;
w = 0.5;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Merge Data Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'Position',pos, ...
'String','Merge data of each condition:', ...
'visible', 'off', ...
'Tag','MergeDataLabel');
x = 0.1;
% y = y-.04;
w = 0.22;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Merge Data Across Runs Button
'Style','radiobutton', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'Value', 1, ...
'Position',pos, ...
'String','Across All Runs', ...
'visible', 'off', ...
'Callback','fmri_create_datamat_ui(''MERGE_DATA_ACROSS_RUNS_BUTTON'');', ...
'Tag','MergeDataAcrossRunsButton');
x = x+w;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Merge Data Within Run Button
'Style','radiobutton', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'Value', 0, ...
'Position',pos, ...
'String','Within Each Run', ...
'visible', 'off', ...
'Callback','fmri_create_datamat_ui(''MERGE_DATA_WITH_RUN_BUTTON'');', ...
'Tag','MergeDataWithinRunButton');
% x = 0.55;
% w = 0.35;
x = 0.1;
% y = y-.05;
y = y-.06;
w = 0.5;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Single Subject
'Style','check', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'Position',pos, ...
'String','Single Subject Analysis', ...
'Callback','fmri_create_datamat_ui(''SINGLESUBJECTBUTTON'');', ...
'Tag','SingleSubjectChkButton');
x = 0.1;
y = y-.05-.03;
w = 0.18;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Behav Data Label
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.7 0.7 0.7], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','right', ...
'Position',pos, ...
'String','Behavior Data:', ...
'visible', 'off', ...
'Tag','BehavDataLabel');
x = x+w+0.02;
y = y+.01;
w = 0.1;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Number of behavior edit
'Style','edit', ...
'Units','normal', ...
'BackgroundColor',[0.9 0.9 0.9], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'Position',pos, ...
'String','0', ...
'buttondown','fmri_create_datamat_ui(''EDIT_NUM_BEHAVIOR'');', ...
'enable', 'inactive', ...
'visible', 'off', ...
'Tag','NumberBehaviorEdit');
x = x+w+.02;
w = 0.3;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Behavior Data Edit
'Units','normal', ...
'string', 'Edit Behavior Data...', ...
'FontUnits','normal', ...
'FontSize',fnt, ...
'Position',pos, ...
'callback','fmri_create_datamat_ui(''EDIT_BEHAV_DATA_ALL'');', ...
'enable', 'on', ...
'visible', 'off', ...
'Tag','BehavDataEdit_all');
c = uicontrol('Parent',h0, ... % Behavior Data Edit
'Units','normal', ...
'string', 'Edit Behavior Data...', ...
'FontUnits','normal', ...
'FontSize',fnt, ...
'Position',pos, ...
'callback','fmri_create_datamat_ui(''EDIT_BEHAV_DATA_EACH'');', ...
'enable', 'on', ...
'visible','off', ...
'Tag','BehavDataEdit_each');
c = uicontrol('Parent',h0, ... % Behavior Data Edit
'Units','normal', ...
'string', 'Edit Behavior Data...', ...
'FontUnits','normal', ...
'FontSize',fnt, ...
'Position',pos, ...
'callback','fmri_create_datamat_ui(''EDIT_BEHAV_DATA_ALL_SINGLE'');', ...
'enable', 'on', ...
'visible','off', ...
'Tag','BehavDataEdit_all_single');
c = uicontrol('Parent',h0, ... % Behavior Data Edit
'Units','normal', ...
'string', 'Edit Behavior Data...', ...
'FontUnits','normal', ...
'FontSize',fnt, ...
'Position',pos, ...
'callback','fmri_create_datamat_ui(''EDIT_BEHAV_DATA_EACH_SINGLE'');', ...
'enable', 'on', ...
'visible','off', ...
'Tag','BehavDataEdit_each_single');
x = x+w+.02;
w = 0.15;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Behav Data Button
'Style','pushbutton', ...
'Units','normal', ...
'FontUnits','normal', ...
'FontSize',fnt, ...
'Position',pos, ...
'String','Browse ...', ...
'Callback','fmri_create_datamat_ui(''SELECT_BEHAV_DATA'');', ...
'enable', 'on', ...
'visible', 'off', ...
'Tag','BehavDataButton');
x = 0.05;
% y = 0.05;
y = 0.06;
w = 0.4;
% h = 0.04;
h = 0.05;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % ORIENT Button
'Style','pushbutton', ...
'Units','normal', ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'Position',pos, ...
'String','Check image orientation', ...
'Callback','bfm_create_datamat_ui(''ORIENT'');',...
'Tag','ORIENTButton');
% x = 0.25;
x = 0.5;
% y = 0.05;
% w = 0.15;
w = 0.2;
% h = 0.04;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % RUN Button
'Style','pushbutton', ...
'Units','normal', ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'Position',pos, ...
'String','Create', ...
'Callback','fmri_create_datamat_ui(''RUN_BUTTON'');',...
'Tag','RUNButton');
% x = 1-x-w;
x = x + w + 0.05;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % CANCEL Button
'Style','pushbutton', ...
'Units','normal', ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'Position',pos, ...
'String','Cancel', ...
'Callback','fmri_create_datamat_ui(''CANCEL_BUTTON'');',...
'Tag','CANCELButton');
x = 0.01;
y = 0;
w = 1;
% h = 0.04;
pos = [x y w h];
c = uicontrol('Parent',h0, ... % Message Line
'Style','text', ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ForegroundColor',[0.8 0.0 0.0], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'Position',pos, ...
'String','', ...
'Tag','MessageLine');
setappdata(h0,'SessionFile',session_file);
setappdata(h0,'NumRuns',num_runs);
setappdata(h0,'NumSlices',num_slices);
setappdata(h0,'BehavData',[]);
setappdata(h0,'BehavName',{});
% setappdata(gcf,'NumBehavior',0);
set_num_behav;
setappdata(h0, 'session_win_hdl', session_win_hdl);
InitOptions(num_runs);
return; % init
%----------------------------------------------------------------------------
function InitOptions(num_runs)
setappdata(gcf,'BrainRegionFile',[]);
setappdata(gcf,'Threshold',0.15);
setappdata(gcf,'MaxStdDev',4);
setappdata(gcf,'NumScansSkipped',0);
setappdata(gcf,'RunsIncluded',[1:num_runs]);
setappdata(gcf,'SliceIgnored',[]);
setappdata(gcf,'TemporalWindowSize',8);
return; % InitOptions
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -