-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprepro_reports.m
104 lines (92 loc) · 3.76 KB
/
prepro_reports.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
function [] = prepro_reports(mni, t1, t12mni, wm2mni, csf2mni, epi2mni)
% [] = prepro_reports(mni, t1, t1_brain, crt1, t12mni, epi2t1, epi2mni, epi_brain)
%
% This function generates a series of reports displaying pre-processing
% results for quality control.
%
% ------
% INPUTS
% ------
% NB: All inputs are strings
%
% mni - path and filename of template used to register to MNI space;
% e.g., '/usr/loca/spm8/templates/T1.nii'
%
% t1 - path and filename of t1
%
% t1_brain - path and filename of skull-stripped T1
%
% crt1 - path and filename of t1 co-registered to MNI
%
% t12mni - path and filename of t1 normalized to MNI template
%
% epi2mni - path and filename of epi spatially normalized to MNI
% template.
%
% -------
% OUTPUTS
% -------
%
% A .ps file containing the following results:
%
% Check reg: norm t1 vs MNI
% norm epi vs MNI
% norm wm mask vs norm epi
% norm csf mask vs norm epi
%
%
% =========================================================================
%-----------------------------------------------------------------------
% Job configuration created by cfg_util (rev $Rev: 3944 $)
%-----------------------------------------------------------------------
spm('defaults','fmri');
spm_jobman('initcfg')
matlabbatch{1}.spm.util.checkreg.data = {
[t12mni,',1']
[mni,',1']
};
matlabbatch{2}.spm.util.print.fname = 't1-mni_v_mni';
matlabbatch{2}.spm.util.print.fig.figname = 'Graphics';
matlabbatch{2}.spm.util.print.opts.opt = {
'-dpsc2'
'-append'
}';
matlabbatch{2}.spm.util.print.opts.append = true;
matlabbatch{2}.spm.util.print.opts.ext = '.ps';
matlabbatch{3}.spm.util.checkreg.data = {
[epi2mni,',1']
[mni,',1']
};
matlabbatch{4}.spm.util.print.fname = 'epi-mni_v_mni';
matlabbatch{4}.spm.util.print.fig.figname = 'Graphics';
matlabbatch{4}.spm.util.print.opts.opt = {
'-dpsc2'
'-append'
}';
matlabbatch{4}.spm.util.print.opts.append = true;
matlabbatch{4}.spm.util.print.opts.ext = '.ps';
matlabbatch{5}.spm.util.checkreg.data = {
[wm2mni,',1']
[epi2mni,',1']
};
matlabbatch{6}.spm.util.print.fname = 'wm-mni_v_epi-mni';
matlabbatch{6}.spm.util.print.fig.figname = 'Graphics';
matlabbatch{6}.spm.util.print.opts.opt = {
'-dpsc2'
'-append'
}';
matlabbatch{6}.spm.util.print.opts.append = true;
matlabbatch{6}.spm.util.print.opts.ext = '.ps';
matlabbatch{7}.spm.util.checkreg.data = {
[csf2mni,',1']
[epi2mni,',1']
};
matlabbatch{8}.spm.util.print.fname = 'csf-mni_v_epi-mni';
matlabbatch{8}.spm.util.print.fig.figname = 'Graphics';
matlabbatch{8}.spm.util.print.opts.opt = {
'-dpsc2'
'-append'
}';
matlabbatch{8}.spm.util.print.opts.append = true;
matlabbatch{8}.spm.util.print.opts.ext = '.ps';
spm_jobman('run',matlabbatch)