📄 fmri_result_ui.m
字号:
setting = getappdata(gcbf,'setting');
save_display_status = 'off';
try
load('pls_profile');
catch
end
if strcmpi(save_display_status, 'off')
setting = [];
end
if ~isequal(setting, old_setting) & strcmpi(save_display_status, 'on')
% save_setting = ...
% questdlg('Would you like to save the display setting?', ...
% 'Save current fields', 'yes', 'no', 'yes');
if 1 % strcmp(save_setting, 'yes')
try
PLSresultFile = get(findobj(gcbf,'Tag','ResultFile'),'UserData');
setting1 = setting;
save(PLSresultFile, '-append', 'setting1');
catch
msg = 'Cannot save setting information';
msgbox(msg,'ERROR','modal');
end
end
end
DeleteLinkedFigure;
calling_fig = getappdata(gcf,'CallingFigure');
set(calling_fig,'visible','on');
elseif (strcmp(action,'OpenResponseFnPlot'))
OpenResponseFnPlot;
elseif (strcmp(action,'OpenCorrelationPlot'))
OpenCorrelationPlot;
elseif (strcmp(action,'OpenDatamatcorrsPlot'))
OpenDatamatcorrsPlot;
elseif (strcmp(action,'OpenScoresPlot'))
bfm_plot_scores_ui(varargin{1});
elseif (strcmp(action,'OpenDesignPlot'))
OpenDesignPlot;
elseif (strcmp(action,'OpenBrainScoresPlot'))
OpenBrainScoresPlot;
elseif (strcmp(action,'OpenBrainCorrelationPlot'))
OpenBrainCorrelationPlot;
elseif (strcmp(action,'OpenEigenPlot'))
OpenEigenPlot;
elseif (strcmp(action,'OpenContrastWindow'))
OpenContrastWindow;
elseif (strcmp(action,'SetClusterReportOptions'))
SetClusterReportOptions;
elseif (strcmp(action,'LoadClusterReport'))
cluster_hdl = getappdata(gcbf,'cluster_hdl');
if ~isempty(cluster_hdl)
msg = 'Please close any opening cluster report window';
set(findobj(gcf,'Tag','MessageLine'),'String',msg);
return;
end;
[tmp cluster_hdl] = fmri_cluster_report('LoadClusterReport',gcbf);
if ishandle(cluster_hdl)
link_info.hdl = gcbf;
link_info.name = 'cluster_hdl';
setappdata(cluster_hdl,'LinkFigureInfo',link_info);
setappdata(gcbf,'cluster_hdl',cluster_hdl);
end
elseif (strcmp(action,'OpenClusterReport'))
OpenClusterReport;
elseif (strcmp(action,'LoadBackgroundImage'))
LoadBackgroundImage;
elseif (strcmp(action,'SaveBackgroundImage'))
SaveBackgroundImage;
elseif (strcmp(action,'LoadResultFile'))
LoadResultFile;
elseif (strcmp(action,'SaveResultToIMG'))
SaveResultToIMG(0);
elseif (strcmp(action,'SaveDisplayToIMG'))
SaveResultToIMG(1);
elseif (strcmp(action,'MultipleVoxel'))
MultipleVoxel;
elseif (strcmp(action,'PlotSagittalView'))
PLSresultFile = get(findobj(gcf,'Tag','ResultFile'),'UserData');
DeleteLinkedFigure;
fmri_result_sa_ui({PLSresultFile,1})
elseif (strcmp(action,'PlotCoronalView'))
PLSresultFile = get(findobj(gcf,'Tag','ResultFile'),'UserData');
DeleteLinkedFigure;
fmri_result_sa_ui({PLSresultFile,0})
elseif (strcmp(action,'Plot3View'))
PLSresultFile = get(findobj(gcf,'Tag','ResultFile'),'UserData');
DeleteLinkedFigure;
fmri_result_3v_ui({PLSresultFile})
elseif (strcmp(action,'EditXYZ'))
EditXYZ;
elseif (strcmp(action,'EditXYZmm'))
EditXYZmm;
elseif (strcmp(action,'XYZmmLabel'))
XYZmmLabel;
elseif (strcmp(action,'RescaleBnPress'))
RescaleBnPress;
ShowResult(0,1);
EditXYZ;
end;
return;
%---------------------------------------------------------------------------
%
function h0 = init(PLSResultFile);
setting1 = [];
warning off;
load(PLSResultFile, 'setting1');
setting = setting1;
warning on;
save_display_status = 'off';
try
load('pls_profile');
catch
end
if strcmpi(save_display_status, 'off')
setting = [];
end
save_setting_status = 'on';
fmri_result_pos = [];
try
load('pls_profile');
catch
end
if ~isempty(fmri_result_pos) & strcmp(save_setting_status,'on')
pos = fmri_result_pos;
else
fig_w = 0.85;
fig_h = 0.8;
fig_x = (1 - fig_w)/2;
fig_y = (1 - fig_h)/2;
pos = [fig_x fig_y fig_w fig_h];
end
[r_path,r_file,r_ext] = fileparts(PLSResultFile);
h0 = figure('Units','normal', ...
'Color',[0.8 0.8 0.8], ...
'Name','fMRI BLV Plot', ...
'NumberTitle','off', ...
'DoubleBuffer','on', ...
'MenuBar','none',...
'Position',pos, ...
'DeleteFcn','fmri_result_ui(''DeleteFigure'')', ...
'Tag','PlotBrainLV');
%
x = .37;
y = .1;
w = .5;
h = .85;
pos = [x y w h];
axes_h = axes('Parent',h0, ... % axes
'Units','normal', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[1 1 1], ...
'Position',pos, ...
'XTick', [], ...
'YTick', [], ...
'Tag','BlvAxes');
x = x+w+.02;
w = .04;
pos = [x y w h];
colorbar_h = axes('Parent',h0, ... % c axes
'Units','normal', ...
'Position',pos, ...
'XTick', [], ...
'YTick', [], ...
'Tag','Colorbar');
%
x = .03;
y = .91;
w = .09;
h = .04;
pos = [x y w h];
fnt = 0.6;
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',pos, ...
'String','Result File:', ...
'Style','text', ...
'Tag','ResultFileLabel');
x = x+w;
w = .22;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',pos, ...
'String',r_file, ...
'Style','text', ...
'UserData', PLSResultFile, ...
'Tag','ResultFile');
x = .05;
y = y-h-.03;
w = .08;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',pos, ...
'String','LV Index:', ...
'Style','text', ...
'Tag','LVIndexLabel');
x = x+w;
y = y+.01;
w = .05;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[1 1 1], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'ListboxTop',0, ...
'Position',pos, ...
'Style','edit', ...
'Callback','fmri_result_ui(''EditLV'')', ...
'Tag','LVIndexEdit');
x = x+w;
y = y-.01;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ... % lv number label
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'ListboxTop',0, ...
'Position',pos, ...
'String','of', ...
'Style','text', ...
'Tag','LVNumberLabel');
x = x+w;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ... % lv number text
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',pos, ...
'Style','text', ...
'Tag','LVNumberEdit');
% Slice Selection
x = .03;
y = .63;
w = .26;
h = .19;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',pos, ...
'Style','frame', ...
'Tag','SliceFrame');
x = .05;
y = .75;
w = .12;
h = .04;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',pos, ...
'String','First Slice:', ...
'Style','text', ...
'Tag','FirstSliceLabel');
x = x+w;
y = y+.01;
w = .1;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[1 1 1], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'ListboxTop',0, ...
'Position',pos, ...
'Style','edit', ...
'Tag','FirstSlice');
% 'Callback','fmri_result_ui(''EditFirstSlice'')', ...
x = .05;
y = y-h-.02;
w = .12;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',pos, ...
'String','Step:', ...
'Style','text', ...
'Tag','StepLabel');
x = x+w;
y = y+.01;
w = .1;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[1 1 1], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'ListboxTop',0, ...
'Position',pos, ...
'Style','edit', ...
'Tag','SliceStep');
% 'Callback','fmri_result_ui(''EditStep'')', ...
x = .05;
y = y-h-.02;
w = .12;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',pos, ...
'String','Last Slice:', ...
'Style','text', ...
'Tag','LastSliceLabel');
x = x+w;
y = y+.01;
w = .1;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[1 1 1], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'ListboxTop',0, ...
'Position',pos, ...
'Style','edit', ...
'Tag','LastSlice');
% 'Callback','fmri_result_ui(''EditLastSlice'')', ...
% Brain LV
x = .03;
y = .3;
w = .26;
h = .3;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',pos, ...
'Style','frame', ...
'Tag','ThresholdFrame');
x = .11;
y = .57;
w = .09;
h = .04;
pos = [x y w h];
h1 = uicontrol('Parent',h0, ...
'Units','normal', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'fontunit','normal', ...
'FontSize',fnt, ...
'HorizontalAlignment','center', ...
'ListboxTop',0, ...
'Position',pos, ...
'String','Brain LV', ...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -