Home > vbmeg > functions > tool_box > dynamics_movie > movie > disp_brain_model_make.m

disp_brain_model_make

PURPOSE ^

Create data_area_file

SYNOPSIS ^

function disp_brain_model_make(vmni_connect_file, brain_file, area_file, data_area_file)

DESCRIPTION ^

 Create data_area_file
 [Input]
    vmni_connect_file : [input file]  Vmni_connect.mat       : Fiber tracking file.
           brain_file : [input file]  VBMEG BRAIN-MAT file   : Subject.brain.mat
            area_file : [input file]  VBMEG AREA-MAT file    : Subject.area.mat

       data_area_file : [output file] data_area_file

 [See]
    make_conn_data.m : To make Vmni_connect.mat file.

 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 disp_brain_model_make(vmni_connect_file, brain_file, area_file, data_area_file)
0002 % Create data_area_file
0003 % [Input]
0004 %    vmni_connect_file : [input file]  Vmni_connect.mat       : Fiber tracking file.
0005 %           brain_file : [input file]  VBMEG BRAIN-MAT file   : Subject.brain.mat
0006 %            area_file : [input file]  VBMEG AREA-MAT file    : Subject.area.mat
0007 %
0008 %       data_area_file : [output file] data_area_file
0009 %
0010 % [See]
0011 %    make_conn_data.m : To make Vmni_connect.mat file.
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
0015 
0016 if nargin ~= 4
0017     error('Please check function usage.');
0018 end
0019 %
0020 % --- Previous check
0021 %
0022 if exist(vmni_connect_file, 'file') ~= 2
0023     error('vmni_connect_file not found.');
0024 end
0025 if exist(brain_file, 'file') ~= 2
0026     error('brain_file not found.');
0027 end
0028 if exist(area_file, 'file') ~= 2
0029     error('area_file not found.');
0030 end
0031 
0032 %
0033 % --- Main Procedure
0034 %
0035 out_dir   = fileparts(data_area_file);
0036 
0037 atlas_dir = [fileparts(which('ch2.img')), filesep];
0038 
0039 % Connection pair index file
0040 conn_file = vmni_connect_file;
0041 
0042 brainfile = brain_file;
0043 areafile  = area_file;
0044 
0045 % output directory creation
0046 if exist(out_dir, 'dir') ~= 7
0047     mkdir(out_dir);
0048 end
0049 
0050 %------- File parameter
0051 %--- atras file
0052 parm.atlas_text = [atlas_dir 'aal.txt'];
0053 parm.atlas_file = [atlas_dir 'aal.img'];
0054 parm.atlasimage = [atlas_dir 'ch2.img'];
0055 parm.atlasbrain = which('ch2_pial.brain.mat');
0056 
0057 % Brain file
0058 parm.brainfile = brainfile;
0059 parm.areafile  = areafile;
0060 parm.conn_file = conn_file;
0061 
0062 %--- Minimum vertex number for area selection
0063 parm.Nmin = 10;
0064 %--- If keyfile is specified, ROI area is loaded from keyfile
0065 parm.keyfile = [];
0066 %parm.keyfile = 'key_list2.txt';
0067 %parm.keyfile = 'key_list.txt';
0068 
0069 %--- output file
0070 parm.data_area = data_area_file;
0071 
0072 %--- morphology radius for brain surface smoothing
0073 parm.RadiusA = [-3 3];  % for ROI area
0074 parm.RadiusB = [+3];  % for brain
0075 
0076 %--- brain surface data
0077 % Data_area.V0 : Vertices on MNI coordinate
0078 % Data_area.F0 : Faces
0079 % Data_area.FL : Faces(Left brain)
0080 % Data_area.FR : Faces(Right brain)
0081 %--- area key to display
0082 % Data_area.key  : area name list       {cell array}
0083 % Data_area.cmap : color list for areas [n x 3]
0084 %--- surfaces for area key to display
0085 % Data_area.V  : areas vertices         {cell array}
0086 % Data_area.F  : areas Faces            {cell array}
0087 
0088 Data_area = make_area_surf(parm);
0089 
0090 fprintf('make_area_surf done\n\n')
0091 
0092 if isfield(parm,'data_area') && ~isempty(parm.data_area)
0093     save(parm.data_area,'Data_area')
0094 end

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