Skip to content

Commit

Permalink
Update data_driven_reference_region_correction_fwhm.m
Browse files Browse the repository at this point in the history
fixed ref-region figure saving problem by adding fig to output variable
  • Loading branch information
joupes committed Jun 14, 2022
1 parent f809bab commit 26922b4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions data_driven_reference_region_correction_fwhm.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [corrected_reference_region,thr] = data_driven_reference_region_correction_fwhm(uncorrected_reference_region,mean_pet_image,varargin)
function [corrected_reference_region,thr,fig] = data_driven_reference_region_correction_fwhm(uncorrected_reference_region,mean_pet_image,varargin)

[~,n,e] = fileparts(uncorrected_reference_region);
V = spm_vol(uncorrected_reference_region);
Expand Down Expand Up @@ -52,13 +52,13 @@

V.descrip = sprintf('ll = %.0f; ul = %.0f',ll,ul);
spm_write_vol(V,corrected_reference_region);
corrected_reference_region = V.fname;
p = fileparts(V.fname);

idx = regexp(p,'/');
subject = p(idx(end-1)+1:idx(end)-1);
add_to_qc_pic(subject,fig);

close(fig);
% corrected_reference_region = V.fname;
% p = fileparts(V.fname);
%
% idx = regexp(p,'/');
% subject = p(idx(end-1)+1:idx(end)-1);
% add_to_qc_pic(subject,fig);
%
% close(fig);

end

0 comments on commit 26922b4

Please sign in to comment.