forked from netstim/leaddbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathea_coreg_fa.m
23 lines (22 loc) · 1.05 KB
/
ea_coreg_fa.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function ea_coreg_fa(options,usebrainmask)
directory=[options.root,options.patientname,filesep];
% check for presence of FA map
if ~exist([directory,options.prefs.fa2anat],'file')
if ~exist([directory,options.prefs.fa],'file')
if ~exist([directory,options.prefs.dti],'file')
disp('No dMRI data has been found. Proceeding without FA');
else
ea_isolate_fa(options);
end
end
if exist([directory,options.prefs.fa],'file') % check again since could have been built above
if exist([directory,options.prefs.fa],'file') % recheck if has been built.
ea_coreg2images(options,[directory,options.prefs.fa],[directory,options.prefs.prenii_unnormalized],[directory,options.prefs.fa2anat]);
end
end
end
if exist([directory,options.prefs.fa2anat],'file') % recheck if now is present.
if usebrainmask && (~includeatlas) % if includeatlas is set we can assume that images have been coregistered and skulstripped already
ea_maskimg(options,[directory,options.prefs.fa2anat],bprfx);
end
end