forked from netstim/leaddbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ea_coregmr_flirt.m
32 lines (29 loc) · 2.1 KB
/
ea_coregmr_flirt.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
function ea_coregmr_flirt(options)
% uses FLIRT instead of SPM to coregister MRIs.
if exist([options.root,options.patientname,filesep,options.prefs.tranii_unnormalized],'file') &&...
~ea_coreglocked(options,[options.root,options.patientname,filesep,options.prefs.tranii_unnormalized]) % file has already been locked and approved by used
disp('Coregistering postop MR tra to preop MRI...');
ea_flirt([options.root,options.patientname,filesep,options.prefs.prenii_unnormalized],...
[options.root,options.patientname,filesep,options.prefs.tranii_unnormalized],...
[options.root,options.patientname,filesep,options.prefs.tranii_unnormalized],...
options.prefs.mrcoreg.writeoutcoreg);
disp('Coregistration done.');
end
if exist([options.root,options.patientname,filesep,options.prefs.cornii_unnormalized],'file') &&...
~ea_coreglocked(options,[options.root,options.patientname,filesep,options.prefs.cornii_unnormalized]) % file has already been locked and approved by used
disp('Coregistering postop MR cor to preop MRI...');
ea_flirt([options.root,options.patientname,filesep,options.prefs.prenii_unnormalized],...
[options.root,options.patientname,filesep,options.prefs.cornii_unnormalized],...
[options.root,options.patientname,filesep,options.prefs.cornii_unnormalized],...
options.prefs.mrcoreg.writeoutcoreg);
disp('Coregistration done.');
end
if exist([options.root,options.patientname,filesep,options.prefs.sagnii_unnormalized],'file') &&...
~ea_coreglocked(options,[options.root,options.patientname,filesep,options.prefs.sagnii_unnormalized]) % file has already been locked and approved by used
disp('Coregistering postop MR sag to preop MRI...');
ea_flirt([options.root,options.patientname,filesep,options.prefs.prenii_unnormalized],...
[options.root,options.patientname,filesep,options.prefs.sagnii_unnormalized],...
[options.root,options.patientname,filesep,options.prefs.sagnii_unnormalized],...
options.prefs.mrcoreg.writeoutcoreg);
disp('Coregistration done.');
end