Get information of basis (leadfileld) [Norient, normal_mode] = vb_load_basis_info(basisfile); [Norient, normal_mode, bem_mode] = vb_load_basis_info(basisfile); --- Input basisfile : leadfileld basis file name --- Output Norient : number of independent current orientation normal_mode : normal average mode basis_parm : leadfield calculation parameters changed 2007-2-25 M. Sato Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [Norient, normal_mode, basis_parm] = vb_load_basis_info(basisfile); 0002 % Get information of basis (leadfileld) 0003 % [Norient, normal_mode] = vb_load_basis_info(basisfile); 0004 % [Norient, normal_mode, bem_mode] = vb_load_basis_info(basisfile); 0005 % --- Input 0006 % basisfile : leadfileld basis file name 0007 % --- Output 0008 % Norient : number of independent current orientation 0009 % normal_mode : normal average mode 0010 % basis_parm : leadfield calculation parameters 0011 % 0012 % changed 2007-2-25 M. Sato 0013 % 0014 % Copyright (C) 2011, ATR All Rights Reserved. 0015 % License : New BSD License(see VBMEG_LICENSE.txt) 0016 0017 load(basisfile,'basis_parm'); 0018 0019 global vbmeg_inst; 0020 const = vbmeg_inst.const; 0021 0022 if exist('basis_parm','var') 0023 % ver.0.30 0024 Norient = basis_parm.Basis_mode; 0025 0026 if isfield(basis_parm,'normal_mode') 0027 % ver.0.5 0028 normal_mode = basis_parm.normal_mode; 0029 else 0030 % up to ver.0.4 0031 normal_mode = const.NORMAL_ADJACENT_MEAN; % 隣接点の法線平均 0032 basis_parm.normal_mode = normal_mode; 0033 end 0034 else 0035 load(basisfile,'L*'); 0036 % ver.0.1 0037 if exist('Ldipole','var'), Norient = Ldipole; end; 0038 % ver.0.2 0039 if exist('L','var'), Norient = L; end; 0040 normal_mode = const.NORMAL_ADJACENT_MEAN; % 隣接点の法線平均 0041 0042 basis_parm.normal_mode = normal_mode; 0043 basis_parm.Basis_mode = Norient; 0044 end 0045 0046