SPM批量将功能项配准到结构像和MNI

petmni.m

global sub filelist

pathname='C:\Users\86191\Desktop\AD数据整理';
filelist=dir(pathname);
filelist=filelist(~ismember({filelist.name},{'.','..'}));

for i=1:length(filelist)
    sub=filelist(i).name;


% List of open inputs
nrun = 1; % enter the number of runs here
jobfile = {'C:\Users\86191\Desktop\2.0ruijinprocess\petmni_job.m'};
jobs = repmat(jobfile, 1, nrun);
inputs = cell(0, nrun);
for crun = 1:nrun
end
spm('defaults', 'PET');
spm_jobman('run', jobs, inputs{:});

end


petmni_job.m

global sub
inputpath=['C:\Users\86191\Desktop\AD数据整理\',sub];

%load raw data
pathname1=[inputpath '/'];
name_t1=dir([pathname1,'*FDGcoT1.nii']);
imgfile_t1=[pathname1 name_t1.name];

name_FDG=dir([pathname1,'*_oFDG.nii']);
imgfile_FDG=[pathname1 name_FDG.name];


%-----------------------------------------------------------------------
% Job saved on 09-Nov-2020 22:10:48 by cfg_util (rev $Rev: 7345 $)
% spm SPM - SPM12 (7487)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
matlabbatch{1}.spm.spatial.normalise.estwrite.subj.vol = {imgfile_t1};
matlabbatch{1}.spm.spatial.normalise.estwrite.subj.resample = {imgfile_FDG};
matlabbatch{1}.spm.spatial.normalise.estwrite.eoptions.biasreg = 0.0001;
matlabbatch{1}.spm.spatial.normalise.estwrite.eoptions.biasfwhm = 60;
matlabbatch{1}.spm.spatial.normalise.estwrite.eoptions.tpm = {'C:\Program Files\MATLAB\R2018a\toolbox\spm12\tpm\TPM.nii'};
matlabbatch{1}.spm.spatial.normalise.estwrite.eoptions.affreg = 'eastern';
matlabbatch{1}.spm.spatial.normalise.estwrite.eoptions.reg = [0 0.001 0.5 0.05 0.2];
matlabbatch{1}.spm.spatial.normalise.estwrite.eoptions.fwhm = 0;
matlabbatch{1}.spm.spatial.normalise.estwrite.eoptions.samp = 3;
matlabbatch{1}.spm.spatial.normalise.estwrite.woptions.bb = [NaN NaN NaN
                                                             NaN NaN NaN];
matlabbatch{1}.spm.spatial.normalise.estwrite.woptions.vox = [2 2 2];
matlabbatch{1}.spm.spatial.normalise.estwrite.woptions.interp = 4;
matlabbatch{1}.spm.spatial.normalise.estwrite.woptions.prefix = 'w';



  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值