Skip to content

Commit ebd2c81

Browse files
committed
Moved biasfieldcorrection and crop/reorient to begin of Lead-Pipeline.
1 parent e1e402c commit ebd2c81

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

ea_assignpretra.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
if isempty(f)
1414
ea_error(['No anatomy information found. Please put either ',options.prefs.rawpreniis{1},', ', options.prefs.rawpreniis{2},' or ', options.prefs.rawpreniis{3}, ' into subject folder.']);
1515
end
16+
17+
18+
if ~exist([directory,'.pp'],'file') % only do this once, small hidden flag .pp inside patient folder will show this has been done before.
19+
for f=find(fexist)
20+
% apply biasfieldcorrection and reorient/crop
21+
ea_dcm2nii([directory,options.prefs.rawpreniis{f}]);
22+
ea_bias_field_correction([directory,options.prefs.rawpreniis{f}])
23+
end
24+
fs=fopen([directory,'.pp'],'w');
25+
end
26+
1627
options.prefs.prenii_unnormalized=options.prefs.rawpreniis{f(1)};
1728
options.primarytemplate=ptemps{f(1)};
1829

ea_normalize_ants_multimodal.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@
3939
bprfx='';
4040
end
4141

42-
ea_dcm2nii([directory,options.prefs.prenii_unnormalized]);
43-
ea_bias_field_correction([directory,options.prefs.prenii_unnormalized])
44-
42+
4543
% T1
4644
if uset1 && ~strcmp(options.primarytemplate,'_t1')
4745
if exist([directory,options.prefs.prenii_unnormalized_t1],'file')

0 commit comments

Comments
 (0)