Home > vbmeg > functions > fmri > vb_job_fmri_adv.m

vb_job_fmri_adv

PURPOSE ^

IMPORT FMRI RESULTS TO VBMEG ACT AND AREA FILES (ADVANCED MODE)

SYNOPSIS ^

function vb_job_fmri_adv(parm)

DESCRIPTION ^

 IMPORT FMRI RESULTS TO VBMEG ACT AND AREA FILES (ADVANCED MODE)

 * Assume all the SPM images are aligned to the corresponding subject
 T1-image using SPM. 
 * Advanced knowledge on percent signal changes is required.
 * SPMimginfo must be defined in parm with the following format.

 [Input]
 parm
   .brain_file : brain file
   .act_file   : act file 
   .area_file  : area file
   .Tthres     : T-value threshold  (unit : a.u.)
   .PSthres    : percent-signal threshold (unit : %)
   .Rthres     : radius threshold (unit : mm) 
 
 parm.SPMimginfo(nn) (one struct defines one image)
       .dirname : directory name for image file 
       .imgfilename :  file name of an image to be projected  
       .imglabel    :  label of image to be projected. This label is
       used as act_key and area_key.

 If you want to import PS maps, please specify con*.img to imgfilename and
 the following field;

       .baseimgfilename :  file name for the baseline image (constant regressor) 
       .ncon         :  the number of positive contrast for each CON image
       .peak         :  regressor peak value
 

 2016/07/26
 First 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 vb_job_fmri_adv(parm)
0002 % IMPORT FMRI RESULTS TO VBMEG ACT AND AREA FILES (ADVANCED MODE)
0003 %
0004 % * Assume all the SPM images are aligned to the corresponding subject
0005 % T1-image using SPM.
0006 % * Advanced knowledge on percent signal changes is required.
0007 % * SPMimginfo must be defined in parm with the following format.
0008 %
0009 % [Input]
0010 % parm
0011 %   .brain_file : brain file
0012 %   .act_file   : act file
0013 %   .area_file  : area file
0014 %   .Tthres     : T-value threshold  (unit : a.u.)
0015 %   .PSthres    : percent-signal threshold (unit : %)
0016 %   .Rthres     : radius threshold (unit : mm)
0017 %
0018 % parm.SPMimginfo(nn) (one struct defines one image)
0019 %       .dirname : directory name for image file
0020 %       .imgfilename :  file name of an image to be projected
0021 %       .imglabel    :  label of image to be projected. This label is
0022 %       used as act_key and area_key.
0023 %
0024 % If you want to import PS maps, please specify con*.img to imgfilename and
0025 % the following field;
0026 %
0027 %       .baseimgfilename :  file name for the baseline image (constant regressor)
0028 %       .ncon         :  the number of positive contrast for each CON image
0029 %       .peak         :  regressor peak value
0030 %
0031 %
0032 % 2016/07/26
0033 % First version
0034 %
0035 % Copyright (C) 2011, ATR All Rights Reserved.
0036 % License : New BSD License(see VBMEG_LICENSE.txt)
0037 
0038 if ~isfield(parm, 'SPMimginfo')
0039     help vb_job_fmri2_adv
0040     error('SPMimginfo must be defined !');
0041 end
0042 
0043 % PARAMETERS
0044 brain_file  = parm.brain_file;
0045 
0046 % Resutls output
0047 act_file    = parm.act_file;
0048 area_file   = parm.area_file;
0049 
0050 % function mode
0051 Tthres  = parm.Tthres;      % important parameters
0052 Rthres  = parm.Rthres;      % unit:mm
0053 PSthres = parm.PSthres;     % unit:%
0054 SPMimginfo = parm.SPMimginfo;
0055 
0056 % check SPMimginfo
0057 ck = check_SPMimginfo(SPMimginfo);
0058 
0059 if ck == 0, 
0060     error('SPMimginfo does not have enough information !');
0061 elseif ck == 1
0062     vb_fmri_project_Tmap_cortex(brain_file,act_file,area_file,Tthres,Rthres,SPMimginfo);
0063 elseif ck == 2
0064     vb_fmri_project_PSmap_cortex(brain_file,act_file,area_file,PSthres,Rthres,SPMimginfo);
0065 end
0066 
0067 
0068 %
0069 % inner function
0070 %
0071 
0072 function ck = check_SPMimginfo(SPMimginfo)
0073 
0074 ck = 0;
0075 
0076 for nn = 1 : length(SPMimginfo)
0077 
0078     
0079     if isfield(SPMimginfo(nn),'dirname') & isfield(SPMimginfo(nn),'imgfilename') &...
0080             isfield(SPMimginfo(nn),'imglabel') 
0081         ck = 1;
0082        
0083         if isfield(SPMimginfo(nn),'baseimgfilename') & isfield(SPMimginfo(nn),'ncon') &...
0084             isfield(SPMimginfo(nn),'peak') 
0085  
0086             ck = 2;
0087         end
0088     else 
0089         ck = 0;
0090     end
0091     
0092   
0093 end
0094 
0095

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