Skip to content

Commit

Permalink
Merge pull request #452 from schorschinho/develop
Browse files Browse the repository at this point in the history
Prepare v2.3.0 release
  • Loading branch information
HJZollner authored Jun 24, 2022
2 parents 687a2b2 + 5f64b13 commit 7c9d2ef
Show file tree
Hide file tree
Showing 83 changed files with 63,250 additions and 327 deletions.
2 changes: 1 addition & 1 deletion GUI/Osprey.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
logoFcn = @()imread('osprey.png', 'BackgroundColor', gui.colormap.Background);
logoBanner = uiw.utility.loadIcon(logoFcn);
% Here the intro banner is created
gui.d = uiw.dialog.About('Name', 'Osprey','Version','2.2.0','Date', 'April 12, 2022',...
gui.d = uiw.dialog.About('Name', 'Osprey','Version','2.3.0','Date', 'June 24, 2022',...
'Timeout', 3,'CustomText', 'Osprey is provided by Johns Hopkins University.',...
'ContactInfo', '[email protected]','LogoCData', logoBanner);

Expand Down
2 changes: 1 addition & 1 deletion GUI/osp_Toolbox_Check.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
% 2020-05-15: First version of the code.
%% % 1. SAVE OSPREY VERSION%%%
%%% 1. SAVE OSPREY VERSION%%%
OspreyVersion = 'Osprey 2.2.0';
OspreyVersion = 'Osprey 2.3.0';
fprintf(['Timestamp %s ' OspreyVersion ' ' Module '\n'], datestr(now,'mmmm dd, yyyy HH:MM:SS'));
hasSPM = 1; % For the compiled GUI
%% % 2. GET SPMPATH AND TOOLBOXES%%%
Expand Down
6 changes: 3 additions & 3 deletions GUI/osp_iniFitWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ function osp_iniFitWindow(gui)
waterFitRangeString = ['Fitting range: ' num2str(MRSCont.opts.fit.rangeWater(1)) ' to ' num2str(MRSCont.opts.fit.rangeWater(2)) ' ppm'];
% Where are the metabolite names stored?
if strcmp(gui.fit.Style, 'ref') || strcmp(gui.fit.Style, 'w')
basisSetNames = MRSCont.fit.resBasisSet.(gui.fit.Style).(['np_sw_' num2str(MRSCont.processed.metab{1}.sz(1)) '_' num2str(MRSCont.processed.metab{1}.spectralwidth)]){1,1}.name;
basisSetNames = MRSCont.fit.resBasisSet.(gui.fit.Style).(['np_sw_' num2str(round(MRSCont.processed.metab{1}.sz(1))) '_' num2str(round(MRSCont.processed.metab{1}.spectralwidth))]){1,1}.name;
else if strcmp(gui.fit.Style, 'conc')
basisSetNames = MRSCont.fit.resBasisSet.(gui.fit.Style).(['np_sw_' num2str(MRSCont.processed.metab{1}.sz(1)) '_' num2str(MRSCont.processed.metab{1}.spectralwidth)]){1,1}.name;
basisSetNames = MRSCont.fit.resBasisSet.(gui.fit.Style).(['np_sw_' num2str(round(MRSCont.processed.metab{1}.sz(1))) '_' num2str(round(MRSCont.processed.metab{1}.spectralwidth))]){1,1}.name;
else
basisSetNames = MRSCont.fit.resBasisSet.(gui.fit.Style).(['np_sw_' num2str(MRSCont.processed.metab{1}.sz(1)) '_' num2str(MRSCont.processed.metab{1}.spectralwidth)]){1,end}.name;
basisSetNames = MRSCont.fit.resBasisSet.(gui.fit.Style).(['np_sw_' num2str(round(MRSCont.processed.metab{1}.sz(1))) '_' num2str(round(MRSCont.processed.metab{1}.spectralwidth))]){1,end}.name;
end
end
% Larger fonts for the results
Expand Down
2 changes: 2 additions & 0 deletions GUI/osp_onCoreg.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function osp_onCoreg( ~, ~ ,gui)
end
end
end
set(gui.layout.tabs,'SelectionChangedFcn','');
gui.layout.tabs.Selection = 4;
%%% 2. CALL OSPREYCOREG %%%
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
Expand All @@ -51,4 +52,5 @@ function osp_onCoreg( ~, ~ ,gui)
osp_iniCoregWindow(gui);
gui.layout.b_coreg.Enable = 'off';
gui.layout.b_segm.Enable = 'on';
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
end % onCoreg
4 changes: 4 additions & 0 deletions GUI/osp_onFit.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function osp_onFit( ~, ~ ,gui)
%%% 1. DELETE OLD PLOTS %%%
MRSCont = getappdata(gui.figure,'MRSCont'); % Get MRSCont from hidden container in gui class
set(gui.figure,'HandleVisibility','off');
set(gui.layout.tabs,'SelectionChangedFcn','');
set(gui.layout.fitTab, 'SelectionChangedFcn','');
gui.layout.tabs.Selection = 3;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
%%% 2. CALL OSPREYFIT %%%
Expand Down Expand Up @@ -101,4 +103,6 @@ function osp_onFit( ~, ~ ,gui)
osp_iniFitWindow(gui);
gui.layout.b_fit.Enable = 'off';
gui.layout.b_quant.Enable = 'on';
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
set(gui.layout.fitTab, 'SelectionChangedFcn',{@osp_FitTabChangeFcn,gui});
end % onFit
5 changes: 3 additions & 2 deletions GUI/osp_onLoad.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
%%% 1. INITIALIZE DATA %%%
MRSCont = getappdata(gui.figure,'MRSCont'); % Get MRSCont from hidden container in gui class
set(gui.figure,'HandleVisibility','off');
set(gui.layout.tabs,'SelectionChangedFcn','');
gui.layout.tabs.Selection = 1;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
%%% 2. CALL OSPREYLOAD %%%
Expand Down Expand Up @@ -64,9 +65,9 @@
osp_iniLoadWindow(gui);
gui.layout.b_load.Enable = 'off';
gui.layout.b_proc.Enable = 'on';
if MRSCont.flags.hasSPM == 1
if MRSCont.flags.hasSPM == 1 && ~isempty(MRSCont.files_nii)
gui.layout.b_coreg.Enable = 'on';
end
gui.layout.ListBox.Enable = 'on';

set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
end % onLoad
2 changes: 2 additions & 0 deletions GUI/osp_onProc.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function osp_onProc( ~, ~ ,gui)
%%% 1. INITIALIZE %%%
MRSCont = getappdata(gui.figure,'MRSCont'); % Get MRSCont from hidden container in gui class
set(gui.figure,'HandleVisibility','off');
set(gui.layout.tabs,'SelectionChangedFcn','');
gui.layout.tabs.TabEnables{2} = 'on';
gui.layout.tabs.Selection = 2;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
Expand All @@ -42,4 +43,5 @@ function osp_onProc( ~, ~ ,gui)
osp_iniProcessWindow(gui);
gui.layout.b_proc.Enable = 'off';
gui.layout.b_fit.Enable = 'on';
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
end % onProc
4 changes: 4 additions & 0 deletions GUI/osp_onQuant.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function osp_onQuant( ~, ~ ,gui)
%%% 1. INITIALIZE %%%
MRSCont = getappdata(gui.figure,'MRSCont'); % Get MRSCont from hidden container in gui class
set(gui.figure,'HandleVisibility','off');
set(gui.layout.tabs,'SelectionChangedFcn','');
set(gui.layout.quantifyTab, 'SelectionChangedFcn','');
gui.layout.tabs.Selection = 5;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
%%% 2. CALL OSPREYQUANTIFY %%%
Expand Down Expand Up @@ -75,4 +77,6 @@ function osp_onQuant( ~, ~ ,gui)
set(gui.controls.pop_whichcorrOvCorr,'callback',{@osp_pop_whichcorrOvCorr_Call,gui});
gui.layout.b_quant.Enable = 'off';
set(gui.figure,'HandleVisibility','on');
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
set(gui.layout.quantifyTab, 'SelectionChangedFcn',{@osp_QuantTabChangeFcn,gui});
end % onQuant
2 changes: 1 addition & 1 deletion GUI/osp_onRightBasis.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function osp_onRightBasis( ~, ~ ,gui)
gui.fit.Style = 'conc';
end

if gui.controls.act_basis < length(MRSCont.fit.resBasisSet.(gui.fit.Style).(['np_sw_' num2str(MRSCont.processed.metab{1}.sz(1)) '_' num2str(MRSCont.processed.metab{1}.spectralwidth)]))
if gui.controls.act_basis < length(MRSCont.fit.resBasisSet.(gui.fit.Style).(['np_sw_' num2str(round(MRSCont.processed.metab{1}.sz(1))) '_' num2str(round(MRSCont.processed.metab{1}.spectralwidth))]))
gui.controls.act_basis = gui.controls.act_basis + 1;

setappdata(gui.figure,'MRSCont',MRSCont); % Write MRSCont into hidden container in gui class
Expand Down
2 changes: 2 additions & 0 deletions GUI/osp_onSeg.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function osp_onSeg( ~, ~ ,gui)
end
end
end
set(gui.layout.tabs,'SelectionChangedFcn','');
gui.layout.tabs.Selection = 4;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
%%% 2. CALL OSPREYSEG %%%
Expand All @@ -61,4 +62,5 @@ function osp_onSeg( ~, ~ ,gui)
gui.pop_distrOvQuantControls.String = gui.quant.Names.Quants;
gui.pop_corrOvQuantControls.String = gui.quant.Names.Quants;
end
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
end % onSeg
4 changes: 2 additions & 2 deletions exampledata/ima/jobIMA.m
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {'default'}; % OPTIONS: - {'default'}
% - {'full'}
% - {custom}
Expand Down
4 changes: 2 additions & 2 deletions exampledata/nifti-mrs/jobNIfTIMRS.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {'default'}; % OPTIONS: - {'default'}
% - {custom}

Expand Down
2 changes: 1 addition & 1 deletion exampledata/p/jobP.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
Expand Down
4 changes: 2 additions & 2 deletions exampledata/rda/jobRDA.m
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {'default'}; % OPTIONS: - {'default'}
% - {'full'}
% - {custom}
Expand Down
4 changes: 2 additions & 2 deletions exampledata/sdat/MEGA/jobSDAT_MEGA.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {'default'}; % OPTIONS: - {'default'}
% - {'full'}
% - {custom}
Expand Down
4 changes: 2 additions & 2 deletions exampledata/sdat/MEGA/jobSDAT_MEGA_Multidataset.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {'default'}; % OPTIONS: - {'default'}
% - {'full'}
% - {custom}
Expand Down
4 changes: 2 additions & 2 deletions exampledata/sdat/UnEdited/jobSDAT.m
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {'default'}; % OPTIONS: - {'default'}
% - {custom}

Expand Down
4 changes: 2 additions & 2 deletions exampledata/sdat/UnEdited/jobSDAT_LCModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {'default'}; % OPTIONS: - {'default'}
% - {custom}

Expand Down
4 changes: 2 additions & 2 deletions exampledata/twix/jobTwix.m
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@
% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter 'default', the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {'default'}; % OPTIONS: - {'default'}
% - {'full'}
% - {custom}
Expand Down
4 changes: 2 additions & 2 deletions fit/OspreyFit.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
if MRSCont.flags.hasRef
refFitTime = tic;
% Loop over all the datasets here
for kk = 1:MRSCont.nDatasets
for kk = 1:MRSCont.nDatasets(1)
[~] = printLog('OspreyFitRef',kk,1,MRSCont.nDatasets,progressText,MRSCont.flags.isGUI ,MRSCont.flags.isMRSI);
if ~(MRSCont.flags.didFit == 1 && MRSCont.flags.speedUp && isfield(MRSCont, 'fit') && (kk > length(MRSCont.fit.results.ref.fitParams))) || ~strcmp(MRSCont.ver.Osp,MRSCont.ver.CheckOsp)
[MRSCont] = osp_fitWater(MRSCont, kk, 'ref');
Expand All @@ -101,7 +101,7 @@
if MRSCont.flags.hasWater
waterFitTime = tic;
% Loop over all the datasets here
for kk = 1:MRSCont.nDatasets
for kk = 1:MRSCont.nDatasets(1)
[~] = printLog('OspreyFitWater',kk,1,MRSCont.nDatasets,progressText,MRSCont.flags.isGUI ,MRSCont.flags.isMRSI);
if ~(MRSCont.flags.didFit == 1 && MRSCont.flags.speedUp && isfield(MRSCont, 'fit') && (kk > length(MRSCont.fit.results.w.fitParams))) || ~strcmp(MRSCont.ver.Osp,MRSCont.ver.CheckOsp)
[MRSCont] = osp_fitWater(MRSCont, kk, 'w');
Expand Down
Binary file not shown.
Loading

0 comments on commit 7c9d2ef

Please sign in to comment.