Home > functions > common > loadfunc > vb_is_inflate_cortex.m

vb_is_inflate_cortex

PURPOSE ^

Check inflate data is exist in brainfile

SYNOPSIS ^

function result = vb_is_inflate_cortex(brainfile)

DESCRIPTION ^

 Check inflate data is exist in brainfile
 -- Syntax
 result = vb_is_inflate_cortex(brainfile)

 -- Input 
 brainfile   : Brain file name
 --- Output
    result = SUCCESS;
    result = FAILURE;

 written by M. Sato  2006-9-12

 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 result = vb_is_inflate_cortex(brainfile)
0002 % Check inflate data is exist in brainfile
0003 % -- Syntax
0004 % result = vb_is_inflate_cortex(brainfile)
0005 %
0006 % -- Input
0007 % brainfile   : Brain file name
0008 % --- Output
0009 %    result = SUCCESS;
0010 %    result = FAILURE;
0011 %
0012 % written by M. Sato  2006-9-12
0013 %
0014 % Copyright (C) 2011, ATR All Rights Reserved.
0015 % License : New BSD License(see VBMEG_LICENSE.txt)
0016 
0017 load(brainfile,'V*');
0018 
0019 if ~isempty( findstr(brainfile, '.brain.mat') )
0020     brain_id = brainfile(1:findstr(brainfile, '.brain.mat')-1);
0021 else
0022     error(['Brain file name is not correct:' brainfile]);
0023 end
0024 
0025 if exist('Vinflate','var')
0026     result = SUCCESS;
0027 else
0028     % ver 0.2
0029     brainfile = [brain_id '.inflate.mat'];
0030     if exist(brainfile,'file')
0031         load(brainfile, 'V')
0032         if exist('V','var')
0033             result = SUCCESS;
0034         else
0035             result = FAILURE;
0036         end
0037     else
0038         result = FAILURE;
0039     end
0040 end

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