Home > functions > job > job_plot_currentmap_dir > job_plot_cmap_register_area.m

job_plot_cmap_register_area

PURPOSE ^

Store selected area into cortical area file

SYNOPSIS ^

function job_plot_cmap_register_area(inst_id)

DESCRIPTION ^

 Store selected area into cortical area file
 
 --- Syntax
 function job_plot_cmap_register_area(inst_id)

 --- History
 2008-09-29 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_plot_cmap_register_area(inst_id)
0002 % Store selected area into cortical area file
0003 %
0004 % --- Syntax
0005 % function job_plot_cmap_register_area(inst_id)
0006 %
0007 % --- History
0008 % 2008-09-29 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.plotcmap{inst_id}.V), return; end
0015 if isempty(vbmeg_inst.plotcmap{inst_id}.Jact), return; end
0016 
0017 %
0018 % Global variables
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 ix_peak = vbmeg_inst.plotcmap{inst_id}.ix_peak;
0022 ed5 = vbmeg_inst.plotcmap{inst_id}.ed5;
0023 nextDD = vbmeg_inst.plotcmap{inst_id}.nextDD;
0024 nextIX = vbmeg_inst.plotcmap{inst_id}.nextIX;
0025 
0026 %
0027 % Store cortical area
0028 %
0029 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0030 R = str2num(get(ed5,'String'))*1e-3;
0031 ix_area = find(nextDD{ix_peak}<=R);
0032 ix_area = nextIX{ix_peak}(ix_area);
0033 
0034 [brain_dir,brain_file] ...
0035     = vb_file_select({'.area.mat'},'Select area file');
0036 
0037 if ~isempty(brain_file),
0038   areafile = [brain_dir filesep brain_file{1}];
0039 
0040   prompt  = {'Enter arbitrary string as ID of area'};
0041   title   = 'Area registration';
0042   lines= 1;
0043   def     = {'new area'};
0044   str = inputdlg(prompt,title,lines,def);
0045   
0046   if isempty(str),
0047     return;
0048   elseif ~isempty(str{1}), 
0049     area_new.key = str{1};
0050     area_new.Iextract = ix_area;
0051   
0052     vb_add_area(areafile,area_new);
0053   end
0054 end
0055 
0056 return;

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