Home > functions > common > container > vb_get_act.m

vb_get_act

PURPOSE ^

This function is used to get cortical activity data.

SYNOPSIS ^

function act = vb_get_act(actfile,key)

DESCRIPTION ^

 This function is used to get cortical activity data. 

 --- Syntax
 act = vb_get_act(actfile,key)

 --- Input
 actfile: Cortical activity file (.act.mat)
 key    : ID of cortical activity data. 

 --- Optional Input

 --- Output
 act.xxP    : Activities for this cortical activity data. 
 act.key    : ID of this data. 
 act.comment: Comment on this data.

 --- Comment
 Activities are treated as nondimensional values, regard less of the
 source of the data (e.g., SPM t-value). The meaning of each of activity
 data should be managed by the user. 

 --- Example
 >> actfile = './TY/data/TY.act.mat';
 >> key = 'Uniform';
 >> act = vb_get_act(actfile,key);

 --- History
 2004-11-09 Taku Yoshioka
 2006-8-23 M. Sato  If area is not found, [] is returned

 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 act = vb_get_act(actfile,key)
0002 % This function is used to get cortical activity data.
0003 %
0004 % --- Syntax
0005 % act = vb_get_act(actfile,key)
0006 %
0007 % --- Input
0008 % actfile: Cortical activity file (.act.mat)
0009 % key    : ID of cortical activity data.
0010 %
0011 % --- Optional Input
0012 %
0013 % --- Output
0014 % act.xxP    : Activities for this cortical activity data.
0015 % act.key    : ID of this data.
0016 % act.comment: Comment on this data.
0017 %
0018 % --- Comment
0019 % Activities are treated as nondimensional values, regard less of the
0020 % source of the data (e.g., SPM t-value). The meaning of each of activity
0021 % data should be managed by the user.
0022 %
0023 % --- Example
0024 % >> actfile = './TY/data/TY.act.mat';
0025 % >> key = 'Uniform';
0026 % >> act = vb_get_act(actfile,key);
0027 %
0028 % --- History
0029 % 2004-11-09 Taku Yoshioka
0030 % 2006-8-23 M. Sato  If area is not found, [] is returned
0031 %
0032 % Copyright (C) 2011, ATR All Rights Reserved.
0033 % License : New BSD License(see VBMEG_LICENSE.txt)
0034 
0035 if exist(actfile) ~= 2
0036   error(['Activity map file is not found.']);
0037 else
0038   load(actfile,'Act');
0039 end
0040 
0041 for i = 1:length(Act)
0042   if strcmp(Act{i}.key,key)
0043     act = Act{i}; 
0044     return;
0045   end
0046 end
0047 
0048 Area_ = [];
0049 
0050 disp(['Activity map ' key ' is not found.']);
0051 
0052 return
0053 
0054

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