8000 Some more prep for compialtion by HJZollner · Pull Request #516 · schorschinho/osprey · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Some more prep for compialtion #516

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

Merged
merged 1 commit into from
Sep 6, 2022
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
16 changes: 12 additions & 4 deletions GUI/OspreyGUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,18 @@
close(gui.controls.waitbar);
%% Here we add callback listeners triggered on selection changes
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
set(gui.layout.rawTab, 'SelectionChangedFcn',{@osp_RawTabChangeFcn,gui});
set(gui.layout.proTab,'SelectionChangedFcn',{@osp_ProTabChangeFcn,gui});
set(gui.layout.fitTab, 'SelectionChangedFcn',{@osp_FitTabChangeFcn,gui});
set(gui.layout.quantifyTab, 'SelectionChangedFcn',{@osp_QuantTabChangeFcn,gui});
if MRSCont.flags.didLoad
set(gui.layout.rawTab, 'SelectionChangedFcn',{@osp_RawTabChangeFcn,gui});
end
if MRSCont.flags.didProcess
set(gui.layout.proTab,'SelectionChangedFcn',{@osp_ProTabChangeFcn,gui});
end
if MRSCont.flags.didFit
set(gui.layout.fitTab, 'SelectionChangedFcn',{@osp_FitTabChangeFcn,gui});
end
if MRSCont.flags.didQuantify
set(gui.layout.quantifyTab, 'SelectionChangedFcn',{@osp_QuantTabChangeFcn,gui});
end
set(gui.layout.ListBox,'Callback', {@osp_onListSelection,gui},'KeyPressFcn',{@osp_WindowKeyDown,gui}, 'KeyReleaseFcn', {@osp_WindowKeyUp,gui});

end
Expand Down
18 changes: 13 additions & 5 deletions GUI/osp_ProTabChangeFcn.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,22 @@ function osp_ProTabChangeFcn(src,~,gui)
% User selected tab refreshs plot
gui.process.Selected = src.Selection;

if MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.dims.extras > 0
gui.info.nXvoxels = MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.sz(MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.dims.extras);
if isfield(MRSCont,'processed')
if MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.dims.extras > 0
gui.info.nXvoxels = MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.sz(MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.dims.extras);
else
gui.info.nXvoxels = 1;
end
else
gui.info.nXvoxels = 1;
end
end
gui.controls.act_x = 1;
if MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.dims.subSpecs > 0
gui.info.nYvoxels = MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.sz(MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.dims.subSpecs);
if isfield(MRSCont,'processed')
if MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.dims.subSpecs > 0
gui.info.nYvoxels = MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.sz(MRSCont.processed.(gui.process.Names{gui.process.Selected}){gui.controls.Selected}.dims.subSpecs);
else
gui.info.nYvoxels = MRSCont.nDatasets(2);
end
else
gui.info.nYvoxels = MRSCont.nDatasets(2);
end
Expand Down
2 changes: 1 addition & 1 deletion GUI/osp_onFit.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function osp_onFit( ~, ~ ,gui)
set(gui.figure,'HandleVisibility','off');
set(gui.layout.tabs,'SelectionChangedFcn','');
set(gui.layout.fitTab, 'SelectionChangedFcn','');
gui.layout.b_fit.Enable = 'off';
gui.layout.tabs.Selection = 3;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
%%% 2. CALL OSPREYFIT %%%
Expand Down Expand Up @@ -101,7 +102,6 @@ function osp_onFit( ~, ~ ,gui)
set(gui.figure,'HandleVisibility','on');
%%% 3. INITIALIZE OUTPUT WINDOW %%%
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});
Expand Down
3 changes: 2 additions & 1 deletion GUI/osp_onLoad.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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.b_load.Enable = 'off';
gui.layout.tabs.Selection = 1;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
%%% 2. CALL OSPREYLOAD %%%
Expand Down Expand Up @@ -63,11 +64,11 @@
set(gui.figure,'HandleVisibility','on');
%%% 3. INITIALIZE OUTPUT WINDOW %%%
osp_iniLoadWindow(gui);
gui.layout.b_load.Enable = 'off';
gui.layout.b_proc.Enable = 'on';
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});
set(gui.layout.rawTab, 'SelectionChangedFcn',{@osp_RawTabChangeFcn,gui});
end % onLoad
3 changes: 2 additions & 1 deletion GUI/osp_onProc.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function osp_onProc( ~, ~ ,gui)
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.b_proc.Enable = 'off';
gui.layout.tabs.TabEnables{2} = 'on';
gui.layout.tabs.Selection = 2;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
Expand All @@ -41,7 +42,7 @@ function osp_onProc( ~, ~ ,gui)
set(gui.figure,'HandleVisibility','on');
%%% 3. INITIALIZE OUTPUT WINDOW %%%
osp_iniProcessWindow(gui);
gui.layout.b_proc.Enable = 'off';
gui.layout.b_fit.Enable = 'on';
set(gui.layout.tabs,'SelectionChangedFcn',{@osp_SelectionChangedFcn,gui});
set(gui.layout.proTab,'SelectionChangedFcn',{@osp_ProTabChangeFcn,gui});
end % onProc
2 changes: 1 addition & 1 deletion GUI/osp_onQuant.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function osp_onQuant( ~, ~ ,gui)
set(gui.figure,'HandleVisibility','off');
set(gui.layout.tabs,'SelectionChangedFcn','');
set(gui.layout.quantifyTab, 'SelectionChangedFcn','');
gui.layout.b_quant.Enable = 'off';
gui.layout.tabs.Selection = 5;
[gui,MRSCont] = osp_processingWindow(gui,MRSCont);
%%% 2. CALL OSPREYQUANTIFY %%%
Expand Down Expand Up @@ -75,7 +76,6 @@ function osp_onQuant( ~, ~ ,gui)
set(gui.controls.pop_corrOvMetab,'callback',{@osp_pop_corrOvMetab_Call,gui});
set(gui.controls.pop_corrOvCorr,'callback',{@osp_pop_corrOvCorr_Call,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});
Expand Down
1 change: 0 additions & 1 deletion load/osp_LoadDICOM.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
raw_ref = io_loadspec_dicom(MRSCont.files_ref{ref_ll,kk});
raw_ref = op_combine_water_subspecs(raw_ref,0);
MRSCont.raw_ref{ref_ll,kk} = raw_ref;
end
if MRSCont.flags.isUnEdited
MRSCont.raw_ref{ref_ll,kk}.flags.isUnEdited = 1;
end
Expand Down
16 changes: 8 additions & 8 deletions utilities/CompileOspreyStandalone.m
39E9
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function CompileOspreyStandalone(OutputDir,SPM12Dir,WidgetsDir,GUILayoutDir)
'TreatInputsAsNumeric','Off',...
'Verbose','On');

buildResults = compiler.build.standaloneApplication(opts);
% buildResults = compiler.build.standaloneApplication(opts);


%% 3. Command Line export
Expand Down Expand Up @@ -234,12 +234,12 @@ function CompileOspreyStandalone(OutputDir,SPM12Dir,WidgetsDir,GUILayoutDir)
'TreatInputsAsNumeric','Off',...
'Verbose','On');

buildResults = compiler.build.standaloneApplicationedit (opts);

compiler.package.installer(buildResults,'OutputDir',fullfile(OspreyDir,'OspreyCMD_installer'), 'InstallerName', 'OspreyGUI_install', 'RuntimeDelivery', 'installer',...
'AuthorCompany','The Johns Hopkins University', 'Description', 'Installer for Osprey CMD version',...
'InstallationNotes', 'Thank you for downloading Osprey. This installer will allow you to run the Osprey CMD as a standalone application',...
'Version', '2.4.0', 'ApplicationName','OspreyCMD')
% buildResults = compiler.build.standaloneApplicationedit (opts);
%
% compiler.package.installer(buildResults,'OutputDir',fullfile(OspreyDir,'OspreyCMD_installer'), 'InstallerName', 'OspreyGUI_install', 'RuntimeDelivery', 'installer',...
% 'AuthorCompany','The Johns Hopkins University', 'Description', 'Installer for Osprey CMD version',...
% 'InstallationNotes', 'Thank you for downloading Osprey. This installer will allow you to run the Osprey CMD as a standalone application',...
% 'Version', '2.4.0', 'ApplicationName','OspreyCMD')

%% 4. GUI export
% Compile GUI Osprey which is only working if you supplied the path to the
Expand Down Expand Up @@ -286,7 +286,7 @@ function CompileOspreyStandalone(OutputDir,SPM12Dir,WidgetsDir,GUILayoutDir)

compiler.package.installer(buildResults,'OutputDir',fullfile(OutputDirGUI,'OspreyGUI_installer'), 'InstallerName', 'OspreyGUI_install', 'RuntimeDelivery', 'installer',...
'AuthorCompany','The Johns Hopkins University', 'Description', 'Installer for Osprey GUI version',...
'InstallationNotes', 'Thank you for downloading Osprey. This installer will allow you to run the Osprey GUI as a standalone application',...
'InstallationNotes', 'Thank you for downloading Osprey. This installer will allow you to run the Osprey GUI as a standalone application. Please copy the "basissets" folder into the "application" folder after the installation',...
'Version', '2.4.0', 'ApplicationName','OspreyGUI')
end

Expand Down
0