Home > functions > device > acqdata > vb_posfile_load_mrikey.m

vb_posfile_load_mrikey

PURPOSE ^

read and return MRI KEY from POS-MAT file

SYNOPSIS ^

function mri_key = vb_posfile_load_mrikey(posfile)

DESCRIPTION ^

 read and return MRI KEY from POS-MAT file
 [usage]
   mri_key = vb_posfile_load_mrikey(posfile)
 [input]
   posfile : <required> <<file>> POS-MAT file
 [output]
   mri_key : MRI hash key
 [note]

 [history]
   2008-03-12 (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 mri_key = vb_posfile_load_mrikey(posfile)
0002 % read and return MRI KEY from POS-MAT file
0003 % [usage]
0004 %   mri_key = vb_posfile_load_mrikey(posfile)
0005 % [input]
0006 %   posfile : <required> <<file>> POS-MAT file
0007 % [output]
0008 %   mri_key : MRI hash key
0009 % [note]
0010 %
0011 % [history]
0012 %   2008-03-12 (Sako) initial version
0013 %
0014 % Copyright (C) 2011, ATR All Rights Reserved.
0015 % License : New BSD License(see VBMEG_LICENSE.txt)
0016 
0017 % --- CHECK ARGUMENTS --- %
0018 if ~exist('posfile', 'var'), posfile = ''; end
0019 [posfile] = inner_check_arguments(posfile);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 mri_key = '';
0024 load(posfile, 'mri_key');
0025 return;
0026 %
0027 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0028 
0029 % --- INNER FUNCTIONS -------------------------------------------------------- %
0030 %
0031 function [posfile] = inner_check_arguments(posfile)
0032 func_ = mfilename;
0033 if isempty(posfile)
0034   error('(%s)posfile is a required parameter', func_);
0035 end
0036 
0037 if exist(posfile, 'file') ~= 2
0038   error('(%s)cannot find posfile: %s', func_, posfile);
0039 end
0040 return;
0041 %
0042 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0043 
0044 % --- END OF FILE --- %

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