-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathg_Func2std_mapping.m
More file actions
32 lines (19 loc) · 892 Bytes
/
Copy pathg_Func2std_mapping.m
File metadata and controls
32 lines (19 loc) · 892 Bytes
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
function g_Func2std_mapping(infile1,infile2,resolution)
disp('Mapping FunImg to Standard Space...')
%resolution='3mm';
d1=which('g_Func2std_mapping');
d1=strrep(d1,'g_Func2std_mapping.m','');
reff1=[d1,'MNI152_T1_',resolution,'_brain'];
folder='7_FunImg_to_Std';
mkdir(folder);
unix(['mv Func2std.nii.gz ',folder]);
unix(['mv std2Func.nii.gz ',folder]);
unix(['mv Fun2strBBR ',folder]);
command=['applywarp --ref=',reff1,' --in=',infile1,' --warp=./7_FunImg_to_Std/Func2std --rel --out=FunImg_',resolution,'StdSpace --interp=sinc'];
unix(command);
command=['applywarp --ref=',reff1,' --in=',infile2,' --warp=./7_FunImg_to_Std/Func2std --rel --out=FunImg_',resolution,'StdSpace_NoGlobalSignal --interp=sinc'];
unix(command);
movefile(['FunImg_',resolution,'StdSpace.nii.gz'],folder);
movefile(['FunImg_',resolution,'StdSpace_NoGlobalSignal.nii.gz'],folder);
disp('Finished!');
end