Home > vbmeg > functions > device > meg > vb_meginfo_get_meg2mri.m

vb_meginfo_get_meg2mri

PURPOSE ^

return matrix that is to be 'meg to mri'

SYNOPSIS ^

function [meg2mri] = vb_meginfo_get_meg2mri(meg_info)

DESCRIPTION ^

 return matrix that is to be 'meg to mri'
 [usage]
   [meg2mri] = vb_meginfo_get_meg2mri(meg_info)
 [input]
   meg_info : <required> <<struct>> MEGinfo which is expected to have
            :  matching_info
 [output]
    meg2mri : [4 x 4] ? matrix to transform
 [note]
    if you are YOKOGAWA user, the matching_info is loaded from YOKOGAWA file
    this function is made for only YOKOGAWA for now
 [history]
   2008-02-07 (Sako) initial version

 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:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [meg2mri] = vb_meginfo_get_meg2mri(meg_info)
0002 % return matrix that is to be 'meg to mri'
0003 % [usage]
0004 %   [meg2mri] = vb_meginfo_get_meg2mri(meg_info)
0005 % [input]
0006 %   meg_info : <required> <<struct>> MEGinfo which is expected to have
0007 %            :  matching_info
0008 % [output]
0009 %    meg2mri : [4 x 4] ? matrix to transform
0010 % [note]
0011 %    if you are YOKOGAWA user, the matching_info is loaded from YOKOGAWA file
0012 %    this function is made for only YOKOGAWA for now
0013 % [history]
0014 %   2008-02-07 (Sako) initial version
0015 %
0016 % Copyright (C) 2011, ATR All Rights Reserved.
0017 % License : New BSD License(see VBMEG_LICENSE.txt)
0018 
0019 % --- CHECK ARGUMENTS --- %
0020 if ~exist('meg_info', 'var'), meg_info = []; end
0021 [meg_info] = inner_check_arguments(meg_info);
0022 
0023 % --- MAIN PROCEDURE --------------------------------------------------------- %
0024 %
0025 if isfield(meg_info.matching_info, 'meg_to_mri')
0026   meg2mri = meg_info.matching_info.meg_to_mri;
0027 else
0028   meg2mri = [];
0029 end
0030 return;
0031 %
0032 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0033 
0034 
0035 % --- INNER FUNCTIONS -------------------------------------------------------- %
0036 %
0037 % --- inner_check_arguments()
0038 %
0039 function [meg_info] = inner_check_arguments(meg_info)
0040 func_ = mfilename;
0041 if isempty(meg_info)
0042   error('(%s)meg_info is a required parameter', func_);
0043 end
0044 
0045 if ~isfield(meg_info, 'matching_info')
0046   meg_info.matching_info = [];
0047 end
0048 return;
0049 %
0050 % --- end of inner_check_arguments()
0051 %
0052 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0053 
0054 %%% END OF FILE %%%
0055

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