Skip to content

Commit 7c9d2ef

Browse files
authored
Merge pull request #452 from schorschinho/develop
Prepare v2.3.0 release
2 parents 687a2b2 + 5f64b13 commit 7c9d2ef

File tree

83 files changed

+63250
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+63250
-327
lines changed

GUI/Osprey.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
logoFcn = @()imread('osprey.png', 'BackgroundColor', gui.colormap.Background);
3131
logoBanner = uiw.utility.loadIcon(logoFcn);
3232
% Here the intro banner is created
33-
gui.d = uiw.dialog.About('Name', 'Osprey','Version','2.2.0','Date', 'April 12, 2022',...
33+
gui.d = uiw.dialog.About('Name', 'Osprey','Version','2.3.0','Date', 'June 24, 2022',...
3434
'Timeout', 3,'CustomText', 'Osprey is provided by Johns Hopkins University.',...
3535
'ContactInfo', 'gabamrs@gmail.com','LogoCData', logoBanner);
3636

GUI/osp_Toolbox_Check.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
% 2020-05-15: First version of the code.
3333
%% % 1. SAVE OSPREY VERSION%%%
3434
%%% 1. SAVE OSPREY VERSION%%%
35-
OspreyVersion = 'Osprey 2.2.0';
35+
OspreyVersion = 'Osprey 2.3.0';
3636
fprintf(['Timestamp %s ' OspreyVersion ' ' Module '\n'], datestr(now,'mmmm dd, yyyy HH:MM:SS'));
3737
hasSPM = 1; % For the compiled GUI
3838
%% % 2. GET SPMPATH AND TOOLBOXES%%%

GUI/osp_iniFitWindow.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,11 @@ function osp_iniFitWindow(gui)
290290
waterFitRangeString = ['Fitting range: ' num2str(MRSCont.opts.fit.rangeWater(1)) ' to ' num2str(MRSCont.opts.fit.rangeWater(2)) ' ppm'];
291291
% Where are the metabolite names stored?
292292
if strcmp(gui.fit.Style, 'ref') || strcmp(gui.fit.Style, 'w')
293-
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;
293+
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;
294294
else if strcmp(gui.fit.Style, 'conc')
295-
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;
295+
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;
296296
else
297-
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;
297+
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;
298298
end
299299
end
300300
% Larger fonts for the results

GUI/osp_onCoreg.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ function osp_onCoreg( ~, ~ ,gui)
4040
end
4141
end
4242
end
43+
set(gui.layout.tabs,'SelectionChangedFcn','');
4344
gui.layout.tabs.Selection = 4;
4445
%%% 2. CALL OSPREYCOREG %%%
4546
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
@@ -51,4 +52,5 @@ function osp_onCoreg( ~, ~ ,gui)
5152
osp_iniCoregWindow(gui);
5253
gui.layout.b_coreg.Enable = 'off';
5354
gui.layout.b_segm.Enable = 'on';
55+
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
5456
end % onCoreg

GUI/osp_onFit.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ function osp_onFit( ~, ~ ,gui)
2727
%%% 1. DELETE OLD PLOTS %%%
2828
MRSCont = getappdata(gui.figure,'MRSCont'); % Get MRSCont from hidden container in gui class
2929
set(gui.figure,'HandleVisibility','off');
30+
set(gui.layout.tabs,'SelectionChangedFcn','');
31+
set(gui.layout.fitTab, 'SelectionChangedFcn','');
3032
gui.layout.tabs.Selection = 3;
3133
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
3234
%%% 2. CALL OSPREYFIT %%%
@@ -101,4 +103,6 @@ function osp_onFit( ~, ~ ,gui)
101103
osp_iniFitWindow(gui);
102104
gui.layout.b_fit.Enable = 'off';
103105
gui.layout.b_quant.Enable = 'on';
106+
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
107+
set(gui.layout.fitTab, 'SelectionChangedFcn',{@osp_FitTabChangeFcn,gui});
104108
end % onFit

GUI/osp_onLoad.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
%%% 1. INITIALIZE DATA %%%
2828
MRSCont = getappdata(gui.figure,'MRSCont'); % Get MRSCont from hidden container in gui class
2929
set(gui.figure,'HandleVisibility','off');
30+
set(gui.layout.tabs,'SelectionChangedFcn','');
3031
gui.layout.tabs.Selection = 1;
3132
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
3233
%%% 2. CALL OSPREYLOAD %%%
@@ -64,9 +65,9 @@
6465
osp_iniLoadWindow(gui);
6566
gui.layout.b_load.Enable = 'off';
6667
gui.layout.b_proc.Enable = 'on';
67-
if MRSCont.flags.hasSPM == 1
68+
if MRSCont.flags.hasSPM == 1 && ~isempty(MRSCont.files_nii)
6869
gui.layout.b_coreg.Enable = 'on';
6970
end
7071
gui.layout.ListBox.Enable = 'on';
71-
72+
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
7273
end % onLoad

GUI/osp_onProc.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function osp_onProc( ~, ~ ,gui)
2727
%%% 1. INITIALIZE %%%
2828
MRSCont = getappdata(gui.figure,'MRSCont'); % Get MRSCont from hidden container in gui class
2929
set(gui.figure,'HandleVisibility','off');
30+
set(gui.layout.tabs,'SelectionChangedFcn','');
3031
gui.layout.tabs.TabEnables{2} = 'on';
3132
gui.layout.tabs.Selection = 2;
3233
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
@@ -42,4 +43,5 @@ function osp_onProc( ~, ~ ,gui)
4243
osp_iniProcessWindow(gui);
4344
gui.layout.b_proc.Enable = 'off';
4445
gui.layout.b_fit.Enable = 'on';
46+
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
4547
end % onProc

GUI/osp_onQuant.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ function osp_onQuant( ~, ~ ,gui)
2727
%%% 1. INITIALIZE %%%
2828
MRSCont = getappdata(gui.figure,'MRSCont'); % Get MRSCont from hidden container in gui class
2929
set(gui.figure,'HandleVisibility','off');
30+
set(gui.layout.tabs,'SelectionChangedFcn','');
31+
set(gui.layout.quantifyTab, 'SelectionChangedFcn','');
3032
gui.layout.tabs.Selection = 5;
3133
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
3234
%%% 2. CALL OSPREYQUANTIFY %%%
@@ -75,4 +77,6 @@ function osp_onQuant( ~, ~ ,gui)
7577
set(gui.controls.pop_whichcorrOvCorr,'callback',{@osp_pop_whichcorrOvCorr_Call,gui});
7678
gui.layout.b_quant.Enable = 'off';
7779
set(gui.figure,'HandleVisibility','on');
80+
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
81+
set(gui.layout.quantifyTab, 'SelectionChangedFcn',{@osp_QuantTabChangeFcn,gui});
7882
end % onQuant

GUI/osp_onRightBasis.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function osp_onRightBasis( ~, ~ ,gui)
3636
gui.fit.Style = 'conc';
3737
end
3838

39-
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)]))
39+
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))]))
4040
gui.controls.act_basis = gui.controls.act_basis + 1;
4141

4242
setappdata(gui.figure,'MRSCont',MRSCont); % Write MRSCont into hidden container in gui class

GUI/osp_onSeg.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ function osp_onSeg( ~, ~ ,gui)
4040
end
4141
end
4242
end
43+
set(gui.layout.tabs,'SelectionChangedFcn','');
4344
gui.layout.tabs.Selection = 4;
4445
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
4546
%%% 2. CALL OSPREYSEG %%%
@@ -61,4 +62,5 @@ function osp_onSeg( ~, ~ ,gui)
6162
gui.pop_distrOvQuantControls.String = gui.quant.Names.Quants;
6263
gui.pop_corrOvQuantControls.String = gui.quant.Names.Quants;
6364
end
65+
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
6466
end % onSeg

0 commit comments

Comments
 (0)