Home > functions > job > job_edit_act_dir > job_edit_act_print_spatialpattern.m

job_edit_act_print_spatialpattern

PURPOSE ^

Print screen

SYNOPSIS ^

function job_edit_act_print_spatialpattern(inst_id)

DESCRIPTION ^

 Print screen

 --- Syntax
 job_edit_act_print_spatialpattern(inst_id)

 --- History
 2009-05-22 Taku Yoshioka

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function job_edit_act_print_spatialpattern(inst_id)
0002 % Print screen
0003 %
0004 % --- Syntax
0005 % job_edit_act_print_spatialpattern(inst_id)
0006 %
0007 % --- History
0008 % 2009-05-22 Taku Yoshioka
0009 %
0010 % Copyright (C) 2011, ATR All Rights Reserved.
0011 % License : New BSD License(see VBMEG_LICENSE.txt)
0012 
0013 global vbmeg_inst; 
0014 if isempty(vbmeg_inst.editact{inst_id}.V), return; end
0015 if isempty(vbmeg_inst.editact{inst_id}.xxP), return; end
0016 
0017 %
0018 % Global variables
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 h_fig = vbmeg_inst.editact{inst_id}.h_fig; 
0022 h_space = vbmeg_inst.editact{inst_id}.h_space;
0023 h_cbar = vbmeg_inst.editact{inst_id}.h_cbar;
0024 V = vbmeg_inst.editact{inst_id}.V;
0025 F = vbmeg_inst.editact{inst_id}.F;
0026 plot_parm = vbmeg_inst.editact{inst_id}.plot_parm;
0027 ix = vbmeg_inst.editact{inst_id}.ix;
0028 ed4 = vbmeg_inst.editact{inst_id}.ed4;
0029 ed6 = vbmeg_inst.editact{inst_id}.ed6;
0030 cb1 = vbmeg_inst.editact{inst_id}.cb1;
0031 cb2 = vbmeg_inst.editact{inst_id}.cb2;
0032 Vtal = vbmeg_inst.editact{inst_id}.Vtal;
0033 model_type_fold_rb = vbmeg_inst.editact{inst_id}.model_type_fold_rb;
0034 model_type_inflate_rb = ...
0035     vbmeg_inst.editact{inst_id}.model_type_inflate_rb;
0036 xxP = vbmeg_inst.editact{inst_id}.xxP;
0037 if ~isempty(xxP), xxP = xxP{1}; end
0038 
0039 %
0040 % Preparation for cortical surface plot
0041 %
0042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0043 % Original/Inflated model
0044 if get(model_type_fold_rb,'Value')==1,  
0045   V = vbmeg_inst.editact{inst_id}.V;
0046   inf_C = [];
0047 else
0048   V = vbmeg_inst.editact{inst_id}.Vinf;
0049   inf_C = vbmeg_inst.editact{inst_id}.inf_C;
0050 end
0051 
0052 % Get display parameters
0053 LRflag = [];
0054 if get(cb1,'Value')==get(cb1,'Max'), LRflag = 'L'; end
0055 if get(cb2,'Value')==get(cb2,'Max'), LRflag = [LRflag 'R']; end;
0056 plot_parm.LRflag = LRflag;
0057 
0058 if isempty(xxP), isact = 0; else isact = 1; end
0059 plot_parm.isact = isact;
0060 [az,el] = view;
0061 
0062 %
0063 % Plot brain activities superimposed on the cortical surface model
0064 %
0065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0066 h_fig = figure;
0067 job_edit_act_plotbrain(plot_parm,V,F,inf_C,xxP,min(xxP),max(xxP));
0068 axis off;
0069 axis tight;
0070 axis equal;
0071 set(h_space,'Box','on','XTick',[],'YTick',[],'ZTick',[]);
0072 v = str2num(get(ed6,'String'));
0073 if size(v)~=2, return; end;
0074 if v(1)>=v(2), return; end;
0075 caxis(gca,v);
0076 %colorbar;
0077 view([az,el]);
0078 
0079 %
0080 % Print figure
0081 %
0082 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0083 vb_epsfig(gcf,plot_parm.print_ratio,plot_parm.print_size);
0084 
0085 [fig_dir,fig_file] = vb_file_select({'.eps'},'Save figure',true);
0086 
0087 if ~isempty(fig_file), 
0088   figfile = [fig_dir filesep fig_file{1}];
0089   print(h_fig,'-depsc',figfile);
0090 end
0091 
0092 delete(h_fig);

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005