Home > functions > gui > bm_editor > bm_fileio > bm_fileio_read_face_file.m

bm_fileio_read_face_file

PURPOSE ^

read brain file.

SYNOPSIS ^

function [V_cell, F_cell, xx_cell, model_name_cell, conduct_cell] =bm_fileio_read_face_file(file_name)

DESCRIPTION ^

 read brain file.
 [USAGE]
    [V_cell, F_cell, xx_cell, model_name_cell, conduct_cell] ...
             = bm_fileio_read_face_file(<file_name>);
 [IN]
    file_name : full path brain file(.brain.mat)
 [OUT]
             V_cell : cell array of vertex
             F_cell : cell array of face
            xx_cell : cell array of normal vector
    model_name_cell : cell array of model name
       conduct_cell : cell array of conductivity

 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 [V_cell, F_cell, xx_cell, model_name_cell, conduct_cell] = ...
0002                 bm_fileio_read_face_file(file_name)
0003 % read brain file.
0004 % [USAGE]
0005 %    [V_cell, F_cell, xx_cell, model_name_cell, conduct_cell] ...
0006 %             = bm_fileio_read_face_file(<file_name>);
0007 % [IN]
0008 %    file_name : full path brain file(.brain.mat)
0009 % [OUT]
0010 %             V_cell : cell array of vertex
0011 %             F_cell : cell array of face
0012 %            xx_cell : cell array of normal vector
0013 %    model_name_cell : cell array of model name
0014 %       conduct_cell : cell array of conductivity
0015 %
0016 % Copyright (C) 2011, ATR All Rights Reserved.
0017 % License : New BSD License(see VBMEG_LICENSE.txt)
0018 
0019 %
0020 % --- Previous check
0021 %
0022 if ~exist('file_name', 'var')
0023     error('file_name is a required parameter.');
0024 end
0025 if exist(file_name, 'file') ~= 2
0026     error(['specified brain file does not exist : ' file_name]);
0027 end
0028 
0029 %
0030 % --- Main Procedure
0031 %
0032 const = define_bm_edit_app;
0033 
0034 load(file_name, 'surf_face');
0035 
0036 [F, V] = reducepatch(surf_face.F, surf_face.V, 10000);
0037 V_cell{1}  = V;
0038 [xx_cell{1} ,F_cell{1}] = vb_out_normal_vect(V,F);
0039 conduct_cell{1} = const.DEFAULT_CONDUCTIVITY;
0040 
0041 model_name_cell{1} = 'Face';

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