Home > vbmeg > functions > common > loadfunc > subdirectory > vb_load_normal_statics.m

vb_load_normal_statics

PURPOSE ^

load original BV brain normal information

SYNOPSIS ^

function normal_stat = vb_load_normal_statics(brainfile, coord_type)

DESCRIPTION ^

 load original BV brain normal information
  normal_stat = vb_load_normal_statics(brainfile[,coord_type])
 --- Input
    brainfile : VBMEG BRAIN-MAT file(.brain.mat)
   coord_type : = 'subj' : subject cortex normal is loaded. 
                = 'std'  : standard cortex normal is loaded.
 --- Output
   normal_stat.neighbor_org : original brain neighbor index list
   normal_stat.normal_org   : original brain normal vector

 M. Sato  2006-7-23

 [Note]
   BRAIN-MAT ver1: 'normal_stat' in root is individual subject normal_stat.
   BRAIN-MAT ver2: 'normal_stat' in root is standard brain normal_stat.
                   'subj.normal_stat' is individual subject normal_stat.

 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    normal_stat = vb_load_normal_statics(brainfile, coord_type)
0002 % load original BV brain normal information
0003 %  normal_stat = vb_load_normal_statics(brainfile[,coord_type])
0004 % --- Input
0005 %    brainfile : VBMEG BRAIN-MAT file(.brain.mat)
0006 %   coord_type : = 'subj' : subject cortex normal is loaded.
0007 %                = 'std'  : standard cortex normal is loaded.
0008 % --- Output
0009 %   normal_stat.neighbor_org : original brain neighbor index list
0010 %   normal_stat.normal_org   : original brain normal vector
0011 %
0012 % M. Sato  2006-7-23
0013 %
0014 % [Note]
0015 %   BRAIN-MAT ver1: 'normal_stat' in root is individual subject normal_stat.
0016 %   BRAIN-MAT ver2: 'normal_stat' in root is standard brain normal_stat.
0017 %                   'subj.normal_stat' is individual subject normal_stat.
0018 %
0019 % Copyright (C) 2011, ATR All Rights Reserved.
0020 % License : New BSD License(see VBMEG_LICENSE.txt)
0021 
0022 if ~exist('coord_type', 'var')
0023     coord_type = 'subj';
0024 end
0025 
0026 warning('off', 'MATLAB:load:variableNotFound');
0027 load(brainfile, 'subj');
0028 warning('on',  'MATLAB:load:variableNotFound');
0029 
0030 switch(lower(coord_type))
0031     case 'subj'
0032         if exist('subj', 'var')
0033             % V2 format
0034             normal_stat = subj.normal_stat;
0035         else
0036             % V1 format
0037             load(brainfile, 'normal_stat');
0038         end
0039     case 'std'
0040         if exist('subj', 'var')
0041             % V2 format
0042             load(brainfile, 'normal_stat');
0043         else
0044             % V1 format
0045             error('not contain standard normal info.');
0046         end
0047     otherwise
0048         error('Unknown coord type was specified : %s', coord_type);
0049 end
0050 
0051 if ~exist('normal_stat','var'), 
0052     error(['Their is no normal statics in ' brainfile]); 
0053 end;
0054

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005