forked from netstim/leaddbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathea_coregmethod.m
30 lines (29 loc) · 858 Bytes
/
ea_coregmethod.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
function [whichnormmethod,template]=ea_coregmethod(directory)
try
load(fullfile(directory,'ea_normmethod_applied'));
cnt=0;
while 1
whichnormmethod=norm_method_applied{end-cnt};
switch whichnormmethod
case {'ea_normalize_apply_normalization'}
cnt=cnt+1;
otherwise
break
end
end
catch
whichnormmethod='';
end
leaddir=ea_getearoot;
switch whichnormmethod
case 'ea_normalize_spmshoot'
template=[ea_space([],'dartel'),'shootmni_6.nii'];
case 'ea_normalize_spmdartel'
template=[ea_space([],'dartel'),'dartelmni_6.nii'];
case 'ea_normalize_spmnewseg'
template=[ea_space,'TPM.nii'];
otherwise
options.prefs=ea_prefs('');
spacedef=ea_getspacedef;
template=[ea_space,spacedef.templates{1},'.nii'];
end