Home > functions > job > vb_job_fmri.m

vb_job_fmri

PURPOSE ^

Incorporate SPM voxel file (.spm.mat).

SYNOPSIS ^

function vb_job_fmri(proj_root, fmri_parm)

DESCRIPTION ^

 Incorporate SPM voxel file (.spm.mat). 
 (VBMEG public function)

 This function incoporates SPM voxel file, which include position
 and t-value for voxels at which its activity is statistically
 significant. Coordinate system of voxel is assumed to be VBMEG
 coordinate system (direction: RAS, origin: center of structural MRI
 volume). Voxel values are mapped onto the cortical surface model. 

 [syntax]
 vb_job_fmri(proj_root, fmri_parm)

 [input]
 proj_root: <<string>> VBMEG project root directory. 
 fmri_parm: <<struct>> Parameters for fmri incorporation. 
 --- fields of fmri_parm
  brain_file  : <<string>> Cortical surface model file (.brain.mat).
  act_file    : <<string>> Cortical activity map file (.act.mat).
  area_file   : <<string>> Cortical area file (.area.mat).
  spm_file    : <<string>> SPM voxel file (.spm.mat). 
  fmri_id     : <<string>> Identifier of activity map. 
  area_id     : <<string>> Identifier of cortical area. 
  comment     : <<string>> Any comment. 
  SPM_Radius  : <<float>> A parameter of mapping algorithm. 
  SPM_zstep   : <<float>> A parameter of mapping algorithm. 
  Gauss_radius: <<float>> A parameter of mapping algorithm. 
  Gauss_max   : <<float>> A parameter of mapping algorithm. 
 ---

 [output]
 Activity map on the cortical surface is registered to cortical activity 
 map file (.area.mat). In addition, Area on the cortical surface of SPM
 voxel data is registered to cortical area file (.area.mat). 

 [note]
 Important for VBMEG0.8 or older users: In old versions of VBMEG,
 coordinate system of SPM voxel file was LAS. Although SPM voxel file
 created by vb_job_convert_spm.m with old versions is supported, it is
 strongly recommended that you re-create SPM voxel file by the latest
 version of VBMEG. 

 [history]
 2010-06-03 Taku Yoshioka
  Minor change (verbose level support)

 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 vb_job_fmri(proj_root, fmri_parm)
0002 % Incorporate SPM voxel file (.spm.mat).
0003 % (VBMEG public function)
0004 %
0005 % This function incoporates SPM voxel file, which include position
0006 % and t-value for voxels at which its activity is statistically
0007 % significant. Coordinate system of voxel is assumed to be VBMEG
0008 % coordinate system (direction: RAS, origin: center of structural MRI
0009 % volume). Voxel values are mapped onto the cortical surface model.
0010 %
0011 % [syntax]
0012 % vb_job_fmri(proj_root, fmri_parm)
0013 %
0014 % [input]
0015 % proj_root: <<string>> VBMEG project root directory.
0016 % fmri_parm: <<struct>> Parameters for fmri incorporation.
0017 % --- fields of fmri_parm
0018 %  brain_file  : <<string>> Cortical surface model file (.brain.mat).
0019 %  act_file    : <<string>> Cortical activity map file (.act.mat).
0020 %  area_file   : <<string>> Cortical area file (.area.mat).
0021 %  spm_file    : <<string>> SPM voxel file (.spm.mat).
0022 %  fmri_id     : <<string>> Identifier of activity map.
0023 %  area_id     : <<string>> Identifier of cortical area.
0024 %  comment     : <<string>> Any comment.
0025 %  SPM_Radius  : <<float>> A parameter of mapping algorithm.
0026 %  SPM_zstep   : <<float>> A parameter of mapping algorithm.
0027 %  Gauss_radius: <<float>> A parameter of mapping algorithm.
0028 %  Gauss_max   : <<float>> A parameter of mapping algorithm.
0029 % ---
0030 %
0031 % [output]
0032 % Activity map on the cortical surface is registered to cortical activity
0033 % map file (.area.mat). In addition, Area on the cortical surface of SPM
0034 % voxel data is registered to cortical area file (.area.mat).
0035 %
0036 % [note]
0037 % Important for VBMEG0.8 or older users: In old versions of VBMEG,
0038 % coordinate system of SPM voxel file was LAS. Although SPM voxel file
0039 % created by vb_job_convert_spm.m with old versions is supported, it is
0040 % strongly recommended that you re-create SPM voxel file by the latest
0041 % version of VBMEG.
0042 %
0043 % [history]
0044 % 2010-06-03 Taku Yoshioka
0045 %  Minor change (verbose level support)
0046 %
0047 % Copyright (C) 2011, ATR All Rights Reserved.
0048 % License : New BSD License(see VBMEG_LICENSE.txt)
0049 
0050 proj_root = vb_rm_trailing_slash(proj_root);
0051 
0052 %
0053 % Verbose level
0054 %
0055 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0056 global vbmeg_inst;
0057 const = vb_define_verbose;
0058 if isfield(vbmeg_inst,'verbose_level'), 
0059   verbose_level = vbmeg_inst.verbose_level;
0060 else
0061   verbose_level = const.VERBOSE_LEVEL_NOTICE;
0062 end
0063 
0064 %
0065 % Do not modify following lines
0066 %
0067 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0068 %
0069 % make fMRI data
0070 % brain_parm.act_file   : fMRI activity file
0071 
0072 act_file = [proj_root '/' fmri_parm.act_file  ];
0073 area_file = [proj_root '/' fmri_parm.area_file  ];
0074 
0075 [fMRINew, AreaNew, SPM]  = vb_make_fmri_data(proj_root, fmri_parm);
0076 
0077 vb_add_act([act_file],fMRINew);
0078 vb_add_area([area_file],AreaNew);
0079 
0080 % Check fMRI activity
0081 if verbose_level>=const.VERBOSE_LEVEL_NOTICE, 
0082   vb_check_fmri(proj_root,fmri_parm);
0083 end
0084 
0085 % Check voxel mapping
0086 %load([proj_root filesep fmri_parm.brain_file],'V');
0087 %XYZmm = SPM.XYZmm*1e-3;
0088 %figure;
0089 %title_str = {'Top view','Back view','Left view','Right view'};
0090 %v = [0 90; 0 0; -90 0; 90 0];
0091 %for i=1:4
0092 %  subplot(2,2,i);
0093 %  plot3(V(:,1),V(:,2),V(:,3),'r.'); hold on;
0094 %  plot3(XYZmm(1,:),XYZmm(2,:),XYZmm(3,:),'b.');
0095 %  view(v(i,:));
0096 %  title(title_str{i});
0097 %  axis equal;
0098 %end
0099 
0100 % project_file save
0101 proj_file = get_project_filename;
0102 if isempty(proj_file)
0103     return;
0104 end
0105 
0106 project_file_mgr('load', proj_file);
0107 project_file_mgr('add', 'fmri_parm', fmri_parm);

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