Skip to content

Commit

Permalink
Speed improvement in reco save if ants was used.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreashorn committed Feb 26, 2016
1 parent 94687ca commit 5e8a3f4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ea_reconstruction2mni.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ function ea_reconstruction2mni(options)
% to template voxel space:
c=nii(1).mat\c;
try
V=spm_vol([options.root,options.patientname,filesep,'y_ea_inv_normparams.nii']);
if ~isequal(V.dim,nii.dim)
ea_redo_inv([options.root,options.patientname,filesep],options);
end
[whichnormmethod]=ea_whichnormmethod([options.root,options.patientname,filesep]);
if ~strcmp(whichnormmethod,'ea_normalize_ants');
V=spm_vol([options.root,options.patientname,filesep,'y_ea_inv_normparams.nii']);
if ~isequal(V.dim,nii.dim)
ea_redo_inv([options.root,options.patientname,filesep],options);
end
end
end

c=ea_map_coords(c(1:3,:), [options.root,options.patientname,filesep,options.prefs.prenii_unnormalized], [options.root,options.patientname,filesep,'y_ea_inv_normparams.nii'],...
Expand Down

0 comments on commit 5e8a3f4

Please sign in to comment.