Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG FIX] - osp_saveNII fails if water signal does not originate from… #739

Merged
merged 1 commit into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions process/osp_saveJMRUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,16 @@

% Now do the same for the (short-TE) water signal
if MRSCont.flags.hasWater
% Get TE and the input file name. For GE, the water and ecc reference is
% already contained in the P file.
% Get TE and the input file name
te_w = MRSCont.processed.w{kk}.te;
[path_w,filename_w,~] = fileparts(MRSCont.files_w{kk});
if strcmpi(MRSCont.vendor, 'GE')
te_w = MRSCont.processed.A{kk}.te;
[path_w,filename_w,~] = fileparts(MRSCont.files{kk});
else
te_w = MRSCont.processed.w{kk}.te;
[path_w,filename_w,~] = fileparts(MRSCont.files_w{kk});
end
% For batch analysis, get the last two sub-folders (e.g. site and
% subject)
path_w_split = regexp(path_w,filesep,'split');
Expand Down
9 changes: 7 additions & 2 deletions process/osp_saveNII.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,13 @@

% Now do the same for the (short-TE) water signal
if MRSCont.flags.hasWater
% Get TE and the input file name
[path_w,filename_w,ext_w] = fileparts(MRSCont.files_w{kk});
% Get the input file name. For GE, the water and ecc reference is
% already contained in the P file.
if strcmpi(MRSCont.vendor, 'GE')
[path_w,filename_w,ext_w] = fileparts(MRSCont.files{kk});
else
[path_w,filename_w,ext_w] = fileparts(MRSCont.files_w{kk});
end
% For batch analysis, get the last two sub-folders (e.g. site and
% subject)
if strcmp(ext_w, '.gz')
Expand Down