-
Notifications
You must be signed in to change notification settings - Fork 0
/
normalization.m
26 lines (19 loc) · 1.29 KB
/
normalization.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function normalization(subject_root_dir, anatomical_nii, mean_functional_nii, filePrefix)
% expects prefix rar
run1_images = get_session_data(subject_root_dir, filePrefix);
matlabbatch{1}.spm.spatial.normalise.estwrite.subj.vol = anatomical_nii ;
matlabbatch{1}.spm.spatial.normalise.estwrite.subj.resample = run1_images;
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 = {'G:\My Drive\Msc neuroscience\matlab packages\spm12\tpm\TPM.nii'};
matlabbatch{1}.spm.spatial.normalise.estwrite.eoptions.affreg = 'mni';
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 = [-78 -112 -70
78 76 85];
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';
spm_jobman('run' , matlabbatch);
matlabbatch = [];