Skip to content

Commit dfb7dbd

Browse files
authored
bump version, merge pull request #16 from AMYPAD/centiloid
2 parents 450d761 + 161f2f6 commit dfb7dbd

8 files changed

+236
-41
lines changed

spm12/coreg_spm_m.m renamed to spm12/amypad_coreg.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function [M, x] = coreg_spm_m(imref, imflo, costfun, sep, tol, fwhm, params, graphics, visual)
1+
function [M, x] = amypad_coreg(imref, imflo, costfun, sep, tol, fwhm, params, graphics, visual)
22
if visual>0
33
Fgraph = spm_figure('GetWin','Graphics');
44
Finter = spm_figure('GetWin','Interactive');

spm12/amypad_coreg_modify_affine.m

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function out = amypad_coreg_modify_affine(imflo, M)
2+
VF = strcat(imflo,',1');
3+
MM = zeros(4,4);
4+
MM(:,:) = spm_get_space(VF);
5+
spm_get_space(VF, M\MM(:,:));
6+
out = 0;
7+
end

spm12/amypad_normw.m

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function out = amypad_normw(def_file, flist4norm)
2+
job.subj.def = {def_file};
3+
job.subj.resample = flist4norm;
4+
job.woptions.bb = [NaN, NaN, NaN; NaN, NaN, NaN];
5+
job.woptions.vox = [2, 2, 2];
6+
job.woptions.interp = 4;
7+
job.woptions.prefix = 'w';
8+
spm_run_norm(job);
9+
out=0;
10+
end

spm12/resample_spm_m.m renamed to spm12/amypad_resample.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function out = resample_spm_m(imref, imflo, M, f_mask, f_mean, f_interp, f_which, f_prefix)
1+
function out = amypad_resample(imref, imflo, M, f_mask, f_mean, f_interp, f_which, f_prefix)
22
%-Reslicing parameters
33
rflags.mask = f_mask;
44
rflags.mean = f_mean;

spm12/amypad_seg.m

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
function [param,invdef,fordef] = amypad_seg(f_mri, spm_path, nat_gm, nat_wm, nat_csf, store_fwd, store_inv, visual)
2+
job.channel.vols = {strcat(f_mri,',1')};
3+
job.channel.biasreg = 0.001;
4+
job.channel.biasfwhm = 60;
5+
job.channel.write = [0, 0];
6+
job.tissue(1).tpm = {[spm_path, filesep, 'tpm', filesep, 'TPM.nii,1']};
7+
job.tissue(1).ngaus = 1;
8+
job.tissue(1).native = [nat_gm, 0];
9+
job.tissue(1).warped = [0, 0];
10+
job.tissue(2).tpm = {[spm_path, filesep, 'tpm', filesep, 'TPM.nii,2']};
11+
job.tissue(2).ngaus = 1;
12+
job.tissue(2).native = [nat_wm, 0];
13+
job.tissue(2).warped = [0, 0];
14+
job.tissue(3).tpm = {[spm_path, filesep, 'tpm', filesep, 'TPM.nii,3']};
15+
job.tissue(3).ngaus = 2;
16+
job.tissue(3).native = [nat_csf, 0];
17+
job.tissue(3).warped = [0, 0];
18+
job.tissue(4).tpm = {[spm_path, filesep, 'tpm', filesep, 'TPM.nii,4']};
19+
job.tissue(4).ngaus = 3;
20+
job.tissue(4).native = [0, 0];
21+
job.tissue(4).warped = [0, 0];
22+
job.tissue(5).tpm = {[spm_path, filesep, 'tpm', filesep, 'TPM.nii,5']};
23+
job.tissue(5).ngaus = 4;
24+
job.tissue(5).native = [0, 0];
25+
job.tissue(5).warped = [0, 0];
26+
job.tissue(6).tpm = {[spm_path, filesep, 'tpm', filesep, 'TPM.nii,6']};
27+
job.tissue(6).ngaus = 2;
28+
job.tissue(6).native = [0, 0];
29+
job.tissue(6).warped = [0, 0];
30+
job.warp.mrf = 1;
31+
job.warp.cleanup = 1;
32+
job.warp.reg = [0, 0.001, 0.5, 0.05, 0.2];
33+
job.warp.affreg = 'mni';
34+
job.warp.fwhm = 0;
35+
job.warp.samp = 3;
36+
job.warp.write = [store_fwd, store_inv];
37+
if visual>0
38+
Finter = spm_figure('GetWin','Interactive');
39+
end
40+
spm_jobman('initcfg');
41+
segout = spm_preproc_run(job);
42+
param = segout.param{1};
43+
invdef = segout.invdef{1};
44+
fordef = segout.fordef{1};
45+
%disp(segout);
46+
end

0 commit comments

Comments
 (0)